summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sw/inc/format.hxx21
-rw-r--r--sw/inc/hintids.hxx6
-rw-r--r--sw/inc/hints.hxx15
-rw-r--r--sw/inc/ndnotxt.hxx6
-rw-r--r--sw/source/core/access/accframebase.cxx69
-rw-r--r--sw/source/core/access/accframebase.hxx11
-rw-r--r--sw/source/core/access/accnotextframe.cxx87
-rw-r--r--sw/source/core/access/accnotextframe.hxx11
-rw-r--r--sw/source/core/access/acctable.cxx93
-rw-r--r--sw/source/core/access/acctable.hxx17
-rw-r--r--sw/source/core/access/acctextframe.cxx40
-rw-r--r--sw/source/core/access/acctextframe.hxx6
-rw-r--r--sw/source/core/attr/format.cxx20
-rw-r--r--sw/source/core/doc/docchart.cxx8
-rw-r--r--sw/source/core/doc/doclay.cxx6
-rw-r--r--sw/source/core/edit/editsh.cxx6
16 files changed, 346 insertions, 76 deletions
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index 9692f4f6fe77..ddaae27f8f60 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: format.hxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: fme $ $Date: 2002-02-06 16:04:40 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:07:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -157,8 +157,9 @@ public:
inline BOOL IsDefault() const { return DerivedFrom() == 0; }
inline const String& GetName() const { return aFmtName; }
- inline void SetName( const String& rNewName );
- inline void SetName( const sal_Char* pNewName );
+ void SetName( const String& rNewName, sal_Bool bBroadcast=sal_False );
+ inline void SetName( const sal_Char* pNewName,
+ sal_Bool bBroadcast=sal_False);
// zur Abfrage des Attribute Arrays
inline const SwAttrSet& GetAttrSet() const { return aSet; }
@@ -327,15 +328,11 @@ inline const SfxPoolItem& SwFmt::GetAttr( USHORT nWhich,
return aSet.Get( nWhich, bInParents );
}
-inline void SwFmt::SetName( const String& rNewName )
+inline void SwFmt::SetName( const sal_Char* pNewName,
+ sal_Bool bBroadcast )
{
- ASSERT(!IsDefault(), "SetName: Defaultformat" );
- aFmtName = rNewName;
-}
-inline void SwFmt::SetName( const sal_Char* pNewName )
-{
- ASSERT(!IsDefault(), "SetName: Defaultformat" );
- aFmtName.AssignAscii( pNewName );
+ String aTmp( String::CreateFromAscii( pNewName ) );
+ SetName( aTmp, bBroadcast );
}
inline SfxItemState SwFmt::GetItemState( USHORT nWhich, BOOL bSrchInParent,
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 5496818fe939..634c05195b9a 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hintids.hxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: fme $ $Date: 2002-02-06 16:04:40 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:07:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -334,6 +334,8 @@ RES_MSG_BEGIN = RES_FMT_END,
RES_TOXMARK_DELETED,
RES_GRAPHIC_SWAPIN,
RES_FIELD_DELETED,
+ RES_NAME_CHANGED,
+ RES_ALT_TEXT_CHANGED,
RES_MSG_END
};
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 458017fa9675..94cde7fe1632 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hints.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:07:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -324,5 +324,16 @@ public:
const SwNode* GetFoundNode() const { return pFnd; }
};
+class SwStringMsgPoolItem : public SwMsgPoolItem
+{
+ String sStr;
+public:
+
+ const String& GetString() const { return sStr; }
+
+ SwStringMsgPoolItem( USHORT nId, const String& rStr )
+ : SwMsgPoolItem( nId ), sStr( rStr )
+ {}
+};
#endif
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index 5becec6547e3..c7654bcd739d 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ndnotxt.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mib $ $Date: 2001-05-04 08:34:39 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:07:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,7 +108,7 @@ public:
// alternativen Text abfragen/setzen
const String& GetAlternateText() const { return aAlternateText; }
- void SetAlternateText( const String& rTxt ) { aAlternateText = rTxt; }
+ void SetAlternateText( const String& rTxt, sal_Bool bBroadcast=sal_False );
void SetContour( const PolyPolygon *pPoly,
BOOL bAutomatic = FALSE );
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 889f07772916..272926cdbb40 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accframebase.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mib $ $Date: 2002-07-10 16:53:33 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,6 +107,9 @@
#ifndef _FESH_HXX
#include "fesh.hxx"
#endif
+#ifndef _HINTS_HXX
+#include <hints.hxx>
+#endif
#ifndef _ACCMAP_HXX
#include "accmap.hxx"
@@ -208,6 +211,8 @@ SwAccessibleFrameBase::SwAccessibleFrameBase(
vos::OGuard aGuard(Application::GetSolarMutex());
const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
+
SetName( pFrmFmt->GetName() );
bIsSelected = IsSelected();
@@ -282,3 +287,63 @@ sal_Bool SwAccessibleFrameBase::HasCursor()
SwAccessibleFrameBase::~SwAccessibleFrameBase()
{
}
+
+void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+{
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
+ switch( nWhich )
+ {
+ case RES_NAME_CHANGED:
+ if( pFlyFrm )
+ {
+ const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ ASSERT( pFrmFmt == GetRegisteredIn(), "invalid frame" );
+
+ OUString sOldName( GetName() );
+ ASSERT( !pOld ||
+ static_cast < SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
+ "invalid old name" );
+
+ const String& rNewName = pFrmFmt->GetName();
+ SetName( rNewName );
+ ASSERT( !pNew ||
+ static_cast < SwStringMsgPoolItem * >( pNew )->GetString() == rNewName,
+ "invalid new name" );
+
+ if( sOldName != GetName() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACCESSIBLE_NAME_EVENT;
+ aEvent.OldValue <<= sOldName;
+ aEvent.NewValue <<= GetName();
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ break;
+ case RES_OBJECTDYING:
+ if( GetRegisteredIn() ==
+ static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ pRegisteredIn->Remove( this );
+ break;
+
+ case RES_FMT_CHG:
+ if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
+ static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
+ pRegisteredIn->Remove( this );
+ break;
+ default:
+ SwClient::Modify( pOld, pNew );
+ break;
+ }
+}
+
+void SwAccessibleFrameBase::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( GetRegisteredIn() )
+ pRegisteredIn->Remove( this );
+
+ SwAccessibleContext::Dispose( bRecursive );
+}
diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
index f22bb170c1f4..a3e5ec7c4d38 100644
--- a/sw/source/core/access/accframebase.hxx
+++ b/sw/source/core/access/accframebase.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accframebase.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2002-05-16 08:17:47 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,7 +72,7 @@
class SwFlyFrm;
class SwNoTxtNode;
-class SwAccessibleFrameBase : public SwAccessibleContext
+class SwAccessibleFrameBase : public SwAccessibleContext, public SwClient
{
sal_Bool bIsSelected; // protected by base class mutex
@@ -97,7 +97,12 @@ public:
virtual sal_Bool HasCursor(); // required by map to remember that object
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
static sal_uInt8 GetNodeType( const SwFlyFrm *pFlyFrm );
+
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
};
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index 474acaee3e44..0c8693547539 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accnotextframe.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2002-04-18 11:27:43 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,6 +78,9 @@
#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
#include <drafts/com/sun/star/accessibility/AccessibleStateType.hpp>
#endif
+#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <drafts/com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_
#include <unotools/accessiblestatesethelper.hxx>
@@ -124,14 +127,78 @@ const SwNoTxtNode *SwAccessibleNoTextFrame::GetNoTxtNode() const
SwAccessibleNoTextFrame::SwAccessibleNoTextFrame(
SwAccessibleMap *pMap, sal_Int16 nRole,
const SwFlyFrm *pFlyFrm ) :
- SwAccessibleFrameBase( pMap, nRole, pFlyFrm )
+ SwAccessibleFrameBase( pMap, nRole, pFlyFrm ),
+ aDepend( this, const_cast < SwNoTxtNode * >( GetNoTxtNode() ) )
{
+ const SwNoTxtNode *pNd = GetNoTxtNode();
+ if( pNd )
+ sDesc = OUString( pNd->GetAlternateText() );
+ if( !sDesc.getLength() )
+ sDesc = GetName();
}
SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame()
{
}
+void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+{
+ SwAccessibleFrameBase::Modify( pOld, pNew );
+
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ const SwNoTxtNode *pNd = GetNoTxtNode();
+ ASSERT( pNd == aDepend.GetRegisteredIn(), "invalid frame" );
+ switch( nWhich )
+ {
+ case RES_NAME_CHANGED:
+ if( pNd->GetAlternateText().Len() )
+ break;
+ case RES_ALT_TEXT_CHANGED:
+ if( pNd && GetFrm() )
+ {
+ OUString sOldDesc( sDesc );
+
+ const String& rDesc = pNd->GetAlternateText();
+ sDesc = rDesc;
+ if( !sDesc.getLength() )
+ sDesc = GetName();
+
+ if( sDesc != sOldDesc )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACCESSIBLE_DESCRIPTION_EVENT;
+ aEvent.OldValue <<= sOldDesc;
+ aEvent.NewValue <<= sDesc;
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ break;
+ /*
+ case RES_OBJECTDYING:
+ if( aDepend.GetRegisteredIn() ==
+ static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ const_cast < SwModify *>( aDepend.GetRegisteredIn()->Remove( aDepend );
+ break;
+
+ case RES_FMT_CHG:
+ if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
+ static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
+ pRegisteredIn->Remove( this );
+ break;
+ */
+ }
+}
+
+void SwAccessibleNoTextFrame::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( aDepend.GetRegisteredIn() )
+ const_cast < SwModify *>( aDepend.GetRegisteredIn() )->Remove( &aDepend );
+
+ SwAccessibleFrameBase::Dispose( bRecursive );
+}
+
OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException)
{
@@ -139,18 +206,6 @@ OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void)
CHECK_FOR_DEFUNC( XAccessibleContext )
- OUString sDesc;
-
- const SwNoTxtNode *pNd = GetNoTxtNode();
- if( pNd )
- sDesc = OUString( pNd->GetAlternateText() );
- if( !sDesc.getLength() )
- {
- const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm *>( GetFrm() );
- const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
- sDesc = OUString( pFrmFmt->GetName() );
- }
-
return sDesc;
}
@@ -161,7 +216,7 @@ OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void)
//
Any SAL_CALL SwAccessibleNoTextFrame::queryInterface(
- const Type& aType )
+ const ::com::sun::star::uno::Type& aType )
throw (RuntimeException)
{
if( aType ==
diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
index b9ed9536b1fc..431a3d142f57 100644
--- a/sw/source/core/access/accnotextframe.hxx
+++ b/sw/source/core/access/accnotextframe.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accnotextframe.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2002-04-18 11:27:43 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,6 +79,8 @@ class SwNoTxtNode;
class SwAccessibleNoTextFrame : public SwAccessibleFrameBase,
public ::drafts::com::sun::star::accessibility::XAccessibleImage
{
+ SwDepend aDepend;
+ ::rtl::OUString sDesc;
protected:
@@ -91,6 +93,8 @@ public:
SwAccessibleNoTextFrame( SwAccessibleMap *pMap, sal_Int16 nRole,
const SwFlyFrm *pFlyFrm );
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
//===== XAccessibleContext ==============================================
/// Return this object's description.
@@ -127,6 +131,9 @@ public:
virtual sal_Int32 SAL_CALL
getAccessibleImageWidth( )
throw ( ::com::sun::star::uno::RuntimeException );
+
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
};
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index c7cd92f4129e..6d4691c13111 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: acctable.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: mib $ $Date: 2002-07-10 16:53:35 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -115,6 +115,9 @@
#ifndef _VISCRS_HXX
#include "viscrs.hxx"
#endif
+#ifndef _HINTS_HXX
+#include <hints.hxx>
+#endif
#ifndef _ACCFRMOBJSLIST_HXX
#include <accfrmobjslist.hxx>
#endif
@@ -746,7 +749,9 @@ SwAccessibleTable::SwAccessibleTable(
{
vos::OGuard aGuard(Application::GetSolarMutex());
- const String& rName = pTabFrm->GetFmt()->GetName();
+ const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
+ const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
+ const String& rName = pFrmFmt->GetName();
OUStringBuffer aBuffer( rName.Len() + 4 );
aBuffer.append( OUString(rName) );
@@ -754,6 +759,12 @@ SwAccessibleTable::SwAccessibleTable(
aBuffer.append( static_cast<sal_Int32>( pTabFrm->GetPhyPageNum() ) );
SetName( aBuffer.makeStringAndClear() );
+
+ OUString sArg1( static_cast< const SwTabFrm * >( GetFrm() )
+ ->GetFmt()->GetName() );
+ OUString sArg2( GetFormattedPageNumber() );
+
+ sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
}
SwAccessibleTable::~SwAccessibleTable()
@@ -763,7 +774,65 @@ SwAccessibleTable::~SwAccessibleTable()
delete mpTableData;
}
-Any SwAccessibleTable::queryInterface( const Type& rType )
+void SwAccessibleTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+{
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( GetFrm() );
+ switch( nWhich )
+ {
+ case RES_NAME_CHANGED:
+ if( pTabFrm )
+ {
+ const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
+ ASSERT( pFrmFmt == GetRegisteredIn(), "invalid frame" );
+
+ OUString sOldName( GetName() );
+
+ const String& rNewTabName = pFrmFmt->GetName();
+ OUStringBuffer aBuffer( rNewTabName.Len() + 4 );
+ aBuffer.append( OUString(rNewTabName) );
+ aBuffer.append( static_cast<sal_Unicode>( '-' ) );
+ aBuffer.append( static_cast<sal_Int32>( pTabFrm->GetPhyPageNum() ) );
+
+ SetName( aBuffer.makeStringAndClear() );
+ if( sOldName != GetName() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACCESSIBLE_NAME_EVENT;
+ aEvent.OldValue <<= sOldName;
+ aEvent.NewValue <<= GetName();
+ FireAccessibleEvent( aEvent );
+ }
+
+ OUString sOldDesc( sDesc );
+ OUString sArg1( rNewTabName );
+ OUString sArg2( GetFormattedPageNumber() );
+
+ sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
+ if( sDesc != sOldDesc )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACCESSIBLE_DESCRIPTION_EVENT;
+ aEvent.OldValue <<= sOldDesc;
+ aEvent.NewValue <<= sDesc;
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ break;
+
+ case RES_OBJECTDYING:
+ if( GetRegisteredIn() ==
+ static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ pRegisteredIn->Remove( this );
+ break;
+
+ default:
+ SwClient::Modify( pOld, pNew );
+ break;
+ }
+}
+
+Any SwAccessibleTable::queryInterface( const ::com::sun::star::uno::Type& rType )
throw (RuntimeException)
{
Any aRet;
@@ -806,11 +875,7 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleDescription (void)
CHECK_FOR_DEFUNC( XAccessibleContext )
- OUString sArg1( static_cast< const SwTabFrm * >( GetFrm() )
- ->GetFmt()->GetName() );
- OUString sArg2( GetFormattedPageNumber() );
-
- return GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
+ return sDesc;
}
sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowCount()
@@ -1196,6 +1261,16 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
SwAccessibleContext::InvalidatePosOrSize( rOldBox );
}
+void SwAccessibleTable::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( GetRegisteredIn() )
+ pRegisteredIn->Remove( this );
+
+ SwAccessibleContext::Dispose( bRecursive );
+}
+
void SwAccessibleTable::DisposeChild( const SwFrmOrObj& rChildFrmOrObj,
sal_Bool bRecursive )
{
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
index 6746ebb93c74..3be5c17e5c92 100644
--- a/sw/source/core/access/acctable.hxx
+++ b/sw/source/core/access/acctable.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: acctable.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mib $ $Date: 2002-07-10 16:53:35 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,11 +83,13 @@ class SwAccessibleTableEventList_Impl;
class SwTableBox;
class SwAccessibleTable :
- public SwAccessibleContext,
- public ::drafts::com::sun::star::accessibility::XAccessibleTable,
- public ::drafts::com::sun::star::accessibility::XAccessibleSelection
+ public SwAccessibleContext,
+ public ::drafts::com::sun::star::accessibility::XAccessibleTable,
+ public ::drafts::com::sun::star::accessibility::XAccessibleSelection,
+ public SwClient
{
SwAccessibleTableData_Impl *mpTableData; // the table's data, prot by Sol-Mutex
+ ::rtl::OUString sDesc;
const SwSelBoxes *GetSelBoxes() const;
void FireTableChangeEvent( const SwAccessibleTableData_Impl& rTableData );
@@ -119,6 +121,8 @@ public:
SwAccessibleTable( SwAccessibleMap *pMap, const SwTabFrm *pTableFrm );
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
//===== XInterface ======================================================
// (XInterface methods need to be implemented to disambigouate
@@ -238,6 +242,9 @@ public:
// The object has been moved by the layout
virtual void InvalidatePosOrSize( const SwRect& rOldBox );
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
+
virtual void DisposeChild( const SwFrmOrObj& rFrmOrObj, sal_Bool bRecursive );
virtual void InvalidateChildPosOrSize( const SwFrmOrObj& rFrmOrObj,
const SwRect& rFrm );
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index 5b34988c69f2..e42973d22d19 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: acctextframe.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mib $ $Date: 2002-07-09 12:51:33 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,6 +87,9 @@
#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLERELATIONSET_HPP_
#include <drafts/com/sun/star/accessibility/XAccessibleRelationSet.hpp>
#endif
+#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <drafts/com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_
#include <unotools/accessiblestatesethelper.hxx>
@@ -132,6 +135,34 @@ SwAccessibleTextFrame::~SwAccessibleTextFrame()
{
}
+void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+{
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
+ switch( nWhich )
+ {
+ case RES_NAME_CHANGED:
+ if( pFlyFrm )
+ {
+ OUString sOldDesc( GetName() );
+ SwAccessibleFrameBase::Modify( pOld, pNew );
+
+ if( sOldDesc != GetName() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACCESSIBLE_DESCRIPTION_EVENT;
+ aEvent.OldValue <<= sOldDesc;
+ aEvent.NewValue <<= GetName();
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ break;
+ default:
+ SwAccessibleFrameBase::Modify( pOld, pNew );
+ break;
+ }
+}
+
OUString SAL_CALL SwAccessibleTextFrame::getAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException)
{
@@ -139,10 +170,7 @@ OUString SAL_CALL SwAccessibleTextFrame::getAccessibleDescription (void)
CHECK_FOR_DEFUNC( XAccessibleContext )
- const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm *>( GetFrm() );
- const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
-
- return OUString( pFrmFmt->GetName() );
+ return GetName();
}
diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx
index 183548a61dc1..4db7fa1e4715 100644
--- a/sw/source/core/access/acctextframe.hxx
+++ b/sw/source/core/access/acctextframe.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: acctextframe.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dvo $ $Date: 2002-04-24 15:27:21 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:14:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,8 @@ public:
SwAccessibleTextFrame( SwAccessibleMap *pMap, const SwFlyFrm *pFlyFrm );
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
//===== XAccessibleContext ==============================================
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 336ae85ded36..55e560c5dbee 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: format.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:15 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:13:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -226,6 +226,22 @@ SwFmt &SwFmt::operator=(const SwFmt& rFmt)
return *this;
}
+void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast )
+{
+ ASSERT(!IsDefault(), "SetName: Defaultformat" );
+ if( bBroadcast )
+ {
+ SwStringMsgPoolItem aOld( RES_NAME_CHANGED, aFmtName );
+ SwStringMsgPoolItem aNew( RES_NAME_CHANGED, rNewName );
+ aFmtName = rNewName;
+ Modify( &aOld, &aNew );
+ }
+ else
+ {
+ aFmtName = rNewName;
+ }
+}
+
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* diese Funktion wird in jedem Copy-Ctor gerufen, damit die
* Attribute kopiert werden. Diese koennen erst kopiert werden,
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index ccb2b2cbd989..46c37ef45cfb 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docchart.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: ama $ $Date: 2001-07-05 10:11:52 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:12:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -449,9 +449,9 @@ void SwDoc::SetTableName( SwFrmFmt& rTblFmt, const String &rNewName )
}
if( !bNameFound )
- rTblFmt.SetName( rNewName );
+ rTblFmt.SetName( rNewName, sal_True );
else
- rTblFmt.SetName( GetUniqueTblName() );
+ rTblFmt.SetName( GetUniqueTblName(), sal_True );
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 1fb3c77e0eb0..cac250512e4e 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: doclay.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fme $ $Date: 2002-04-18 08:19:36 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:12:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1802,7 +1802,7 @@ void SwDoc::SetFlyName( SwFlyFrmFmt& rFmt, const String& rName )
}
sName = ::lcl_GetUniqueFlyName( this, nTyp );
}
- rFmt.SetName( sName );
+ rFmt.SetName( sName, sal_True );
}
void SwDoc::SetAllUniqueFlyNames()
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index cd6f86fc17e0..1d6a0670fd2a 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: editsh.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: jp $ $Date: 2002-03-18 14:59:22 $
+ * last change: $Author: mib $ $Date: 2002-07-24 13:11:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -396,7 +396,7 @@ void SwEditShell::SetAlternateText( const String& rTxt )
SwPaM* pCrsr = GetCrsr();
SwNoTxtNode* pNd;
if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) )
- pNd->SetAlternateText( rTxt );
+ pNd->SetAlternateText( rTxt, sal_True );
}