summaryrefslogtreecommitdiff
path: root/sw/inc/tox.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc/tox.hxx')
-rw-r--r--sw/inc/tox.hxx32
1 files changed, 28 insertions, 4 deletions
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 74bebda882..88ab5c3010 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -27,8 +27,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TOX_HXX
-#define _TOX_HXX
+#ifndef SW_TOX_HXX
+#define SW_TOX_HXX
+
+#include <cppuhelper/weakref.hxx>
#include <i18npool/lang.h>
#include <tools/string.hxx>
@@ -47,6 +49,11 @@
#define INCLUDED_VECTOR
#endif
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XDocumentIndexMark; }
+} } }
+
class SwTOXType;
class SwTOXMark;
class SwTxtTOXMark;
@@ -61,7 +68,9 @@ SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10)
#define IVER_TOXMARK_STRPOOL ((USHORT)1)
#define IVER_TOXMARK_NEWTOX ((USHORT)2)
-class SW_DLLPUBLIC SwTOXMark : public SfxPoolItem, public SwClient
+class SW_DLLPUBLIC SwTOXMark
+ : public SfxPoolItem
+ , public SwModify
{
friend void _InitCore();
friend class SwTxtTOXMark;
@@ -80,6 +89,8 @@ class SW_DLLPUBLIC SwTOXMark : public SfxPoolItem, public SwClient
BOOL bAutoGenerated : 1; // generated using a concordance file
BOOL bMainEntry : 1; // main entry emphasized by character style
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark;
SwTOXMark(); // to create the dflt. atr. in _InitCore
@@ -97,6 +108,11 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ // SwClient
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ void InvalidateTOXMark();
+
String GetText() const;
inline BOOL IsAlternativeText() const;
@@ -131,6 +147,14 @@ public:
const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; }
SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; }
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const
+ { return m_wXDocumentIndexMark; }
+ SW_DLLPRIVATE void SetXTOXMark(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XDocumentIndexMark> const& xMark)
+ { m_wXDocumentIndexMark = xMark; }
+
};
/*--------------------------------------------------------------------
@@ -769,4 +793,4 @@ inline void SwTOXBase::SetOptions(USHORT nOpt)
}
-#endif // _TOX_HXX
+#endif // SW_TOX_HXX