convert SFX_HINT to scoped enum

Notes

(*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a
dynamic_cast check.

(*) In SC, removed the hint id field from ScIndexHint, no point in
storing the hint id twice

(*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no
point in storing two different hint ids

(*) In some cases, multiple #define's used to map to the same SFX_HINT
value (notably the SFX_HINT_USER* values). I made all of those separate
values.

Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5
Reviewed-on: https://gerrit.libreoffice.org/31751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2016-12-08 10:26:01 +02:00
parent 20475c78db
commit a66731982e
251 changed files with 1003 additions and 1096 deletions

View File

@ -1533,22 +1533,22 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
::TextHint const & rTextHint = *pTextHint; ::TextHint const & rTextHint = *pTextHint;
switch (rTextHint.GetId()) switch (rTextHint.GetId())
{ {
case TEXT_HINT_PARAINSERTED: case SfxHintId::TextParaInserted:
case TEXT_HINT_PARAREMOVED: case SfxHintId::TextParaRemoved:
// TEXT_HINT_PARAINSERTED and TEXT_HINT_PARAREMOVED are sent at // SfxHintId::TextParaInserted and SfxHintId::TextParaRemoved are sent at
// "unsafe" times (when the text engine has not yet re-formatted its // "unsafe" times (when the text engine has not yet re-formatted its
// content), so that for example calling ::TextEngine::GetTextHeight // content), so that for example calling ::TextEngine::GetTextHeight
// from within the code that handles TEXT_HINT_PARAINSERTED causes // from within the code that handles SfxHintId::TextParaInserted causes
// trouble within the text engine. Therefore, these hints are just // trouble within the text engine. Therefore, these hints are just
// buffered until a following ::TextEngine::FormatDoc causes a // buffered until a following ::TextEngine::FormatDoc causes a
// TEXT_HINT_TEXTFORMATTED to come in: // SfxHintId::TextFormatted to come in:
case TEXT_HINT_FORMATPARA: case SfxHintId::TextFormatPara:
// ::TextEngine::FormatDoc sends a sequence of // ::TextEngine::FormatDoc sends a sequence of
// TEXT_HINT_FORMATPARAs, followed by an optional // SfxHintId::TextFormatParas, followed by an optional
// TEXT_HINT_TEXTHEIGHTCHANGED, followed in all cases by one // SfxHintId::TextHeightChanged, followed in all cases by one
// TEXT_HINT_TEXTFORMATTED. Only the TEXT_HINT_FORMATPARAs contain // SfxHintId::TextFormatted. Only the SfxHintId::TextFormatParas contain
// the numbers of the affected paragraphs, but they are sent // the numbers of the affected paragraphs, but they are sent
// before the changes are applied. Therefore, TEXT_HINT_FORMATPARAs // before the changes are applied. Therefore, SfxHintId::TextFormatParas
// are just buffered until another hint comes in: // are just buffered until another hint comes in:
{ {
::osl::MutexGuard aInternalGuard(GetMutex()); ::osl::MutexGuard aInternalGuard(GetMutex());
@ -1558,9 +1558,9 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
m_aParagraphNotifications.push(rTextHint); m_aParagraphNotifications.push(rTextHint);
break; break;
} }
case TEXT_HINT_TEXTFORMATTED: case SfxHintId::TextFormatted:
case TEXT_HINT_TEXTHEIGHTCHANGED: case SfxHintId::TextHeightChanged:
case TEXT_HINT_MODIFIED: case SfxHintId::TextModified:
{ {
::osl::MutexGuard aInternalGuard(GetMutex()); ::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive()) if (!isAlive())
@ -1568,7 +1568,7 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
handleParagraphNotifications(); handleParagraphNotifications();
break; break;
} }
case TEXT_HINT_VIEWSCROLLED: case SfxHintId::TextViewScrolled:
{ {
::osl::MutexGuard aInternalGuard(GetMutex()); ::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive()) if (!isAlive())
@ -1594,8 +1594,8 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
} }
break; break;
} }
case TEXT_HINT_VIEWSELECTIONCHANGED: case SfxHintId::TextViewSelectionChanged:
case TEXT_HINT_VIEWCARETCHANGED: case SfxHintId::TextViewCaretChanged:
{ {
::osl::MutexGuard aInternalGuard(GetMutex()); ::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive()) if (!isAlive())
@ -1607,20 +1607,21 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
} }
else else
{ {
// TEXT_HINT_VIEWSELECTIONCHANGED is sometimes sent at // SfxHintId::TextViewSelectionChanged is sometimes sent at
// "unsafe" times (when the text engine has not yet re- // "unsafe" times (when the text engine has not yet re-
// formatted its content), so that for example calling // formatted its content), so that for example calling
// ::TextEngine::GetTextHeight from within the code that // ::TextEngine::GetTextHeight from within the code that
// handles a previous TEXT_HINT_PARAINSERTED causes // handles a previous SfxHintId::TextParaInserted causes
// trouble within the text engine. Therefore, these // trouble within the text engine. Therefore, these
// hints are just buffered (along with // hints are just buffered (along with
// TEXT_HINT_PARAINSERTED/REMOVED/FORMATPARA) until a // SfxHintId::TextParaInserted/REMOVED/FORMATPARA) until a
// following ::TextEngine::FormatDoc causes a // following ::TextEngine::FormatDoc causes a
// TEXT_HINT_TEXTFORMATTED to come in: // SfxHintId::TextFormatted to come in:
m_bSelectionChangedNotification = true; m_bSelectionChangedNotification = true;
} }
break; break;
} }
default: break;
} }
} }
} }
@ -1875,10 +1876,10 @@ void Document::handleParagraphNotifications()
m_aParagraphNotifications.pop(); m_aParagraphNotifications.pop();
switch (aHint.GetId()) switch (aHint.GetId())
{ {
case TEXT_HINT_PARAINSERTED: case SfxHintId::TextParaInserted:
{ {
::sal_uLong n = aHint.GetValue(); ::sal_uLong n = aHint.GetValue();
assert(n <= m_xParagraphs->size() && "bad TEXT_HINT_PARAINSERTED event"); assert(n <= m_xParagraphs->size() && "bad SfxHintId::TextParaInserted event");
// Save the values of old iterators (the iterators themselves // Save the values of old iterators (the iterators themselves
// will get invalidated), and adjust the old values so that they // will get invalidated), and adjust the old values so that they
@ -1926,7 +1927,7 @@ void Document::handleParagraphNotifications()
m_xParagraphs->begin() + nOldVisibleEnd, aIns); m_xParagraphs->begin() + nOldVisibleEnd, aIns);
break; break;
} }
case TEXT_HINT_PARAREMOVED: case SfxHintId::TextParaRemoved:
{ {
::sal_uLong n = aHint.GetValue(); ::sal_uLong n = aHint.GetValue();
if (n == TEXT_PARA_ALL) if (n == TEXT_PARA_ALL)
@ -1951,7 +1952,7 @@ void Document::handleParagraphNotifications()
} }
else else
{ {
assert(n < m_xParagraphs->size() && "Bad TEXT_HINT_PARAREMOVED event"); assert(n < m_xParagraphs->size() && "Bad SfxHintId::TextParaRemoved event");
Paragraphs::iterator aIt(m_xParagraphs->begin() + n); Paragraphs::iterator aIt(m_xParagraphs->begin() + n);
// numeric overflow cannot occur // numeric overflow cannot occur
@ -2040,10 +2041,10 @@ void Document::handleParagraphNotifications()
} }
break; break;
} }
case TEXT_HINT_FORMATPARA: case SfxHintId::TextFormatPara:
{ {
::sal_uLong n = aHint.GetValue(); ::sal_uLong n = aHint.GetValue();
assert(n < m_xParagraphs->size() && "Bad TEXT_HINT_FORMATPARA event"); assert(n < m_xParagraphs->size() && "Bad SfxHintId::TextFormatPara event");
(*m_xParagraphs)[static_cast< Paragraphs::size_type >(n)]. (*m_xParagraphs)[static_cast< Paragraphs::size_type >(n)].
changeHeight(static_cast< ::sal_Int32 >( changeHeight(static_cast< ::sal_Int32 >(
@ -2208,7 +2209,7 @@ void Document::handleSelectionChangeNotification()
::TextSelection const & rSelection = m_rView.GetSelection(); ::TextSelection const & rSelection = m_rView.GetSelection();
assert(rSelection.GetStart().GetPara() < m_xParagraphs->size() && assert(rSelection.GetStart().GetPara() < m_xParagraphs->size() &&
rSelection.GetEnd().GetPara() < m_xParagraphs->size() && rSelection.GetEnd().GetPara() < m_xParagraphs->size() &&
"bad TEXT_HINT_VIEWSELECTIONCHANGED event"); "bad SfxHintId::TextViewSelectionChanged event");
::sal_Int32 nNewFirstPara ::sal_Int32 nNewFirstPara
= static_cast< ::sal_Int32 >(rSelection.GetStart().GetPara()); = static_cast< ::sal_Int32 >(rSelection.GetStart().GetPara());
::sal_Int32 nNewFirstPos = rSelection.GetStart().GetIndex(); ::sal_Int32 nNewFirstPos = rSelection.GetStart().GetIndex();

View File

@ -1038,7 +1038,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
if (TextHint const* pTextHint = dynamic_cast<TextHint const*>(&rHint)) if (TextHint const* pTextHint = dynamic_cast<TextHint const*>(&rHint))
{ {
TextHint const& rTextHint = *pTextHint; TextHint const& rTextHint = *pTextHint;
if( rTextHint.GetId() == TEXT_HINT_VIEWSCROLLED ) if( rTextHint.GetId() == SfxHintId::TextViewScrolled )
{ {
if ( rModulWindow.GetHScrollBar() ) if ( rModulWindow.GetHScrollBar() )
rModulWindow.GetHScrollBar()->SetThumbPos( pEditView->GetStartDocPos().X() ); rModulWindow.GetHScrollBar()->SetThumbPos( pEditView->GetStartDocPos().X() );
@ -1048,7 +1048,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
rModulWindow.GetLineNumberWindow().DoScroll rModulWindow.GetLineNumberWindow().DoScroll
( rModulWindow.GetLineNumberWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() ); ( rModulWindow.GetLineNumberWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() );
} }
else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED ) else if( rTextHint.GetId() == SfxHintId::TextHeightChanged )
{ {
if ( pEditView->GetStartDocPos().Y() ) if ( pEditView->GetStartDocPos().Y() )
{ {
@ -1062,7 +1062,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
SetScrollBarRanges(); SetScrollBarRanges();
} }
else if( rTextHint.GetId() == TEXT_HINT_TEXTFORMATTED ) else if( rTextHint.GetId() == SfxHintId::TextFormatted )
{ {
if ( rModulWindow.GetHScrollBar() ) if ( rModulWindow.GetHScrollBar() )
{ {
@ -1079,20 +1079,20 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
if ( nCurTextWidth != nPrevTextWidth ) if ( nCurTextWidth != nPrevTextWidth )
SetScrollBarRanges(); SetScrollBarRanges();
} }
else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED ) else if( rTextHint.GetId() == SfxHintId::TextParaInserted )
{ {
ParagraphInsertedDeleted( rTextHint.GetValue(), true ); ParagraphInsertedDeleted( rTextHint.GetValue(), true );
DoDelayedSyntaxHighlight( rTextHint.GetValue() ); DoDelayedSyntaxHighlight( rTextHint.GetValue() );
} }
else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED ) else if( rTextHint.GetId() == SfxHintId::TextParaRemoved )
{ {
ParagraphInsertedDeleted( rTextHint.GetValue(), false ); ParagraphInsertedDeleted( rTextHint.GetValue(), false );
} }
else if( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED ) else if( rTextHint.GetId() == SfxHintId::TextParaContentChanged )
{ {
DoDelayedSyntaxHighlight( rTextHint.GetValue() ); DoDelayedSyntaxHighlight( rTextHint.GetValue() );
} }
else if( rTextHint.GetId() == TEXT_HINT_VIEWSELECTIONCHANGED ) else if( rTextHint.GetId() == SfxHintId::TextViewSelectionChanged )
{ {
if (SfxBindings* pBindings = GetBindingsPtr()) if (SfxBindings* pBindings = GetBindingsPtr())
{ {

View File

@ -475,21 +475,17 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
if (GetShell()) if (GetShell())
{ {
switch (rHint.GetId()) if (rHint.GetId() == SfxHintId::Dying)
{
case SFX_HINT_DYING:
{ {
EndListening( rBC, true /* log off all */ ); EndListening( rBC, true /* log off all */ );
aObjectCatalog->UpdateEntries(); aObjectCatalog->UpdateEntries();
} }
break;
}
if (SbxHint const* pSbxHint = dynamic_cast<SbxHint const*>(&rHint)) if (SbxHint const* pSbxHint = dynamic_cast<SbxHint const*>(&rHint))
{ {
const sal_uInt32 nHintId = pSbxHint->GetId(); const SfxHintId nHintId = pSbxHint->GetId();
if ( ( nHintId == SBX_HINT_BASICSTART ) || if ( ( nHintId == SfxHintId::BasicStart ) ||
( nHintId == SBX_HINT_BASICSTOP ) ) ( nHintId == SfxHintId::BasicStop ) )
{ {
if (SfxBindings* pBindings = GetBindingsPtr()) if (SfxBindings* pBindings = GetBindingsPtr())
{ {
@ -515,7 +511,7 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
pBindings->Update( SID_BASICLOAD ); pBindings->Update( SID_BASICLOAD );
} }
if ( nHintId == SBX_HINT_BASICSTOP ) if ( nHintId == SfxHintId::BasicStop )
{ {
// not only at error/break or explicit stoppage, // not only at error/break or explicit stoppage,
// if the update is turned off due to a programming bug // if the update is turned off due to a programming bug
@ -533,7 +529,7 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it) for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
{ {
BaseWindow* pWin = it->second; BaseWindow* pWin = it->second;
if ( nHintId == SBX_HINT_BASICSTART ) if ( nHintId == SfxHintId::BasicStart )
pWin->BasicStarted(); pWin->BasicStarted();
else else
pWin->BasicStopped(); pWin->BasicStopped();

View File

@ -577,7 +577,7 @@ namespace basic
void ImplRepository::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint ) void ImplRepository::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
{ {
if ( _rHint.GetId() != SFX_HINT_DYING ) if ( _rHint.GetId() != SfxHintId::Dying )
// not interested in // not interested in
return; return;

View File

@ -849,7 +849,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
BasicManager::~BasicManager() BasicManager::~BasicManager()
{ {
// Notify listener if something needs to be saved // Notify listener if something needs to be saved
Broadcast( SfxHint( SFX_HINT_DYING) ); Broadcast( SfxHint( SfxHintId::Dying) );
} }
void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager ) void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager )

View File

@ -2061,10 +2061,10 @@ void BasicCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
if( p ) if( p )
{ {
const sal_uInt32 nId = p->GetId(); const SfxHintId nId = p->GetId();
bool bRead = nId == SBX_HINT_DATAWANTED; bool bRead = nId == SfxHintId::BasicDataWanted;
bool bWrite = nId == SBX_HINT_DATACHANGED; bool bWrite = nId == SfxHintId::BasicDataChanged;
bool bRequestInfo = nId == SBX_HINT_INFOWANTED; bool bRequestInfo = nId == SfxHintId::BasicInfoWanted;
SbxVariable* pVar = p->GetVar(); SbxVariable* pVar = p->GetVar();
SbxArray* pArg = pVar->GetParameters(); SbxArray* pArg = pVar->GetParameters();
OUString aVarName( pVar->GetName() ); OUString aVarName( pVar->GetName() );

View File

@ -1999,7 +1999,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pProp ) if( pProp )
{ {
bool bInvocation = pProp->isInvocationBased(); bool bInvocation = pProp->isInvocationBased();
if( pHint->GetId() == SBX_HINT_DATAWANTED ) if( pHint->GetId() == SfxHintId::BasicDataWanted )
{ {
// Test-Properties // Test-Properties
sal_Int32 nId = pProp->nId; sal_Int32 nId = pProp->nId;
@ -2102,7 +2102,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
} }
} }
} }
else if( pHint->GetId() == SBX_HINT_DATACHANGED ) else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{ {
if( !bInvocation && mxUnoAccess.is() ) if( !bInvocation && mxUnoAccess.is() )
{ {
@ -2160,7 +2160,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else if( pMeth ) else if( pMeth )
{ {
bool bInvocation = pMeth->isInvocationBased(); bool bInvocation = pMeth->isInvocationBased();
if( pHint->GetId() == SBX_HINT_DATAWANTED ) if( pHint->GetId() == SfxHintId::BasicDataWanted )
{ {
// number of Parameter -1 because of Param0 == this // number of Parameter -1 because of Param0 == this
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0; sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
@ -3560,7 +3560,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pParams = pVar->GetParameters(); SbxArray* pParams = pVar->GetParameters();
SbUnoServiceCtor* pUnoCtor = dynamic_cast<SbUnoServiceCtor*>( pVar ); SbUnoServiceCtor* pUnoCtor = dynamic_cast<SbUnoServiceCtor*>( pVar );
if( pUnoCtor && pHint->GetId() == SBX_HINT_DATAWANTED ) if( pUnoCtor && pHint->GetId() == SfxHintId::BasicDataWanted )
{ {
// Parameter count -1 because of Param0 == this // Parameter count -1 because of Param0 == this
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0; sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
@ -4912,7 +4912,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
StructFieldInfo::iterator it = maFields.find( pProp->GetName() ); StructFieldInfo::iterator it = maFields.find( pProp->GetName() );
// handle get/set of members of struct // handle get/set of members of struct
if( pHint->GetId() == SBX_HINT_DATAWANTED ) if( pHint->GetId() == SfxHintId::BasicDataWanted )
{ {
// Test-Properties // Test-Properties
sal_Int32 nId = pProp->nId; sal_Int32 nId = pProp->nId;
@ -4957,7 +4957,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else else
StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND ); StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND );
} }
else if( pHint->GetId() == SBX_HINT_DATACHANGED ) else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{ {
if ( it != maFields.end() ) if ( it != maFields.end() )
{ {

View File

@ -318,7 +318,7 @@ DocObjectWrapper::getValue( const OUString& aPropertyName ) throw (UnknownProper
SbxVariable* pProp = pProperty.get(); SbxVariable* pProp = pProperty.get();
if ( pProp->GetType() == SbxEMPTY ) if ( pProp->GetType() == SbxEMPTY )
pProperty->Broadcast( SBX_HINT_DATAWANTED ); pProperty->Broadcast( SfxHintId::BasicDataWanted );
Any aRet = sbxToUnoValue( pProp ); Any aRet = sbxToUnoValue( pProp );
return aRet; return aRet;
@ -718,7 +718,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pProcProperty ) if( pProcProperty )
{ {
if( pHint->GetId() == SBX_HINT_DATAWANTED ) if( pHint->GetId() == SfxHintId::BasicDataWanted )
{ {
OUString aProcName = "Property Get " OUString aProcName = "Property Get "
+ pProcProperty->GetName(); + pProcProperty->GetName();
@ -753,7 +753,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
pVar->Put( aVals ); pVar->Put( aVals );
} }
} }
else if( pHint->GetId() == SBX_HINT_DATACHANGED ) else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{ {
SbxVariable* pMethVar = nullptr; SbxVariable* pMethVar = nullptr;
@ -794,7 +794,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
} }
else if( pMeth ) else if( pMeth )
{ {
if( pHint->GetId() == SBX_HINT_DATAWANTED ) if( pHint->GetId() == SfxHintId::BasicDataWanted )
{ {
if( pMeth->bInvalid && !Compile() ) if( pMeth->bInvalid && !Compile() )
{ {
@ -817,8 +817,8 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// side effects when using name as variable implicitly // side effects when using name as variable implicitly
bool bForwardToSbxObject = true; bool bForwardToSbxObject = true;
const sal_uInt32 nId = pHint->GetId(); const SfxHintId nId = pHint->GetId();
if( (nId == SBX_HINT_DATAWANTED || nId == SBX_HINT_DATACHANGED) && if( (nId == SfxHintId::BasicDataWanted || nId == SfxHintId::BasicDataChanged) &&
pVar->GetName().equalsIgnoreAsciiCase( "name" ) ) pVar->GetName().equalsIgnoreAsciiCase( "name" ) )
{ {
bForwardToSbxObject = false; bForwardToSbxObject = false;
@ -929,7 +929,7 @@ void SbModule::SetSource32( const OUString& r )
// Broadcast of a hint to all Basics // Broadcast of a hint to all Basics
static void SendHint_( SbxObject* pObj, sal_uInt32 nId, SbMethod* p ) static void SendHint_( SbxObject* pObj, SfxHintId nId, SbMethod* p )
{ {
// Self a BASIC? // Self a BASIC?
if( dynamic_cast<const StarBASIC *>(pObj) != nullptr && pObj->IsBroadcaster() ) if( dynamic_cast<const StarBASIC *>(pObj) != nullptr && pObj->IsBroadcaster() )
@ -944,7 +944,7 @@ static void SendHint_( SbxObject* pObj, sal_uInt32 nId, SbMethod* p )
} }
} }
static void SendHint( SbxObject* pObj, sal_uInt32 nId, SbMethod* p ) static void SendHint( SbxObject* pObj, SfxHintId nId, SbMethod* p )
{ {
while( pObj->GetParent() ) while( pObj->GetParent() )
pObj = pObj->GetParent(); pObj = pObj->GetParent();
@ -1120,7 +1120,7 @@ void SbModule::Run( SbMethod* pMeth )
{ {
if( bDelInst ) if( bDelInst )
{ {
SendHint( GetParent(), SBX_HINT_BASICSTART, pMeth ); SendHint( GetParent(), SfxHintId::BasicStart, pMeth );
// 1996-10-16: #31460 New concept for StepInto/Over/Out // 1996-10-16: #31460 New concept for StepInto/Over/Out
// For an explanation see runtime.cxx at SbiInstance::CalcBreakCallLevel() // For an explanation see runtime.cxx at SbiInstance::CalcBreakCallLevel()
@ -1186,7 +1186,7 @@ void SbModule::Run( SbMethod* pMeth )
// #i30690 // #i30690
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
SendHint( GetParent(), SBX_HINT_BASICSTOP, pMeth ); SendHint( GetParent(), SfxHintId::BasicStop, pMeth );
GlobalRunDeInit(); GlobalRunDeInit();
@ -1847,7 +1847,7 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
{ {
bDone = true; bDone = true;
if( pHint->GetId() == SBX_HINT_DATAWANTED ) if( pHint->GetId() == SfxHintId::BasicDataWanted )
{ {
OUString aProcName = "Property Get " OUString aProcName = "Property Get "
+ pProcProperty->GetName(); + pProcProperty->GetName();
@ -1882,7 +1882,7 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
pVar->Put( aVals ); pVar->Put( aVals );
} }
} }
else if( pHint->GetId() == SBX_HINT_DATACHANGED ) else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{ {
SbxVariable* pMeth = nullptr; SbxVariable* pMeth = nullptr;
@ -2101,16 +2101,16 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller )
// #100883 Own Broadcast for SbMethod // #100883 Own Broadcast for SbMethod
void SbMethod::Broadcast( sal_uInt32 nHintId ) void SbMethod::Broadcast( SfxHintId nHintId )
{ {
if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) ) if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) )
{ {
// Because the method could be called from outside, test here once again // Because the method could be called from outside, test here once again
// the authorisation // the authorisation
if( nHintId & SBX_HINT_DATAWANTED ) if( nHintId == SfxHintId::BasicDataWanted )
if( !CanRead() ) if( !CanRead() )
return; return;
if( nHintId & SBX_HINT_DATACHANGED ) if( nHintId == SfxHintId::BasicDataChanged )
if( !CanWrite() ) if( !CanWrite() )
return; return;

View File

@ -2610,7 +2610,7 @@ RTLFUNC(IsEmpty)
} }
if ( pVar ) if ( pVar )
{ {
pVar->Broadcast( SBX_HINT_DATAWANTED ); pVar->Broadcast( SfxHintId::BasicDataWanted );
rPar.Get( 0 )->PutBool( pVar->IsEmpty() ); rPar.Get( 0 )->PutBool( pVar->IsEmpty() );
} }
else else

View File

@ -1019,13 +1019,13 @@ void SbiRuntime::TOSMakeTemp()
SbxVariable* p = refExprStk->Get( nExprLvl - 1 ); SbxVariable* p = refExprStk->Get( nExprLvl - 1 );
if ( p->GetType() == SbxEMPTY ) if ( p->GetType() == SbxEMPTY )
{ {
p->Broadcast( SBX_HINT_DATAWANTED ); p->Broadcast( SfxHintId::BasicDataWanted );
} }
SbxVariable* pDflt = nullptr; SbxVariable* pDflt = nullptr;
if ( bVBAEnabled && ( p->GetType() == SbxOBJECT || p->GetType() == SbxVARIANT ) && ((pDflt = getDefaultProp(p)) != nullptr) ) if ( bVBAEnabled && ( p->GetType() == SbxOBJECT || p->GetType() == SbxVARIANT ) && ((pDflt = getDefaultProp(p)) != nullptr) )
{ {
pDflt->Broadcast( SBX_HINT_DATAWANTED ); pDflt->Broadcast( SfxHintId::BasicDataWanted );
// replacing new p on stack causes object pointed by // replacing new p on stack causes object pointed by
// pDft->pParent to be deleted, when p2->Compute() is // pDft->pParent to be deleted, when p2->Compute() is
// called below pParent is accessed (but it's deleted) // called below pParent is accessed (but it's deleted)
@ -1301,12 +1301,12 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
SbxDataType p2Type = p2->GetType(); SbxDataType p2Type = p2->GetType();
if ( p1Type == SbxEMPTY ) if ( p1Type == SbxEMPTY )
{ {
p1->Broadcast( SBX_HINT_DATAWANTED ); p1->Broadcast( SfxHintId::BasicDataWanted );
p1Type = p1->GetType(); p1Type = p1->GetType();
} }
if ( p2Type == SbxEMPTY ) if ( p2Type == SbxEMPTY )
{ {
p2->Broadcast( SBX_HINT_DATAWANTED ); p2->Broadcast( SfxHintId::BasicDataWanted );
p2Type = p2->GetType(); p2Type = p2->GetType();
} }
if ( p1Type == p2Type ) if ( p1Type == p2Type )
@ -1322,13 +1322,13 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
if ( pDflt ) if ( pDflt )
{ {
p1 = pDflt; p1 = pDflt;
p1->Broadcast( SBX_HINT_DATAWANTED ); p1->Broadcast( SfxHintId::BasicDataWanted );
} }
pDflt = getDefaultProp( p2.get() ); pDflt = getDefaultProp( p2.get() );
if ( pDflt ) if ( pDflt )
{ {
p2 = pDflt; p2 = pDflt;
p2->Broadcast( SBX_HINT_DATAWANTED ); p2->Broadcast( SfxHintId::BasicDataWanted );
} }
} }
@ -1543,12 +1543,12 @@ void SbiRuntime::StepIS()
SbxDataType eType2 = refVar2->GetType(); SbxDataType eType2 = refVar2->GetType();
if ( eType1 == SbxEMPTY ) if ( eType1 == SbxEMPTY )
{ {
refVar1->Broadcast( SBX_HINT_DATAWANTED ); refVar1->Broadcast( SfxHintId::BasicDataWanted );
eType1 = refVar1->GetType(); eType1 = refVar1->GetType();
} }
if ( eType2 == SbxEMPTY ) if ( eType2 == SbxEMPTY )
{ {
refVar2->Broadcast( SBX_HINT_DATAWANTED ); refVar2->Broadcast( SfxHintId::BasicDataWanted );
eType2 = refVar2->GetType(); eType2 = refVar2->GetType();
} }
@ -1568,7 +1568,7 @@ void SbiRuntime::StepIS()
void SbiRuntime::StepGET() void SbiRuntime::StepGET()
{ {
SbxVariable* p = GetTOS(); SbxVariable* p = GetTOS();
p->Broadcast( SBX_HINT_DATAWANTED ); p->Broadcast( SfxHintId::BasicDataWanted );
} }
// #67607 copy Uno-Structs // #67607 copy Uno-Structs
@ -1672,7 +1672,7 @@ void SbiRuntime::StepPUT()
// aren't dealt with if the object is a member of some parent object // aren't dealt with if the object is a member of some parent object
bool bObjAssign = false; bool bObjAssign = false;
if ( refVar->GetType() == SbxEMPTY ) if ( refVar->GetType() == SbxEMPTY )
refVar->Broadcast( SBX_HINT_DATAWANTED ); refVar->Broadcast( SfxHintId::BasicDataWanted );
if ( refVar->GetType() == SbxOBJECT ) if ( refVar->GetType() == SbxOBJECT )
{ {
if ( dynamic_cast<const SbxMethod *>(refVar.get()) != nullptr || ! refVar->GetParent() ) if ( dynamic_cast<const SbxMethod *>(refVar.get()) != nullptr || ! refVar->GetParent() )
@ -2806,7 +2806,7 @@ void SbiRuntime::StepARGN( sal_uInt32 nOp1 )
{ {
// named variables ( that are Any especially properties ) can be empty at this point and need a broadcast // named variables ( that are Any especially properties ) can be empty at this point and need a broadcast
if ( pVal->GetType() == SbxEMPTY ) if ( pVal->GetType() == SbxEMPTY )
pVal->Broadcast( SBX_HINT_DATAWANTED ); pVal->Broadcast( SfxHintId::BasicDataWanted );
// evaluate methods and properties! // evaluate methods and properties!
SbxVariable* pRes = new SbxVariable( *pVal ); SbxVariable* pRes = new SbxVariable( *pVal );
pVal = pRes; pVal = pRes;
@ -3862,7 +3862,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
SbxVariable* pDflt = getDefaultProp( pElem ); SbxVariable* pDflt = getDefaultProp( pElem );
if ( pDflt ) if ( pDflt )
{ {
pDflt->Broadcast( SBX_HINT_DATAWANTED ); pDflt->Broadcast( SfxHintId::BasicDataWanted );
SbxBaseRef pDfltObj = pDflt->GetObject(); SbxBaseRef pDfltObj = pDflt->GetObject();
if( pDfltObj.Is() ) if( pDfltObj.Is() )
{ {

View File

@ -824,15 +824,15 @@ void SbiStdObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const sal_uInt16 nCallId = static_cast<sal_uInt16>(pVar->GetUserData()); const sal_uInt16 nCallId = static_cast<sal_uInt16>(pVar->GetUserData());
if( nCallId ) if( nCallId )
{ {
const sal_uInt32 t = pHint->GetId(); const SfxHintId t = pHint->GetId();
if( t == SBX_HINT_INFOWANTED ) if( t == SfxHintId::BasicInfoWanted )
pVar->SetInfo( GetInfo( static_cast<short>(pVar->GetUserData()) ) ); pVar->SetInfo( GetInfo( static_cast<short>(pVar->GetUserData()) ) );
else else
{ {
bool bWrite = false; bool bWrite = false;
if( t == SBX_HINT_DATACHANGED ) if( t == SfxHintId::BasicDataChanged )
bWrite = true; bWrite = true;
if( t == SBX_HINT_DATAWANTED || bWrite ) if( t == SfxHintId::BasicDataWanted || bWrite )
{ {
RtlCall p = aMethods[ nCallId-1 ].pFunc; RtlCall p = aMethods[ nCallId-1 ].pFunc;
SbxArrayRef rPar( pPar_ ); SbxArrayRef rPar( pPar_ );

View File

@ -134,7 +134,7 @@ void SbStdPicture::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pHint ) if( pHint )
{ {
if( pHint->GetId() == SBX_HINT_INFOWANTED ) if( pHint->GetId() == SfxHintId::BasicInfoWanted )
{ {
SbxObject::Notify( rBC, rHint ); SbxObject::Notify( rBC, rHint );
return; return;
@ -143,7 +143,7 @@ void SbStdPicture::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters(); SbxArray* pPar_ = pVar->GetParameters();
const sal_uInt32 nWhich = pVar->GetUserData(); const sal_uInt32 nWhich = pVar->GetUserData();
bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; bool bWrite = pHint->GetId() == SfxHintId::BasicDataChanged;
// Propteries // Propteries
switch( nWhich ) switch( nWhich )
@ -252,7 +252,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pHint ) if( pHint )
{ {
if( pHint->GetId() == SBX_HINT_INFOWANTED ) if( pHint->GetId() == SfxHintId::BasicInfoWanted )
{ {
SbxObject::Notify( rBC, rHint ); SbxObject::Notify( rBC, rHint );
return; return;
@ -261,7 +261,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters(); SbxArray* pPar_ = pVar->GetParameters();
const sal_uInt32 nWhich = pVar->GetUserData(); const sal_uInt32 nWhich = pVar->GetUserData();
bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; bool bWrite = pHint->GetId() == SfxHintId::BasicDataChanged;
// Propteries // Propteries
switch( nWhich ) switch( nWhich )
@ -407,7 +407,7 @@ void SbStdClipboard::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pHint ) if( pHint )
{ {
if( pHint->GetId() == SBX_HINT_INFOWANTED ) if( pHint->GetId() == SfxHintId::BasicInfoWanted )
{ {
SbxObject::Notify( rBC, rHint ); SbxObject::Notify( rBC, rHint );
return; return;
@ -416,7 +416,7 @@ void SbStdClipboard::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbxVariable* pVar = pHint->GetVar(); SbxVariable* pVar = pHint->GetVar();
SbxArray* pPar_ = pVar->GetParameters(); SbxArray* pPar_ = pVar->GetParameters();
const sal_uInt32 nWhich = pVar->GetUserData(); const sal_uInt32 nWhich = pVar->GetUserData();
bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; bool bWrite = pHint->GetId() == SfxHintId::BasicDataChanged;
// Methods // Methods
switch( nWhich ) switch( nWhich )

View File

@ -117,9 +117,9 @@ void SbxCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
if( p ) if( p )
{ {
const sal_uInt32 nId = p->GetId(); const SfxHintId nId = p->GetId();
bool bRead = ( nId == SBX_HINT_DATAWANTED ); bool bRead = ( nId == SfxHintId::BasicDataWanted );
bool bWrite = ( nId == SBX_HINT_DATACHANGED ); bool bWrite = ( nId == SfxHintId::BasicDataChanged );
SbxVariable* pVar = p->GetVar(); SbxVariable* pVar = p->GetVar();
SbxArray* pArg = pVar->GetParameters(); SbxArray* pArg = pVar->GetParameters();
if( bRead || bWrite ) if( bRead || bWrite )

View File

@ -261,7 +261,7 @@ static SbxVariableRef Assign( SbxObject* pObj, SbxObject* pGbl, const sal_Unicod
} }
else else
// Simple call: once activating // Simple call: once activating
refVar->Broadcast( SBX_HINT_DATAWANTED ); refVar->Broadcast( SfxHintId::BasicDataWanted );
} }
*ppBuf = p; *ppBuf = p;
return refVar; return refVar;

View File

@ -136,9 +136,9 @@ void SbxObject::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
if( p ) if( p )
{ {
const sal_uInt32 nId = p->GetId(); const SfxHintId nId = p->GetId();
bool bRead = ( nId == SBX_HINT_DATAWANTED ); bool bRead = ( nId == SfxHintId::BasicDataWanted );
bool bWrite = ( nId == SBX_HINT_DATACHANGED ); bool bWrite = ( nId == SfxHintId::BasicDataChanged );
SbxVariable* pVar = p->GetVar(); SbxVariable* pVar = p->GetVar();
if( bRead || bWrite ) if( bRead || bWrite )
{ {
@ -295,7 +295,7 @@ bool SbxObject::Call( const OUString& rName, SbxArray* pParam )
{ {
pMeth->SetParameters( pParam ); pMeth->SetParameters( pParam );
} }
pMeth->Broadcast( SBX_HINT_DATAWANTED ); pMeth->Broadcast( SfxHintId::BasicDataWanted );
pMeth->SetParameters( nullptr ); pMeth->SetParameters( nullptr );
return true; return true;
} }
@ -413,7 +413,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
SetModified( true ); SetModified( true );
// The object listen always // The object listen always
StartListening( pVar->GetBroadcaster(), true ); StartListening( pVar->GetBroadcaster(), true );
Broadcast( SBX_HINT_OBJECTCHANGED ); Broadcast( SfxHintId::BasicObjectChanged );
return pVar; return pVar;
} }
@ -457,7 +457,7 @@ void SbxObject::Insert( SbxVariable* pVar )
pVar->SetParent( this ); pVar->SetParent( this );
} }
SetModified( true ); SetModified( true );
Broadcast( SBX_HINT_OBJECTCHANGED ); Broadcast( SfxHintId::BasicObjectChanged );
#ifdef DBG_UTIL #ifdef DBG_UTIL
static const char* pCls[] = static const char* pCls[] =
{ "DontCare","Array","Value","Variable","Method","Property","Object" }; { "DontCare","Array","Value","Variable","Method","Property","Object" };
@ -557,7 +557,7 @@ void SbxObject::Remove( SbxVariable* pVar )
pVar_->SetParent( nullptr ); pVar_->SetParent( nullptr );
} }
SetModified( true ); SetModified( true );
Broadcast( SBX_HINT_OBJECTCHANGED ); Broadcast( SfxHintId::BasicObjectChanged );
} }
} }

View File

@ -59,7 +59,7 @@ SbxValue::SbxValue( const SbxValue& r )
} }
else else
{ {
const_cast<SbxValue*>(&r)->Broadcast( SBX_HINT_DATAWANTED ); const_cast<SbxValue*>(&r)->Broadcast( SfxHintId::BasicDataWanted );
aData = r.aData; aData = r.aData;
// Copy pointer, increment references // Copy pointer, increment references
switch( aData.eType ) switch( aData.eType )
@ -133,7 +133,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r )
SbxValue::~SbxValue() SbxValue::~SbxValue()
{ {
Broadcast( SBX_HINT_DYING ); Broadcast( SfxHintId::BasicDying );
SetFlag( SbxFlagBits::Write ); SetFlag( SbxFlagBits::Write );
SbxValue::Clear(); SbxValue::Clear();
} }
@ -182,7 +182,7 @@ void SbxValue::Clear()
// Dummy // Dummy
void SbxValue::Broadcast( sal_uInt32 ) void SbxValue::Broadcast( SfxHintId )
{} {}
//////////////////////////// Readout data //////////////////////////// Readout data
@ -284,7 +284,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
p = TheRealValue( true ); p = TheRealValue( true );
if( p ) if( p )
{ {
p->Broadcast( SBX_HINT_DATAWANTED ); p->Broadcast( SfxHintId::BasicDataWanted );
switch( rRes.eType ) switch( rRes.eType )
{ {
case SbxEMPTY: case SbxEMPTY:
@ -519,7 +519,7 @@ bool SbxValue::Put( const SbxValues& rVal )
if( !IsError() ) if( !IsError() )
{ {
p->SetModified( true ); p->SetModified( true );
p->Broadcast( SBX_HINT_DATACHANGED ); p->Broadcast( SfxHintId::BasicDataChanged );
if( eOld != ERRCODE_SBX_OK ) if( eOld != ERRCODE_SBX_OK )
SetError( eOld ); SetError( eOld );
bRes = true; bRes = true;
@ -689,7 +689,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
} }
// Test downcast!!! // Test downcast!!!
if( nullptr != dynamic_cast<const SbxVariable*>( this) ) if( nullptr != dynamic_cast<const SbxVariable*>( this) )
const_cast<SbxVariable*>(static_cast<const SbxVariable*>(this))->Broadcast( SBX_HINT_DATAWANTED ); const_cast<SbxVariable*>(static_cast<const SbxVariable*>(this))->Broadcast( SfxHintId::BasicDataWanted );
SbxDataType t = GetType(); SbxDataType t = GetType();
if( t == SbxSTRING ) if( t == SbxSTRING )
{ {
@ -817,7 +817,7 @@ bool SbxValue::Convert( SbxDataType eTo )
Put( aNew ); Put( aNew );
SetModified( true ); SetModified( true );
} }
Broadcast( SBX_HINT_CONVERTED ); Broadcast( SfxHintId::BasicConverted );
return true; return true;
} }
else else

View File

@ -155,20 +155,20 @@ SbxArray* SbxVariable::GetParameters() const
// Perhaps some day one could cut the parameter 0. // Perhaps some day one could cut the parameter 0.
// Then the copying will be dropped... // Then the copying will be dropped...
void SbxVariable::Broadcast( sal_uInt32 nHintId ) void SbxVariable::Broadcast( SfxHintId nHintId )
{ {
if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) ) if( pCst && !IsSet( SbxFlagBits::NoBroadcast ) )
{ {
// Because the method could be called from outside, check the // Because the method could be called from outside, check the
// rights here again // rights here again
if( nHintId & SBX_HINT_DATAWANTED ) if( nHintId == SfxHintId::BasicDataWanted )
{ {
if( !CanRead() ) if( !CanRead() )
{ {
return; return;
} }
} }
if( nHintId & SBX_HINT_DATACHANGED ) if( nHintId == SfxHintId::BasicDataChanged )
{ {
if( !CanWrite() ) if( !CanWrite() )
{ {
@ -201,7 +201,7 @@ SbxInfo* SbxVariable::GetInfo()
{ {
if( !pInfo.Is() ) if( !pInfo.Is() )
{ {
Broadcast( SBX_HINT_INFOWANTED ); Broadcast( SfxHintId::BasicInfoWanted );
if( pInfo.Is() ) if( pInfo.Is() )
{ {
SetModified( true ); SetModified( true );
@ -582,7 +582,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
pInfo = new SbxInfo; pInfo = new SbxInfo;
pInfo->LoadData( rStrm, (sal_uInt16) cMark ); pInfo->LoadData( rStrm, (sal_uInt16) cMark );
} }
Broadcast( SBX_HINT_DATACHANGED ); Broadcast( SfxHintId::BasicDataChanged );
nHash = MakeHashCode( maName ); nHash = MakeHashCode( maName );
SetModified( true ); SetModified( true );
return true; return true;
@ -662,20 +662,20 @@ SbxAlias::~SbxAlias()
} }
} }
void SbxAlias::Broadcast( sal_uInt32 nHt ) void SbxAlias::Broadcast( SfxHintId nHt )
{ {
if( xAlias.Is() ) if( xAlias.Is() )
{ {
xAlias->SetParameters( GetParameters() ); xAlias->SetParameters( GetParameters() );
if( nHt == SBX_HINT_DATAWANTED ) if( nHt == SfxHintId::BasicDataWanted )
{ {
SbxVariable::operator=( *xAlias ); SbxVariable::operator=( *xAlias );
} }
else if( nHt == SBX_HINT_DATACHANGED || nHt == SBX_HINT_CONVERTED ) else if( nHt == SfxHintId::BasicDataChanged || nHt == SfxHintId::BasicConverted )
{ {
*xAlias = *this; *xAlias = *this;
} }
else if( nHt == SBX_HINT_INFOWANTED ) else if( nHt == SfxHintId::BasicInfoWanted )
{ {
xAlias->Broadcast( nHt ); xAlias->Broadcast( nHt );
pInfo = xAlias->GetInfo(); pInfo = xAlias->GetInfo();
@ -686,7 +686,7 @@ void SbxAlias::Broadcast( sal_uInt32 nHt )
void SbxAlias::Notify( SfxBroadcaster&, const SfxHint& rHint ) void SbxAlias::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint);
if( p && p->GetId() == SBX_HINT_DYING ) if( p && p->GetId() == SfxHintId::BasicDying )
{ {
xAlias.Clear(); xAlias.Clear();
// delete the alias? // delete the alias?

View File

@ -173,14 +173,14 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pTextHint ) if ( pTextHint )
{ {
bool bLastVal = EndReached(); bool bLastVal = EndReached();
const sal_uInt32 nId = pTextHint->GetId(); const SfxHintId nId = pTextHint->GetId();
if ( nId == TEXT_HINT_PARAINSERTED ) if ( nId == SfxHintId::TextParaInserted )
{ {
if ( bLastVal ) if ( bLastVal )
mbEndReached = IsEndReached(); mbEndReached = IsEndReached();
} }
else if ( nId == TEXT_HINT_VIEWSCROLLED ) else if ( nId == SfxHintId::TextViewScrolled )
{ {
if ( ! mbEndReached ) if ( ! mbEndReached )
mbEndReached = IsEndReached(); mbEndReached = IsEndReached();

View File

@ -2475,7 +2475,7 @@ void EditEngine::ParagraphHeightChanged( sal_Int32 nPara )
if ( GetNotifyHdl().IsSet() ) if ( GetNotifyHdl().IsSet() )
{ {
EENotify aNotify( EE_NOTIFY_TEXTHEIGHTCHANGED ); EENotify aNotify( EE_NOTIFY_TextHeightChanged );
aNotify.pEditEngine = this; aNotify.pEditEngine = this;
aNotify.nParagraph = nPara; aNotify.nParagraph = nPara;
pImpEditEngine->CallNotify( aNotify ); pImpEditEngine->CallNotify( aNotify );

View File

@ -425,7 +425,7 @@ void ImpEditEngine::FormatDoc()
sal_uInt32 nNewHeight = CalcTextHeight( &nNewHeightNTP ); sal_uInt32 nNewHeight = CalcTextHeight( &nNewHeightNTP );
long nDiff = nNewHeight - nCurTextHeight; long nDiff = nNewHeight - nCurTextHeight;
if ( nDiff ) if ( nDiff )
aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTHEIGHTCHANGED : EditStatusFlags::TEXTWIDTHCHANGED; aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TextHeightChanged : EditStatusFlags::TEXTWIDTHCHANGED;
if ( nNewHeight < nCurTextHeight ) if ( nNewHeight < nCurTextHeight )
{ {
aInvalidRect.Bottom() = (long)std::max( nNewHeight, nCurTextHeight ); aInvalidRect.Bottom() = (long)std::max( nNewHeight, nCurTextHeight );
@ -516,7 +516,7 @@ void ImpEditEngine::CheckAutoPageSize()
|| ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) ) || ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) )
{ {
// If ahead is centered / right or tabs ... // If ahead is centered / right or tabs ...
aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTWIDTHCHANGED : EditStatusFlags::TEXTHEIGHTCHANGED; aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTWIDTHCHANGED : EditStatusFlags::TextHeightChanged;
for ( sal_Int32 nPara = 0; nPara < GetParaPortions().Count(); nPara++ ) for ( sal_Int32 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
{ {
// Only paragraphs which are not aligned to the left need to be // Only paragraphs which are not aligned to the left need to be

View File

@ -143,32 +143,31 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( !bDowning ) if ( !bDowning )
{ {
SfxStyleSheet* pStyle = nullptr;
sal_uInt32 nId = 0;
const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint); const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
if ( pStyleSheetHint ) if ( pStyleSheetHint )
{ {
DBG_ASSERT( dynamic_cast< const SfxStyleSheet* >(pStyleSheetHint->GetStyleSheet()) != nullptr, "No SfxStyleSheet!" ); DBG_ASSERT( dynamic_cast< const SfxStyleSheet* >(pStyleSheetHint->GetStyleSheet()) != nullptr, "No SfxStyleSheet!" );
pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() ); SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() );
nId = pStyleSheetHint->GetHint(); SfxHintId nId = pStyleSheetHint->GetId();
} if ( ( nId == SfxHintId::StyleSheetInDestruction ) ||
else if ( dynamic_cast< const SfxStyleSheet* >(&rBC) != nullptr ) ( nId == SfxHintId::StyleSheetErased ) )
{
pStyle = static_cast<SfxStyleSheet*>(&rBC);
nId = rHint.GetId();
}
if ( pStyle )
{
if ( ( nId == SFX_HINT_DYING ) ||
( nId == SfxStyleSheetHintId::INDESTRUCTION ) ||
( nId == SfxStyleSheetHintId::ERASED ) )
{ {
RemoveStyleFromParagraphs( pStyle ); RemoveStyleFromParagraphs( pStyle );
} }
else if ( ( nId == SFX_HINT_DATACHANGED ) || else if ( nId == SfxHintId::StyleSheetModified )
( nId == SfxStyleSheetHintId::MODIFIED ) ) {
UpdateParagraphsWithStyleSheet( pStyle );
}
}
else if ( dynamic_cast< const SfxStyleSheet* >(&rBC) != nullptr )
{
SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>(&rBC);
SfxHintId nId = rHint.GetId();
if ( nId == SfxHintId::Dying )
{
RemoveStyleFromParagraphs( pStyle );
}
else if ( nId == SfxHintId::DataChanged )
{ {
UpdateParagraphsWithStyleSheet( pStyle ); UpdateParagraphsWithStyleSheet( pStyle );
} }

View File

@ -26,14 +26,14 @@
#include <osl/diagnose.h> #include <osl/diagnose.h>
SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId ) : SvxEditSourceHint::SvxEditSourceHint( SfxHintId _nId ) :
TextHint( _nId ), TextHint( _nId ),
mnStart( 0 ), mnStart( 0 ),
mnEnd( 0 ) mnEnd( 0 )
{ {
} }
SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd ) : SvxEditSourceHint::SvxEditSourceHint( SfxHintId _nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd ) :
TextHint( _nId, nValue ), TextHint( _nId, nValue ),
mnStart( nStart), mnStart( nStart),
mnEnd( nEnd ) mnEnd( nEnd )
@ -48,37 +48,37 @@ SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId, sal_uLong nValue, sal_Int
switch( aNotify->eNotificationType ) switch( aNotify->eNotificationType )
{ {
case EE_NOTIFY_TEXTMODIFIED: case EE_NOTIFY_TEXTMODIFIED:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_MODIFIED, aNotify->nParagraph ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextModified, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHINSERTED: case EE_NOTIFY_PARAGRAPHINSERTED:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAINSERTED, aNotify->nParagraph ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextParaInserted, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHREMOVED: case EE_NOTIFY_PARAGRAPHREMOVED:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_PARAREMOVED, aNotify->nParagraph ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextParaRemoved, aNotify->nParagraph ) );
case EE_NOTIFY_PARAGRAPHSMOVED: case EE_NOTIFY_PARAGRAPHSMOVED:
return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_PARASMOVED, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) ); return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( SfxHintId::EditSourceParasMoved, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) );
case EE_NOTIFY_TEXTHEIGHTCHANGED: case EE_NOTIFY_TextHeightChanged:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_TEXTHEIGHTCHANGED, aNotify->nParagraph ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextHeightChanged, aNotify->nParagraph ) );
case EE_NOTIFY_TEXTVIEWSCROLLED: case EE_NOTIFY_TEXTVIEWSCROLLED:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_VIEWSCROLLED ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextViewScrolled ) );
case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED: case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED:
return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_SELECTIONCHANGED ) ); return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( SfxHintId::EditSourceSelectionChanged ) );
case EE_NOTIFY_BLOCKNOTIFICATION_START: case EE_NOTIFY_BLOCKNOTIFICATION_START:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_START, 0 ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextBlockNotificationStart, 0 ) );
case EE_NOTIFY_BLOCKNOTIFICATION_END: case EE_NOTIFY_BLOCKNOTIFICATION_END:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_END, 0 ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextBlockNotificationEnd, 0 ) );
case EE_NOTIFY_INPUT_START: case EE_NOTIFY_INPUT_START:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_START, 0 ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextInputStart, 0 ) );
case EE_NOTIFY_INPUT_END: case EE_NOTIFY_INPUT_END:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_END, 0 ) ); return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextInputEnd, 0 ) );
case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA: case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA:
return ::std::unique_ptr<SfxHint>( new SvxEditSourceHintEndPara ); return ::std::unique_ptr<SfxHint>( new SvxEditSourceHintEndPara );
default: default:

View File

@ -276,10 +276,10 @@ namespace frm
{ {
EditStatusFlags nStatusWord( _rStatus.GetStatusWord() ); EditStatusFlags nStatusWord( _rStatus.GetStatusWord() );
if ( ( nStatusWord & EditStatusFlags::TEXTWIDTHCHANGED ) if ( ( nStatusWord & EditStatusFlags::TEXTWIDTHCHANGED )
|| ( nStatusWord & EditStatusFlags::TEXTHEIGHTCHANGED ) || ( nStatusWord & EditStatusFlags::TextHeightChanged )
) )
{ {
if ( ( nStatusWord & EditStatusFlags::TEXTHEIGHTCHANGED ) && windowHasAutomaticLineBreak() ) if ( ( nStatusWord & EditStatusFlags::TextHeightChanged ) && windowHasAutomaticLineBreak() )
m_pEngine->SetPaperSize( Size( m_pEngine->GetPaperSize().Width(), m_pEngine->GetTextHeight() ) ); m_pEngine->SetPaperSize( Size( m_pEngine->GetPaperSize().Width(), m_pEngine->GetTextHeight() ) );
updateScrollbars(); updateScrollbars();

View File

@ -59,9 +59,6 @@ namespace o3tl {
#define SBXID_JSCRIPTMOD 0x6a62 // jm: JavaScript Module #define SBXID_JSCRIPTMOD 0x6a62 // jm: JavaScript Module
#define SBXID_JSCRIPTMETH 0x6a64 // jm: JavaScript Module #define SBXID_JSCRIPTMETH 0x6a64 // jm: JavaScript Module
#define SBX_HINT_BASICSTART SFX_HINT_USER04
#define SBX_HINT_BASICSTOP SFX_HINT_USER05
enum class PropertyMode enum class PropertyMode
{ {
NONE, NONE,

View File

@ -62,7 +62,7 @@ public:
// Interface to execute a method from the applications // Interface to execute a method from the applications
ErrCode Call( SbxValue* pRet, SbxVariable* pCaller = nullptr ); ErrCode Call( SbxValue* pRet, SbxVariable* pCaller = nullptr );
virtual void Broadcast( sal_uInt32 nHintId ) override; virtual void Broadcast( SfxHintId nHintId ) override;
}; };
typedef tools::SvRef<SbMethod> SbMethodRef; typedef tools::SvRef<SbMethod> SbMethodRef;

View File

@ -94,7 +94,7 @@ class BASIC_DLLPUBLIC SbxHint : public SfxHint
{ {
SbxVariable* pVar; SbxVariable* pVar;
public: public:
SbxHint( sal_uInt32 n, SbxVariable* v ) : SfxHint( n ), pVar( v ) {} SbxHint( SfxHintId n, SbxVariable* v ) : SfxHint( n ), pVar( v ) {}
SbxVariable* GetVar() const { return pVar; } SbxVariable* GetVar() const { return pVar; }
}; };
@ -103,7 +103,7 @@ class BASIC_DLLPUBLIC SbxAlias : public SbxVariable, public SfxListener
{ {
SbxVariableRef xAlias; SbxVariableRef xAlias;
virtual ~SbxAlias() override; virtual ~SbxAlias() override;
virtual void Broadcast( sal_uInt32 ) override; virtual void Broadcast( SfxHintId ) override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
public: public:
SbxAlias( const SbxAlias& ); SbxAlias( const SbxAlias& );

View File

@ -200,14 +200,6 @@ namespace o3tl
template<> struct typed_flags<SbxFlagBits> : is_typed_flags<SbxFlagBits, 0xffff> {}; template<> struct typed_flags<SbxFlagBits> : is_typed_flags<SbxFlagBits, 0xffff> {};
} }
// Broadcaster-IDs:
#define SBX_HINT_DYING SFX_HINT_DYING
#define SBX_HINT_DATAWANTED SFX_HINT_USER00
#define SBX_HINT_DATACHANGED SFX_HINT_DATACHANGED
#define SBX_HINT_CONVERTED SFX_HINT_USER01
#define SBX_HINT_INFOWANTED SFX_HINT_USER02
#define SBX_HINT_OBJECTCHANGED SFX_HINT_USER03
// List of all creators for Load/Store // List of all creators for Load/Store
#define SBXCR_SBX 0x20584253 // SBX(blank) #define SBXCR_SBX 0x20584253 // SBX(blank)

View File

@ -28,6 +28,7 @@
class SbxDecimal; class SbxDecimal;
enum class SfxHintId;
struct SbxValues struct SbxValues
{ {
@ -82,7 +83,7 @@ protected:
OUString aPic; // Picture-String OUString aPic; // Picture-String
OUString aToolString; // tool string copy OUString aToolString; // tool string copy
virtual void Broadcast( sal_uInt32 ); // Broadcast-Call virtual void Broadcast( SfxHintId ); // Broadcast-Call
virtual ~SbxValue() override; virtual ~SbxValue() override;
virtual bool LoadData( SvStream&, sal_uInt16 ) override; virtual bool LoadData( SvStream&, sal_uInt16 ) override;
virtual bool StoreData( SvStream& ) const override; virtual bool StoreData( SvStream& ) const override;
@ -269,7 +270,7 @@ public:
// Due to data reduction and better DLL-hierarchy currently via casting // Due to data reduction and better DLL-hierarchy currently via casting
SfxBroadcaster& GetBroadcaster(); SfxBroadcaster& GetBroadcaster();
bool IsBroadcaster() const { return pCst != nullptr; } bool IsBroadcaster() const { return pCst != nullptr; }
virtual void Broadcast( sal_uInt32 nHintId ) override; virtual void Broadcast( SfxHintId nHintId ) override;
inline const SbxObject* GetParent() const { return pParent; } inline const SbxObject* GetParent() const { return pParent; }
SbxObject* GetParent() { return pParent;} SbxObject* GetParent() { return pParent;}

View File

@ -117,15 +117,15 @@ namespace accessibility
only be called from the main office thread. only be called from the main office thread.
The EditSource set here is required to broadcast out the The EditSource set here is required to broadcast out the
following hints: EDITSOURCE_HINT_PARASMOVED, following hints: SfxHintId::EditSourceParasMoved,
EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED, SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED, SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
TEXT_HINT_TEXTHEIGHTCHANGED, SfxHintId::TextHeightChanged,
TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is more, when the corresponding core object or the model is
dying, either the edit source must be set to NULL or it dying, either the edit source must be set to NULL or it
has to broadcast a SFX_HINT_DYING hint. has to broadcast a SfxHintId::Dying hint.
This class does not have a dispose method, since it is not This class does not have a dispose method, since it is not
a UNO component. Nevertheless, it holds C++ references to a UNO component. Nevertheless, it holds C++ references to

View File

@ -297,7 +297,7 @@ enum EENotifyType
EE_NOTIFY_PARAGRAPHSMOVED, EE_NOTIFY_PARAGRAPHSMOVED,
/// The height of at least one paragraph has changed /// The height of at least one paragraph has changed
EE_NOTIFY_TEXTHEIGHTCHANGED, EE_NOTIFY_TextHeightChanged,
/// The view area of the EditEngine scrolled /// The view area of the EditEngine scrolled
EE_NOTIFY_TEXTVIEWSCROLLED, EE_NOTIFY_TEXTVIEWSCROLLED,

View File

@ -86,7 +86,7 @@ enum class EditStatusFlags
CRSRMOVEFAIL = 0x0008, CRSRMOVEFAIL = 0x0008,
CRSRLEFTPARA = 0x0010, CRSRLEFTPARA = 0x0010,
TEXTWIDTHCHANGED = 0x0020, TEXTWIDTHCHANGED = 0x0020,
TEXTHEIGHTCHANGED = 0x0040, TextHeightChanged = 0x0040,
WRONGWORDCHANGED = 0x0080 WRONGWORDCHANGED = 0x0080
}; };
namespace o3tl namespace o3tl

View File

@ -30,11 +30,8 @@
struct EENotify; struct EENotify;
class EditEngine; class EditEngine;
#define EDITSOURCE_HINT_PARASMOVED 20
#define EDITSOURCE_HINT_SELECTIONCHANGED 21
/** Extends TextHint by two additional parameters which are necessary /** Extends TextHint by two additional parameters which are necessary
for the EDITSOURCE_HINT_PARASMOVED hint. TextHint's value in this for the SfxHintId::EditSourceParasMoved hint. TextHint's value in this
case denotes the destination position, the two parameters the case denotes the destination position, the two parameters the
start and the end of the moved paragraph range. start and the end of the moved paragraph range.
*/ */
@ -45,8 +42,8 @@ private:
sal_Int32 mnEnd; sal_Int32 mnEnd;
public: public:
SvxEditSourceHint( sal_uInt32 nId ); SvxEditSourceHint( SfxHintId nId );
SvxEditSourceHint( sal_uInt32 nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd ); SvxEditSourceHint( SfxHintId nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd );
using TextHint::GetValue; using TextHint::GetValue;
sal_Int32 GetStartValue() const { return mnStart;} sal_Int32 GetStartValue() const { return mnStart;}
@ -55,7 +52,7 @@ public:
class SvxEditSourceHintEndPara :public SvxEditSourceHint class SvxEditSourceHintEndPara :public SvxEditSourceHint
{ {
public: public:
SvxEditSourceHintEndPara() : SvxEditSourceHint(EDITSOURCE_HINT_SELECTIONCHANGED) {} SvxEditSourceHintEndPara() : SvxEditSourceHint(SfxHintId::EditSourceSelectionChanged) {}
}; };
/** Helper class for common functionality in edit sources /** Helper class for common functionality in edit sources
*/ */

View File

@ -22,37 +22,105 @@
#include <sal/types.h> #include <sal/types.h>
#include <svl/svldllapi.h> #include <svl/svldllapi.h>
#define SFX_HINT_DYING 0x00000001 enum class SfxHintId {
#define SFX_HINT_NAMECHANGED 0x00000002 NONE,
#define SFX_HINT_TITLECHANGED 0x00000004 Dying,
#define SFX_HINT_DATACHANGED 0x00000008 NameChanged,
#define SFX_HINT_DOCCHANGED 0x00000010 TitleChanged,
#define SFX_HINT_UPDATEDONE 0x00000020 DataChanged,
#define SFX_HINT_DEINITIALIZING 0x00000040 DocChanged,
#define SFX_HINT_MODECHANGED 0x00000080 UpdateDone,
// unused, formerly SFX_HINT_CANCELLABLE Deinitializing,
// unused, formerly SFX_HINT_DATAAVAILABLE ModeChanged,
// unused, formerly SFX_HINT_SAVECOMPLETED ColorsChanged,
// unused, formerly SFX_HINT_RELEASEREF AccessibilityChanged,
#define SFX_HINT_COLORS_CHANGED 0x00001000
#define SFX_HINT_ACCESSIBILITY_CHANGED 0x00004000 // VCL text hints
// unused, formerly SFX_HINT_VIEWCREATED TextParaInserted,
#define SFX_HINT_USER00 0x00010000 TextParaRemoved,
#define SFX_HINT_USER01 0x00020000 TextParaContentChanged,
#define SFX_HINT_USER02 0x00040000 TextHeightChanged,
#define SFX_HINT_USER03 0x00080000 TextFormatPara,
#define SFX_HINT_USER04 0x00100000 TextFormatted,
#define SFX_HINT_USER05 0x00200000 TextModified,
TextBlockNotificationStart,
TextBlockNotificationEnd,
TextInputStart,
TextInputEnd,
TextViewScrolled,
TextViewSelectionChanged,
TextViewCaretChanged,
// BASIC hints
BasicDying,
BasicDataWanted,
BasicDataChanged,
BasicConverted,
BasicInfoWanted,
BasicObjectChanged,
BasicStart,
BasicStop,
// SVX edit source
EditSourceParasMoved,
EditSourceSelectionChanged,
// SC hints
ScDataChanged,
ScTableOpDirty,
ScCalcAll,
ScReference,
ScDrawLayerNew,
ScDbAreasChanged,
ScAreasChanged,
ScTablesChanged,
ScDrawChanged,
ScDocNameChanged,
ScAreaLinksChanged,
ScShowRangeFinder,
ScDocSaved,
ScForceSetTab,
ScNavigatorUpdateAll,
ScAnyDataChanged,
ScPrintOptions,
ScRefModeChanged,
ScKillEditView,
ScKillEditViewNoPaint,
// SC accessibility hints
ScAccTableChanged,
ScAccCursorChanged,
ScAccVisAreaChanged,
ScAccEnterEditMode,
ScAccLeaveEditMode,
ScAccMakeDrawLayer,
ScAccWindowResized,
// SFX stylesheet
StyleSheetCreated, // new
StyleSheetModified, // changed
StyleSheetChanged, // erased and re-created (replaced)
StyleSheetErased, // erased
StyleSheetInDestruction, // in the process of being destructed
// STARMATH
MathFormatChanged,
// SW
SwDrawViewsCreated,
SwSplitNodeOperation,
};
class SVL_DLLPUBLIC SfxHint class SVL_DLLPUBLIC SfxHint
{ {
private: private:
sal_uInt32 mnId; SfxHintId mnId;
public: public:
SfxHint() : mnId(0) {} SfxHint() : mnId(SfxHintId::NONE) {}
explicit SfxHint( sal_uInt32 nId ) : mnId(nId) {} explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
virtual ~SfxHint(); virtual ~SfxHint();
sal_uInt32 GetId() const { return mnId; } SfxHintId GetId() const { return mnId; }
}; };
#endif #endif

View File

@ -49,24 +49,24 @@ must broadcast this using <SfxStyleSheetBasePool::GetBroadcaster()> broadcasts.
The class <SfxStyleSheetHint> is used for this, it contains an Action-Id and a The class <SfxStyleSheetHint> is used for this, it contains an Action-Id and a
pointer to the <SfxStyleSheetBase>. The actions are: pointer to the <SfxStyleSheetBase>. The actions are:
#define SfxStyleSheetHintId::CREATED // style is created #define SfxHintId::StyleSheetCreated // style is created
#define SfxStyleSheetHintId::MODIFIED // style is modified #define SfxHintId::StyleSheetModified // style is modified
#define SfxStyleSheetHintId::CHANGED // style is replaced #define SfxHintId::StyleSheetChanged // style is replaced
#define SfxStyleSheetHintId::ERASED // style is deleted #define SfxHintId::StyleSheetErased // style is deleted
The following methods already broadcast themself The following methods already broadcast themself
SfxSimpleHint(SFX_HINT_DYING) from: SfxSimpleHint(SfxHintId::Dying) from:
SfxStyleSheetBasePool::~SfxStyleSheetBasePool() SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *p ) from: SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *p ) from:
SfxStyleSheetBasePool::Make( const String& rName, SfxStyleSheetBasePool::Make( const String& rName,
SfxStyleFamily eFam, sal_uInt16 mask) SfxStyleFamily eFam, sal_uInt16 mask)
SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *pNew ) from: SfxStyleSheetHint( SfxHintId::StyleSheetChanged, *pNew ) from:
SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet ) SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet )
SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *p ) from: SfxStyleSheetHint( SfxHintId::StyleSheetErased, *p ) from:
SfxStyleSheetBasePool::Erase( SfxStyleSheetBase* p ) SfxStyleSheetBasePool::Erase( SfxStyleSheetBase* p )
SfxStyleSheetBasePool::Clear() SfxStyleSheetBasePool::Clear()
*/ */
@ -292,15 +292,6 @@ public:
}; };
enum SfxStyleSheetHintId
{
CREATED = 1, // new
MODIFIED = 2, // changed
CHANGED = 3, // erased and re-created (replaced)
ERASED = 4, // erased
INDESTRUCTION = 5, // in the process of being destructed
};
class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint
{ {
public: public:
@ -311,14 +302,10 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint
{ {
SfxStyleSheetBase* pStyleSh; SfxStyleSheetBase* pStyleSh;
sal_uInt16 nHint;
public: public:
SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& ); SfxStyleSheetHint( SfxHintId, SfxStyleSheetBase& );
SfxStyleSheetBase* GetStyleSheet() const SfxStyleSheetBase* GetStyleSheet() const
{ return pStyleSh; } { return pStyleSh; }
sal_uInt16 GetHint() const
{ return nHint; }
}; };
class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
@ -326,7 +313,7 @@ class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
OUString aName; OUString aName;
public: public:
SfxStyleSheetHintExtended( sal_uInt16, const OUString& rOld, SfxStyleSheetHintExtended( SfxHintId, const OUString& rOld,
SfxStyleSheetBase& ); SfxStyleSheetBase& );
const OUString& GetOldName() const { return aName; } const OUString& GetOldName() const { return aName; }
}; };

View File

@ -85,7 +85,7 @@ namespace accessibility
AccessibleTextHelper will call the SvxEditSource and their AccessibleTextHelper will call the SvxEditSource and their
forwarder to update it's state. Avoid being inconsistent in forwarder to update it's state. Avoid being inconsistent in
the facts you tell in the events, e.g. when sending a the facts you tell in the events, e.g. when sending a
TEXT_HINT_PARAINSERTED event, the SfxHintId::TextParaInserted event, the
SvxEditSource::GetTextForwarder().GetParagraphCount() should SvxEditSource::GetTextForwarder().GetParagraphCount() should
already include the newly inserted paragraph. already include the newly inserted paragraph.
@ -147,15 +147,15 @@ namespace accessibility
from the main office thread. from the main office thread.
The EditSource set here is required to broadcast out the The EditSource set here is required to broadcast out the
following hints: EDITSOURCE_HINT_PARASMOVED, following hints: SfxHintId::EditSourceParasMoved,
EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED, SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED, SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
TEXT_HINT_TEXTHEIGHTCHANGED, SfxHintId::TextHeightChanged,
TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is more, when the corresponding core object or the model is
dying, either the edit source must be set to NULL or it dying, either the edit source must be set to NULL or it
has to broadcast a SFX_HINT_DYING hint. has to broadcast a SfxHintId::Dying hint.
If the SvxEditSource's managed text can change between If the SvxEditSource's managed text can change between
edit/non-edit mode (i.e. there are times when edit/non-edit mode (i.e. there are times when
@ -262,7 +262,7 @@ namespace accessibility
children. Call this method if your visibility state has children. Call this method if your visibility state has
changed somehow, e.g. if the visible area has changed and changed somehow, e.g. if the visible area has changed and
the AccessibleTextHelper isn't notified internally the AccessibleTextHelper isn't notified internally
(e.g. via TEXT_HINT_VIEWSCROLLED). Normally, there should (e.g. via SfxHintId::TextViewScrolled). Normally, there should
not be a need to call this method. not be a need to call this method.
*/ */
void UpdateChildren(); void UpdateChildren();

View File

@ -111,30 +111,14 @@ inline bool TextSelection::operator != ( const TextSelection& rSel ) const
return !( *this == rSel ); return !( *this == rSel );
} }
#define TEXT_HINT_PARAINSERTED 1
#define TEXT_HINT_PARAREMOVED 2
#define TEXT_HINT_PARACONTENTCHANGED 3
#define TEXT_HINT_TEXTHEIGHTCHANGED 4
#define TEXT_HINT_FORMATPARA 5
#define TEXT_HINT_TEXTFORMATTED 6
#define TEXT_HINT_MODIFIED 7
#define TEXT_HINT_BLOCKNOTIFICATION_START 8
#define TEXT_HINT_BLOCKNOTIFICATION_END 9
#define TEXT_HINT_INPUT_START 10
#define TEXT_HINT_INPUT_END 11
#define TEXT_HINT_VIEWSCROLLED 100
#define TEXT_HINT_VIEWSELECTIONCHANGED 101
#define TEXT_HINT_VIEWCARETCHANGED 102
class VCL_DLLPUBLIC TextHint : public SfxHint class VCL_DLLPUBLIC TextHint : public SfxHint
{ {
private: private:
sal_uLong mnValue; sal_uLong mnValue;
public: public:
TextHint( sal_uInt32 nId ); TextHint( SfxHintId nId );
TextHint( sal_uInt32 nId, sal_uLong nValue ); TextHint( SfxHintId nId, sal_uLong nValue );
sal_uLong GetValue() const { return mnValue; } sal_uLong GetValue() const { return mnValue; }
}; };

View File

@ -191,7 +191,7 @@ void OXUndoEnvironment::ModeChanged()
void OXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) void OXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{ {
if (rHint.GetId() == SFX_HINT_MODECHANGED ) if (rHint.GetId() == SfxHintId::ModeChanged )
ModeChanged(); ModeChanged();
} }

View File

@ -51,7 +51,7 @@ void OColorListener::dispose()
void OColorListener::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint) void OColorListener::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint)
{ {
if (rHint.GetId() == SFX_HINT_COLORS_CHANGED) if (rHint.GetId() == SfxHintId::ColorsChanged)
{ {
m_nColor = m_aExtendedColorConfig.GetColorValue(CFG_REPORTDESIGNER,m_sColorEntry).getColor(); m_nColor = m_aExtendedColorConfig.GetColorValue(CFG_REPORTDESIGNER,m_sColorEntry).getColor();
m_nTextBoundaries = m_aColorConfig.GetColorValue(::svtools::DOCBOUNDARIES).nColor; m_nTextBoundaries = m_aColorConfig.GetColorValue(::svtools::DOCBOUNDARIES).nColor;

View File

@ -253,7 +253,7 @@ void OStartMarker::setTitle(const OUString& _sTitle)
void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint) void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint)
{ {
OColorListener::Notify(rBc, rHint); OColorListener::Notify(rBc, rHint);
if (rHint.GetId() == SFX_HINT_COLORS_CHANGED) if (rHint.GetId() == SfxHintId::ColorsChanged)
{ {
setColor(); setColor();
Invalidate(InvalidateFlags::Children); Invalidate(InvalidateFlags::Children);

View File

@ -20,7 +20,6 @@
#define INCLUDED_SC_INC_BRDCST_HXX #define INCLUDED_SC_INC_BRDCST_HXX
#include "address.hxx" #include "address.hxx"
#include "simplehintids.hxx"
#include <svl/hint.hxx> #include <svl/hint.hxx>
class SvtBroadcaster; class SvtBroadcaster;
@ -30,7 +29,7 @@ class ScHint : public SfxHint
ScAddress aAddress; ScAddress aAddress;
public: public:
ScHint( sal_uInt32 n, const ScAddress& a ); ScHint( SfxHintId n, const ScAddress& a );
const ScAddress& GetAddress() const { return aAddress; } const ScAddress& GetAddress() const { return aAddress; }
ScAddress& GetAddress() { return aAddress; } ScAddress& GetAddress() { return aAddress; }
}; };

View File

@ -10,7 +10,7 @@
#ifndef INCLUDED_SC_BULKDATAHINT_HXX #ifndef INCLUDED_SC_BULKDATAHINT_HXX
#define INCLUDED_SC_BULKDATAHINT_HXX #define INCLUDED_SC_BULKDATAHINT_HXX
#include <simplehintids.hxx> #include <svl/hint.hxx>
#include <memory> #include <memory>
class ScDocument; class ScDocument;
@ -28,7 +28,7 @@ class BulkDataHint : public SfxHint
BulkDataHint& operator= ( const BulkDataHint& ) = delete; BulkDataHint& operator= ( const BulkDataHint& ) = delete;
public: public:
BulkDataHint( ScDocument& rDoc, sal_uInt32 nHintId ); BulkDataHint( ScDocument& rDoc, SfxHintId nHintId );
virtual ~BulkDataHint() override; virtual ~BulkDataHint() override;
void setSpans( const ColumnSpanSet* pSpans ); void setSpans( const ColumnSpanSet* pSpans );

View File

@ -584,7 +584,7 @@ public:
void PrepareBroadcastersForDestruction(); void PrepareBroadcastersForDestruction();
void Broadcast( SCROW nRow ); void Broadcast( SCROW nRow );
void BroadcastCells( const std::vector<SCROW>& rRows, sal_uInt32 nHint ); void BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint );
// cell notes // cell notes
ScPostIt* GetCellNote( SCROW nRow ); ScPostIt* GetCellNote( SCROW nRow );

View File

@ -36,7 +36,7 @@
#include "typedstrdata.hxx" #include "typedstrdata.hxx"
#include "calcmacros.hxx" #include "calcmacros.hxx"
#include "calcconfig.hxx" #include "calcconfig.hxx"
#include <simplehintids.hxx> #include <svl/hint.hxx>
#include <tools/gen.hxx> #include <tools/gen.hxx>
#include <svl/zforlist.hxx> #include <svl/zforlist.hxx>
@ -2041,7 +2041,7 @@ public:
*/ */
void Broadcast( const ScHint& rHint ); void Broadcast( const ScHint& rHint );
void BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool bBroadcastSingleBroadcasters = true ); void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
void BroadcastRefMoved( const sc::RefMovedHint& rHint ); void BroadcastRefMoved( const sc::RefMovedHint& rHint );
/// only area, no cell broadcast /// only area, no cell broadcast
@ -2084,10 +2084,10 @@ public:
void ClearFormulaTree(); void ClearFormulaTree();
void AppendToFormulaTrack( ScFormulaCell* pCell ); void AppendToFormulaTrack( ScFormulaCell* pCell );
void RemoveFromFormulaTrack( ScFormulaCell* pCell ); void RemoveFromFormulaTrack( ScFormulaCell* pCell );
void TrackFormulas( sal_uInt32 nHintId = SC_HINT_DATACHANGED ); void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
void SetTrackFormulasPending() { mbTrackFormulasPending = true; } void SetTrackFormulasPending() { mbTrackFormulasPending = true; }
bool IsTrackFormulasPending() const { return mbTrackFormulasPending; } bool IsTrackFormulasPending() const { return mbTrackFormulasPending; }
void FinalTrackFormulas( sal_uInt32 nHintId ); void FinalTrackFormulas( SfxHintId nHintId );
bool IsFinalTrackFormulas() const { return mbFinalTrackFormulas; } bool IsFinalTrackFormulas() const { return mbFinalTrackFormulas; }
bool IsInFormulaTree( ScFormulaCell* pCell ) const; bool IsInFormulaTree( ScFormulaCell* pCell ) const;
bool IsInFormulaTrack( ScFormulaCell* pCell ) const; bool IsInFormulaTrack( ScFormulaCell* pCell ) const;

View File

@ -11,7 +11,7 @@
#define INCLUDED_SC_INC_REFHINT_HXX #define INCLUDED_SC_INC_REFHINT_HXX
#include "address.hxx" #include "address.hxx"
#include "simplehintids.hxx" #include <svl/hint.hxx>
namespace sc { namespace sc {

View File

@ -203,23 +203,14 @@
#define FID_INPUTLINE_STATUS (SC_MESSAGE_START) #define FID_INPUTLINE_STATUS (SC_MESSAGE_START)
#define FID_INPUTLINE_ENTER (SC_MESSAGE_START + 1) #define FID_INPUTLINE_ENTER (SC_MESSAGE_START + 1)
#define FID_REPAINT (SC_MESSAGE_START + 2) #define FID_REPAINT (SC_MESSAGE_START + 2)
#define FID_DATACHANGED (SC_MESSAGE_START + 3)
#define FID_REFMODECHANGED (SC_MESSAGE_START + 4)
#define FID_KILLEDITVIEW (SC_MESSAGE_START + 5)
#define SID_SOLVE (SC_MESSAGE_START + 6) #define SID_SOLVE (SC_MESSAGE_START + 6)
#define FID_FILTER_OK (SC_MESSAGE_START + 8) #define FID_FILTER_OK (SC_MESSAGE_START + 8)
#define SC_HINT_DRWLAYER_NEW (SC_MESSAGE_START + 9)
#define FID_INPUTLINE_MATRIX (SC_MESSAGE_START + 11) #define FID_INPUTLINE_MATRIX (SC_MESSAGE_START + 11)
#define SID_DLG_RETOK (SC_MESSAGE_START + 12) #define SID_DLG_RETOK (SC_MESSAGE_START + 12)
#define FID_ANYDATACHANGED (SC_MESSAGE_START + 13)
#define SID_STATUS_DOCPOS (SC_MESSAGE_START + 14) #define SID_STATUS_DOCPOS (SC_MESSAGE_START + 14)
#define SID_STATUS_PAGESTYLE (SC_MESSAGE_START + 15) #define SID_STATUS_PAGESTYLE (SC_MESSAGE_START + 15)
#define SID_STATUS_SELMODE (SC_MESSAGE_START + 16) #define SID_STATUS_SELMODE (SC_MESSAGE_START + 16)
#define FID_KILLEDITVIEW_NOPAINT (SC_MESSAGE_START + 17)
#define SID_DLG_MATRIX (SC_MESSAGE_START + 18) #define SID_DLG_MATRIX (SC_MESSAGE_START + 18)
#define SC_HINT_DBAREAS_CHANGED (SC_MESSAGE_START + 19)
#define SC_HINT_AREAS_CHANGED (SC_MESSAGE_START + 20)
#define SC_HINT_TABLES_CHANGED (SC_MESSAGE_START + 21)
#define SID_STATUS_SELMODE_ERG (SC_MESSAGE_START + 22) #define SID_STATUS_SELMODE_ERG (SC_MESSAGE_START + 22)
#define SID_STATUS_SELMODE_ERW (SC_MESSAGE_START + 23) #define SID_STATUS_SELMODE_ERW (SC_MESSAGE_START + 23)
@ -235,12 +226,6 @@
#define SID_STATUS_SUM (SC_MESSAGE_START + 30) #define SID_STATUS_SUM (SC_MESSAGE_START + 30)
#define SC_HINT_DRAW_CHANGED (SC_MESSAGE_START + 31)
#define SC_HINT_DOCNAME_CHANGED (SC_MESSAGE_START + 32)
#define SC_HINT_AREALINKS_CHANGED (SC_MESSAGE_START + 33)
#define SC_HINT_SHOWRANGEFINDER (SC_MESSAGE_START + 34)
#define SC_HINT_DOC_SAVED (SC_MESSAGE_START + 35)
#define SC_HINT_FORCESETTAB (SC_MESSAGE_START + 36)
#define SID_ENTER_STRING (SC_MESSAGE_START + 37) #define SID_ENTER_STRING (SC_MESSAGE_START + 37)
#define SID_ROWCOL_SELCOUNT (SC_MESSAGE_START + 38) #define SID_ROWCOL_SELCOUNT (SC_MESSAGE_START + 38)
#define SID_AUTO_SUM (SC_MESSAGE_START + 39) #define SID_AUTO_SUM (SC_MESSAGE_START + 39)
@ -256,7 +241,6 @@
#define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61) #define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61)
#define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62) #define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62)
#define SID_POPUP_CONDFRMT (SC_MESSAGE_START + 63) #define SID_POPUP_CONDFRMT (SC_MESSAGE_START + 63)
#define SC_HINT_NAVIGATOR_UPDATEALL (SC_MESSAGE_START + 65)
#define SID_OPENDLG_COLORSCALE (SC_MESSAGE_START + 66) #define SID_OPENDLG_COLORSCALE (SC_MESSAGE_START + 66)
#define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67) #define SID_OPENDLG_DATABAR (SC_MESSAGE_START + 67)
#define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68) #define SID_OPENDLG_ICONSET (SC_MESSAGE_START + 68)

View File

@ -1,23 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_SC_INC_SIMPLEHINTIDS_HXX
#define INCLUDED_SC_INC_SIMPLEHINTIDS_HXX
#include <svl/hint.hxx>
#define SC_HINT_DATACHANGED SFX_HINT_DATACHANGED
#define SC_HINT_TABLEOPDIRTY SFX_HINT_USER00
#define SC_HINT_CALCALL SFX_HINT_USER01
#define SC_HINT_REFERENCE SFX_HINT_USER02
#define SC_HINT_BULK_DATACHANGED SFX_HINT_USER03
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -260,7 +260,7 @@ ScBroadcastAreas::iterator ScBroadcastAreaSlot::FindBroadcastArea(
namespace { namespace {
void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, sal_uInt32 nHint ) void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, SfxHintId nHint )
{ {
ScHint aHint(nHint, ScAddress()); ScHint aHint(nHint, ScAddress());
ScAddress& rPos = aHint.GetAddress(); ScAddress& rPos = aHint.GetAddress();
@ -281,7 +281,7 @@ void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, sal_uInt3
} }
bool ScBroadcastAreaSlot::AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint ) bool ScBroadcastAreaSlot::AreaBroadcast( const ScRange& rRange, SfxHintId nHint )
{ {
if (aBroadcastAreaTbl.empty()) if (aBroadcastAreaTbl.empty())
return false; return false;
@ -828,7 +828,7 @@ void ScBroadcastAreaSlotMachine::EndListeningArea(
} }
} }
bool ScBroadcastAreaSlotMachine::AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint ) bool ScBroadcastAreaSlotMachine::AreaBroadcast( const ScRange& rRange, SfxHintId nHint )
{ {
bool bBroadcasted = false; bool bBroadcasted = false;
SCTAB nEndTab = rRange.aEnd.Tab(); SCTAB nEndTab = rRange.aEnd.Tab();
@ -1095,7 +1095,7 @@ void ScBroadcastAreaSlotMachine::EnterBulkBroadcast()
++nInBulkBroadcast; ++nInBulkBroadcast;
} }
void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast( sal_uInt32 nHintId ) void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast( SfxHintId nHintId )
{ {
if (nInBulkBroadcast > 0) if (nInBulkBroadcast > 0)
{ {
@ -1131,7 +1131,7 @@ void ScBroadcastAreaSlotMachine::InsertBulkGroupArea( ScBroadcastArea* pArea, co
pSet->set(rRange, true); pSet->set(rRange, true);
} }
bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas( sal_uInt32 nHintId ) bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas( SfxHintId nHintId )
{ {
if (m_BulkGroupAreas.empty()) if (m_BulkGroupAreas.empty())
return false; return false;

View File

@ -135,7 +135,7 @@ void ScFormulaListener::Notify(const SfxHint& rHint)
{ {
mbDirty = true; mbDirty = true;
if (rHint.GetId() == SFX_HINT_DYING) if (rHint.GetId() == SfxHintId::Dying)
return; return;
if (maCallbackFunction) if (maCallbackFunction)

View File

@ -1963,7 +1963,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol)
rCol.CellStorageModified(); rCol.CellStorageModified();
// Broadcast on moved ranges. Area-broadcast only. // Broadcast on moved ranges. Area-broadcast only.
ScHint aHint(SC_HINT_DATACHANGED, ScAddress(nCol, 0, nTab)); ScHint aHint(SfxHintId::ScDataChanged, ScAddress(nCol, 0, nTab));
ScAddress& rPos = aHint.GetAddress(); ScAddress& rPos = aHint.GetAddress();
sc::SingleColumnSpanSet::SpansType::const_iterator itRange = aRanges.begin(), itRangeEnd = aRanges.end(); sc::SingleColumnSpanSet::SpansType::const_iterator itRange = aRanges.begin(), itRangeEnd = aRanges.end();
for (; itRange != itRangeEnd; ++itRange) for (; itRange != itRangeEnd; ++itRange)
@ -2749,7 +2749,7 @@ public:
{ {
std::vector<SCROW> aRows; std::vector<SCROW> aRows;
maValueRanges.getRows(aRows); maValueRanges.getRows(aRows);
mrColumn.BroadcastCells(aRows, SC_HINT_DATACHANGED); mrColumn.BroadcastCells(aRows, SfxHintId::ScDataChanged);
} }
void fillBroadcastSpans( sc::ColumnSpanSet& rBroadcastSpans ) const void fillBroadcastSpans( sc::ColumnSpanSet& rBroadcastSpans ) const
@ -2793,7 +2793,7 @@ public:
{ {
std::vector<SCROW> aRows; std::vector<SCROW> aRows;
maValueRanges.getRows(aRows); maValueRanges.getRows(aRows);
mrColumn.BroadcastCells(aRows, SC_HINT_TABLEOPDIRTY); mrColumn.BroadcastCells(aRows, SfxHintId::ScTableOpDirty);
} }
}; };
@ -3222,7 +3222,7 @@ void ScColumn::SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode eMode )
SetDirtyOnRangeHandler aHdl(*this); SetDirtyOnRangeHandler aHdl(*this);
sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aHdl); sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aHdl);
// Broadcast all broadcasters in range. // Broadcast all broadcasters in range.
ScHint aHint( SC_HINT_DATACHANGED, ScAddress( nCol, nRow1, nTab)); ScHint aHint( SfxHintId::ScDataChanged, ScAddress( nCol, nRow1, nTab));
if (BroadcastBroadcasters( nRow1, nRow2, aHint)) if (BroadcastBroadcasters( nRow1, nRow2, aHint))
{ {
// SetDirtyOnRangeHandler implicitly tracks notified // SetDirtyOnRangeHandler implicitly tracks notified
@ -3285,7 +3285,7 @@ void ScColumn::BroadcastRecalcOnRefMove()
sc::AutoCalcSwitch aSwitch(*pDocument, false); sc::AutoCalcSwitch aSwitch(*pDocument, false);
RecalcOnRefMoveCollector aFunc; RecalcOnRefMoveCollector aFunc;
sc::ProcessFormula(maCells, aFunc); sc::ProcessFormula(maCells, aFunc);
BroadcastCells(aFunc.getDirtyRows(), SC_HINT_DATACHANGED); BroadcastCells(aFunc.getDirtyRows(), SfxHintId::ScDataChanged);
} }
namespace { namespace {

View File

@ -71,11 +71,11 @@ using namespace formula;
void ScColumn::Broadcast( SCROW nRow ) void ScColumn::Broadcast( SCROW nRow )
{ {
ScHint aHint(SC_HINT_DATACHANGED, ScAddress(nCol, nRow, nTab)); ScHint aHint(SfxHintId::ScDataChanged, ScAddress(nCol, nRow, nTab));
pDocument->Broadcast(aHint); pDocument->Broadcast(aHint);
} }
void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, sal_uInt32 nHint ) void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint )
{ {
if (rRows.empty()) if (rRows.empty())
return; return;
@ -707,7 +707,7 @@ void ScColumn::DeleteArea(
// cells that were already empty before the deletion. // cells that were already empty before the deletion.
std::vector<SCROW> aRows; std::vector<SCROW> aRows;
aDeletedRows.getRows(aRows); aDeletedRows.getRows(aRows);
BroadcastCells(aRows, SC_HINT_DATACHANGED); BroadcastCells(aRows, SfxHintId::ScDataChanged);
} }
} }

View File

@ -277,7 +277,7 @@ void ScColumn::SetValues( SCROW nRow, const std::vector<double>& rVals )
for (SCROW i = nRow; i <= nLastRow; ++i) for (SCROW i = nRow; i <= nLastRow; ++i)
aRows.push_back(i); aRows.push_back(i);
BroadcastCells(aRows, SC_HINT_DATACHANGED); BroadcastCells(aRows, SfxHintId::ScDataChanged);
} }
void ScColumn::TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rDest ) void ScColumn::TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rDest )
@ -302,7 +302,7 @@ void ScColumn::TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rD
for (SCROW i = nRow; i <= nLastRow; ++i) for (SCROW i = nRow; i <= nLastRow; ++i)
aRows.push_back(i); aRows.push_back(i);
BroadcastCells(aRows, SC_HINT_DATACHANGED); BroadcastCells(aRows, SfxHintId::ScDataChanged);
} }
void ScColumn::CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc ) void ScColumn::CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc )
@ -327,7 +327,7 @@ void ScColumn::CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc )
for (SCROW i = nRow; i <= nLastRow; ++i) for (SCROW i = nRow; i <= nLastRow; ++i)
aRows.push_back(i); aRows.push_back(i);
BroadcastCells(aRows, SC_HINT_DATACHANGED); BroadcastCells(aRows, SfxHintId::ScDataChanged);
} }
namespace { namespace {

View File

@ -330,7 +330,7 @@ IMPL_LINK_NOARG(ScDocument, TrackTimeHdl, Idle *, void)
else if (pShell) // execute else if (pShell) // execute
{ {
TrackFormulas(); TrackFormulas();
pShell->Broadcast( SfxHint( FID_DATACHANGED ) ); pShell->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
// modified... // modified...
@ -386,7 +386,7 @@ ScDocument::~ScDocument()
delete pBASM; // BroadcastAreaSlotMachine delete pBASM; // BroadcastAreaSlotMachine
pBASM = nullptr; pBASM = nullptr;
delete pUnoBroadcaster; // broadcasted nochmal SFX_HINT_DYING delete pUnoBroadcaster; // broadcasted nochmal SfxHintId::Dying
pUnoBroadcaster = nullptr; pUnoBroadcaster = nullptr;
delete pUnoRefUndoList; delete pUnoRefUndoList;
@ -1009,7 +1009,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
sc::CopyToDocContext aCxt(*this); sc::CopyToDocContext aCxt(*this);
nDestPos = std::min(nDestPos, (SCTAB)(GetTableCount() - 1)); nDestPos = std::min(nDestPos, (SCTAB)(GetTableCount() - 1));
{ // scope for bulk broadcast { // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pBASM, SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( pBASM, SfxHintId::ScDataChanged);
if (!bResultsOnly) if (!bResultsOnly)
{ {
const bool bGlobalNamesToLocal = false; const bool bGlobalNamesToLocal = false;

View File

@ -936,7 +936,7 @@ void ScDocument::BroadcastUno( const SfxHint &rHint )
// because they can add or remove objects from pUnoBroadcaster. // because they can add or remove objects from pUnoBroadcaster.
if ( pUnoListenerCalls && if ( pUnoListenerCalls &&
rHint.GetId() == SFX_HINT_DATACHANGED && rHint.GetId() == SfxHintId::DataChanged &&
!bInUnoListenerCall ) !bInUnoListenerCall )
{ {
// Listener calls may lead to BroadcastUno calls again. The listener calls // Listener calls may lead to BroadcastUno calls again. The listener calls

View File

@ -82,7 +82,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
} }
} }
void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool bBroadcastSingleBroadcasters ) void ScDocument::BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters )
{ {
PrepareFormulaCalc(); PrepareFormulaCalc();
@ -126,7 +126,7 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool b
pTab->SetStreamValid(false); pTab->SetStreamValid(false);
} }
BroadcastUno(SfxHint(SC_HINT_DATACHANGED)); BroadcastUno(SfxHint(SfxHintId::ScDataChanged));
} }
namespace { namespace {
@ -535,7 +535,7 @@ bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
return pCell->GetPreviousTrack() || pFormulaTrack == pCell; return pCell->GetPreviousTrack() || pFormulaTrack == pCell;
} }
void ScDocument::FinalTrackFormulas( sal_uInt32 nHintId ) void ScDocument::FinalTrackFormulas( SfxHintId nHintId )
{ {
mbTrackFormulasPending = false; mbTrackFormulasPending = false;
mbFinalTrackFormulas = true; mbFinalTrackFormulas = true;
@ -556,9 +556,9 @@ void ScDocument::FinalTrackFormulas( sal_uInt32 nHintId )
The next is broadcasted again, and so on. The next is broadcasted again, and so on.
View initiates Interpret. View initiates Interpret.
*/ */
void ScDocument::TrackFormulas( sal_uInt32 nHintId ) void ScDocument::TrackFormulas( SfxHintId nHintId )
{ {
if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && nHintId == SC_HINT_DATACHANGED) if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && nHintId == SfxHintId::ScDataChanged)
{ {
SetTrackFormulasPending(); SetTrackFormulasPending();
return; return;

View File

@ -849,7 +849,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin)
if (bAny) if (bAny)
{ {
TrackFormulas(); TrackFormulas();
pShell->Broadcast( SfxHint(FID_DATACHANGED) ); pShell->Broadcast( SfxHint(SfxHintId::ScDataChanged) );
// #i101960# set document modified, as in TrackTimeHdl for DDE links // #i101960# set document modified, as in TrackTimeHdl for DDE links
if (!pShell->IsModified()) if (!pShell->IsModified())

View File

@ -1241,7 +1241,7 @@ struct BroadcastRecalcOnRefMoveHandler : std::unary_function<ScTable*, void>
explicit BroadcastRecalcOnRefMoveHandler( ScDocument* pDoc ) : explicit BroadcastRecalcOnRefMoveHandler( ScDocument* pDoc ) :
aSwitch( *pDoc, false), aSwitch( *pDoc, false),
aBulk( pDoc->GetBASM(), SC_HINT_DATACHANGED) aBulk( pDoc->GetBASM(), SfxHintId::ScDataChanged)
{ {
} }
@ -2734,7 +2734,7 @@ public:
assert(mpCol); assert(mpCol);
ScRange aRange(mpCol->GetCol(), nRow1, mpCol->GetTab()); ScRange aRange(mpCol->GetCol(), nRow1, mpCol->GetTab());
aRange.aEnd.SetRow(nRow2); aRange.aEnd.SetRow(nRow2);
mrDoc.BroadcastCells(aRange, SC_HINT_DATACHANGED); mrDoc.BroadcastCells(aRange, SfxHintId::ScDataChanged);
}; };
}; };
@ -2943,7 +2943,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
StartListeningFromClip( nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag ); StartListeningFromClip( nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag );
{ {
ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
// Set all formula cells dirty, and collect non-empty non-formula cell // Set all formula cells dirty, and collect non-empty non-formula cell
// positions so that we can broadcast on them below. // positions so that we can broadcast on them below.
@ -3031,7 +3031,7 @@ void ScDocument::CopyMultiRangeFromClip(
aDestRange.aEnd.Col(), aDestRange.aEnd.Row(), rMark, nInsFlag ); aDestRange.aEnd.Col(), aDestRange.aEnd.Row(), rMark, nInsFlag );
{ {
ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
// Set formula cells dirty and collect non-formula cells. // Set formula cells dirty and collect non-formula cells.
SetDirtyFromClip( SetDirtyFromClip(
@ -3325,7 +3325,7 @@ bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString&
// Listeners may just have been setup that are affected by the current // Listeners may just have been setup that are affected by the current
// position thus were not notified by a ScColumn::BroadcastNewCell() // position thus were not notified by a ScColumn::BroadcastNewCell()
// during ScTable::SetString(), so do it here. // during ScTable::SetString(), so do it here.
Broadcast( ScHint( SC_HINT_DATACHANGED, aPos)); Broadcast( ScHint( SfxHintId::ScDataChanged, aPos));
} }
else else
{ {
@ -3436,7 +3436,7 @@ void ScDocument::SetValue( const ScAddress& rPos, double fVal )
// Listeners may just have been setup that are affected by the current // Listeners may just have been setup that are affected by the current
// position thus were not notified by a ScColumn::BroadcastNewCell() // position thus were not notified by a ScColumn::BroadcastNewCell()
// during ScTable::SetValue(), so do it here. // during ScTable::SetValue(), so do it here.
Broadcast( ScHint( SC_HINT_DATACHANGED, rPos)); Broadcast( ScHint( SfxHintId::ScDataChanged, rPos));
} }
else else
{ {
@ -3774,7 +3774,7 @@ void ScDocument::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt )
bool bOldAutoCalc = GetAutoCalc(); bool bOldAutoCalc = GetAutoCalc();
bAutoCalc = false; // no mulitple calculations bAutoCalc = false; // no mulitple calculations
{ // scope for bulk broadcast { // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
TableContainer::iterator it = maTabs.begin(); TableContainer::iterator it = maTabs.begin();
for (;it != maTabs.end(); ++it) for (;it != maTabs.end(); ++it)
if (*it) if (*it)
@ -3795,7 +3795,7 @@ void ScDocument::SetDirty( const ScRange& rRange, bool bIncludeEmptyCells )
bool bOldAutoCalc = GetAutoCalc(); bool bOldAutoCalc = GetAutoCalc();
bAutoCalc = false; // no mulitple calculations bAutoCalc = false; // no mulitple calculations
{ // scope for bulk broadcast { // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
SCTAB nTab2 = rRange.aEnd.Tab(); SCTAB nTab2 = rRange.aEnd.Tab();
for (SCTAB i=rRange.aStart.Tab(); i<=nTab2 && i < static_cast<SCTAB>(maTabs.size()); i++) for (SCTAB i=rRange.aStart.Tab(); i<=nTab2 && i < static_cast<SCTAB>(maTabs.size()); i++)
if (maTabs[i]) maTabs[i]->SetDirty( rRange, if (maTabs[i]) maTabs[i]->SetDirty( rRange,
@ -3806,7 +3806,7 @@ void ScDocument::SetDirty( const ScRange& rRange, bool bIncludeEmptyCells )
* desired side effect, or should we come up with a method that * desired side effect, or should we come up with a method that
* doesn't? */ * doesn't? */
if (bIncludeEmptyCells) if (bIncludeEmptyCells)
BroadcastCells( rRange, SC_HINT_DATACHANGED, false); BroadcastCells( rRange, SfxHintId::ScDataChanged, false);
} }
SetAutoCalc( bOldAutoCalc ); SetAutoCalc( bOldAutoCalc );
} }

View File

@ -2204,8 +2204,8 @@ void ScFormulaCell::Notify( const SfxHint& rHint )
if (pDocument->IsInDtorClear()) if (pDocument->IsInDtorClear())
return; return;
const sal_uInt32 nHint = rHint.GetId(); const SfxHintId nHint = rHint.GetId();
if (nHint == SC_HINT_REFERENCE) if (nHint == SfxHintId::ScReference)
{ {
const sc::RefHint& rRefHint = static_cast<const sc::RefHint&>(rHint); const sc::RefHint& rRefHint = static_cast<const sc::RefHint&>(rHint);
@ -2272,10 +2272,10 @@ void ScFormulaCell::Notify( const SfxHint& rHint )
if ( pDocument->GetHardRecalcState() == ScDocument::HARDRECALCSTATE_OFF ) if ( pDocument->GetHardRecalcState() == ScDocument::HARDRECALCSTATE_OFF )
{ {
if (nHint & (SC_HINT_DATACHANGED | SC_HINT_TABLEOPDIRTY)) if (nHint == SfxHintId::ScDataChanged || nHint == SfxHintId::ScTableOpDirty)
{ {
bool bForceTrack = false; bool bForceTrack = false;
if ( nHint & SC_HINT_TABLEOPDIRTY ) if ( nHint == SfxHintId::ScTableOpDirty )
{ {
bForceTrack = !bTableOpDirty; bForceTrack = !bTableOpDirty;
if ( !bTableOpDirty ) if ( !bTableOpDirty )
@ -2395,7 +2395,7 @@ void ScFormulaCell::SetTableOpDirty()
bTableOpDirty = true; bTableOpDirty = true;
} }
pDocument->AppendToFormulaTrack( this ); pDocument->AppendToFormulaTrack( this );
pDocument->TrackFormulas( SC_HINT_TABLEOPDIRTY ); pDocument->TrackFormulas( SfxHintId::ScTableOpDirty );
} }
} }
} }

View File

@ -269,7 +269,7 @@ bool ScStyleSheet::IsUsed() const
void ScStyleSheet::Notify( SfxBroadcaster&, const SfxHint& rHint ) void ScStyleSheet::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
GetItemSet().SetParent( nullptr ); GetItemSet().SetParent( nullptr );
} }

View File

@ -242,7 +242,7 @@ void ScTable::DeleteRow(
} }
{ // scope for bulk broadcast { // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SfxHintId::ScDataChanged);
for (SCCOL j=nStartCol; j<=nEndCol; j++) for (SCCOL j=nStartCol; j<=nEndCol; j++)
aCol[j].DeleteRow(nStartRow, nSize, pGroupPos); aCol[j].DeleteRow(nStartRow, nSize, pGroupPos);
} }
@ -430,7 +430,7 @@ void ScTable::DeleteArea(
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2)) if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{ {
{ // scope for bulk broadcast { // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SfxHintId::ScDataChanged);
for (SCCOL i = nCol1; i <= nCol2; i++) for (SCCOL i = nCol1; i <= nCol2; i++)
aCol[i].DeleteArea(nRow1, nRow2, nDelFlag, bBroadcast, pBroadcastSpans); aCol[i].DeleteArea(nRow1, nRow2, nDelFlag, bBroadcast, pBroadcastSpans);
} }
@ -457,7 +457,7 @@ void ScTable::DeleteArea(
void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast ) void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast )
{ {
{ // scope for bulk broadcast { // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SC_HINT_DATACHANGED); ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SfxHintId::ScDataChanged);
for (SCCOL i=0; i<=MAXCOL; i++) for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].DeleteSelection(nDelFlag, rMark, bBroadcast); aCol[i].DeleteSelection(nDelFlag, rMark, bBroadcast);
} }

View File

@ -211,7 +211,7 @@ public:
void EndListeningArea( void EndListeningArea(
const ScRange& rRange, bool bGroupListening, SvtListener* pListener, ScBroadcastArea*& rpArea ); const ScRange& rRange, bool bGroupListening, SvtListener* pListener, ScBroadcastArea*& rpArea );
bool AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint ); bool AreaBroadcast( const ScRange& rRange, SfxHintId nHint );
bool AreaBroadcast( const ScHint& rHint ); bool AreaBroadcast( const ScHint& rHint );
void DelBroadcastAreasInRange( const ScRange& rRange ); void DelBroadcastAreasInRange( const ScRange& rRange );
void UpdateRemove( UpdateRefMode eUpdateRefMode, void UpdateRemove( UpdateRefMode eUpdateRefMode,
@ -310,7 +310,7 @@ public:
void EndListeningArea( void EndListeningArea(
const ScRange& rRange, bool bGroupListening, SvtListener* pListener ); const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
bool AreaBroadcast( const ScRange& rRange, sal_uInt32 nHint ); bool AreaBroadcast( const ScRange& rRange, SfxHintId nHint );
bool AreaBroadcast( const ScHint& rHint ) const; bool AreaBroadcast( const ScHint& rHint ) const;
// return: at least one broadcast occurred // return: at least one broadcast occurred
void DelBroadcastAreasInRange( const ScRange& rRange ); void DelBroadcastAreasInRange( const ScRange& rRange );
@ -318,12 +318,12 @@ public:
const ScRange& rRange, const ScRange& rRange,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
void EnterBulkBroadcast(); void EnterBulkBroadcast();
void LeaveBulkBroadcast( sal_uInt32 nHintId ); void LeaveBulkBroadcast( SfxHintId nHintId );
bool InsertBulkArea( const ScBroadcastArea* p ); bool InsertBulkArea( const ScBroadcastArea* p );
void InsertBulkGroupArea( ScBroadcastArea* pArea, const ScRange& rRange ); void InsertBulkGroupArea( ScBroadcastArea* pArea, const ScRange& rRange );
void RemoveBulkGroupArea( ScBroadcastArea* pArea ); void RemoveBulkGroupArea( ScBroadcastArea* pArea );
bool BulkBroadcastGroupAreas( sal_uInt32 nHintId ); bool BulkBroadcastGroupAreas( SfxHintId nHintId );
/// @return: how many removed /// @return: how many removed
size_t RemoveBulkArea( const ScBroadcastArea* p ); size_t RemoveBulkArea( const ScBroadcastArea* p );
@ -350,9 +350,9 @@ public:
class ScBulkBroadcast class ScBulkBroadcast
{ {
ScBroadcastAreaSlotMachine* pBASM; ScBroadcastAreaSlotMachine* pBASM;
sal_uInt32 mnHintId; SfxHintId mnHintId;
public: public:
explicit ScBulkBroadcast( ScBroadcastAreaSlotMachine* p, sal_uInt32 nHintId ) : explicit ScBulkBroadcast( ScBroadcastAreaSlotMachine* p, SfxHintId nHintId ) :
pBASM(p), pBASM(p),
mnHintId(nHintId) mnHintId(nHintId)
{ {

View File

@ -114,13 +114,13 @@ void SAL_CALL ScAddInListener::modified( const css::sheet::ResultEvent& aEvent )
// notify document of changes // notify document of changes
Broadcast( ScHint(SC_HINT_DATACHANGED, ScAddress()) ); Broadcast( ScHint(SfxHintId::ScDataChanged, ScAddress()) );
for ( ScAddInDocs::iterator it = pDocs->begin(); it != pDocs->end(); ++it ) for ( ScAddInDocs::iterator it = pDocs->begin(); it != pDocs->end(); ++it )
{ {
ScDocument* pDoc = *it; ScDocument* pDoc = *it;
pDoc->TrackFormulas(); pDoc->TrackFormulas();
pDoc->GetDocumentShell()->Broadcast( SfxHint( FID_DATACHANGED ) ); pDoc->GetDocumentShell()->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
} }
} }

View File

@ -106,13 +106,13 @@ void ScAddInAsync::CallBack( sal_uLong nHandleP, void* pData )
return; return;
} }
p->bValid = true; p->bValid = true;
p->Broadcast( ScHint(SC_HINT_DATACHANGED, ScAddress()) ); p->Broadcast( ScHint(SfxHintId::ScDataChanged, ScAddress()) );
for ( ScAddInDocs::iterator it = p->pDocs->begin(); it != p->pDocs->end(); ++it ) for ( ScAddInDocs::iterator it = p->pDocs->begin(); it != p->pDocs->end(); ++it )
{ {
ScDocument* pDoc = *it; ScDocument* pDoc = *it;
pDoc->TrackFormulas(); pDoc->TrackFormulas();
pDoc->GetDocumentShell()->Broadcast( SfxHint( FID_DATACHANGED ) ); pDoc->GetDocumentShell()->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
} }
} }

View File

@ -19,7 +19,7 @@
#include "brdcst.hxx" #include "brdcst.hxx"
ScHint::ScHint( sal_uInt32 n, const ScAddress& a ) : ScHint::ScHint( SfxHintId n, const ScAddress& a ) :
SfxHint(n), aAddress(a) {} SfxHint(n), aAddress(a) {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -21,8 +21,8 @@ struct BulkDataHint::Impl
mpSpans(nullptr) {} mpSpans(nullptr) {}
}; };
BulkDataHint::BulkDataHint( ScDocument& rDoc, sal_uInt32 nHintId ) : BulkDataHint::BulkDataHint( ScDocument& rDoc, SfxHintId nHintId ) :
SfxHint( SC_HINT_BULK_DATACHANGED | nHintId ), mpImpl(new Impl(rDoc)) {} SfxHint( nHintId ), mpImpl(new Impl(rDoc)) {}
BulkDataHint::~BulkDataHint() BulkDataHint::~BulkDataHint()
{ {

View File

@ -194,7 +194,7 @@ uno::Reference< chart::XChartData > ScChartListener::GetUnoSource() const
void ScChartListener::Notify( const SfxHint& rHint ) void ScChartListener::Notify( const SfxHint& rHint )
{ {
const ScHint* p = dynamic_cast<const ScHint*>(&rHint); const ScHint* p = dynamic_cast<const ScHint*>(&rHint);
if (p && (p->GetId() & SC_HINT_DATACHANGED)) if (p && (p->GetId() == SfxHintId::ScDataChanged))
SetUpdateQueue(); SetUpdateQueue();
} }

View File

@ -893,7 +893,7 @@ void ScDBData::Notify( const SfxHint& rHint )
if (!pScHint) if (!pScHint)
return; return;
if (pScHint->GetId() & SC_HINT_DATACHANGED) if (pScHint->GetId() == SfxHintId::ScDataChanged)
{ {
mbTableColumnNamesDirty = true; mbTableColumnNamesDirty = true;
if (!mpContainer) if (!mpContainer)

View File

@ -198,7 +198,7 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged(
if (HasListeners()) if (HasListeners())
{ {
Broadcast(ScHint(SC_HINT_DATACHANGED, ScAddress())); Broadcast(ScHint(SfxHintId::ScDataChanged, ScAddress()));
pDoc->TrackFormulas(); // muss sofort passieren pDoc->TrackFormulas(); // muss sofort passieren
pDoc->StartTrackTimer(); pDoc->StartTrackTimer();

View File

@ -107,14 +107,13 @@ ScRange FormulaGroupAreaListener::getListeningRange() const
void FormulaGroupAreaListener::Notify( const SfxHint& rHint ) void FormulaGroupAreaListener::Notify( const SfxHint& rHint )
{ {
// SC_HINT_BULK_DATACHANGED may include (SC_HINT_DATACHANGED | // BulkDataHint may include (SfxHintId::ScDataChanged |
// SC_HINT_TABLEOPDIRTY) so has to be checked first. // SfxHintId::ScTableOpDirty) so has to be checked first.
if (rHint.GetId() & SC_HINT_BULK_DATACHANGED) if ( const BulkDataHint* pBulkHint = dynamic_cast<const BulkDataHint*>(&rHint) )
{ {
const BulkDataHint& rBulkHint = static_cast<const BulkDataHint&>(rHint); notifyBulkChange(*pBulkHint);
notifyBulkChange(rBulkHint);
} }
else if (rHint.GetId() & (SC_HINT_DATACHANGED | SC_HINT_TABLEOPDIRTY)) else if (rHint.GetId() == SfxHintId::ScDataChanged || rHint.GetId() == SfxHintId::ScTableOpDirty)
{ {
notifyCellChange(rHint, static_cast<const ScHint*>(&rHint)->GetAddress()); notifyCellChange(rHint, static_cast<const ScHint*>(&rHint)->GetAddress());
} }
@ -151,7 +150,7 @@ void FormulaGroupAreaListener::notifyBulkChange( const BulkDataHint& rHint )
std::vector<ScFormulaCell*> aCells; std::vector<ScFormulaCell*> aCells;
aAction.swapCells(aCells); aAction.swapCells(aCells);
ScHint aHint(SC_HINT_DATACHANGED, ScAddress()); ScHint aHint(SfxHintId::ScDataChanged, ScAddress());
std::for_each(aCells.begin(), aCells.end(), Notifier(aHint)); std::for_each(aCells.begin(), aCells.end(), Notifier(aHint));
} }

View File

@ -111,7 +111,7 @@ void ScLookupCache::Notify( const SfxHint& rHint )
if (!mpDoc->IsInDtorClear()) if (!mpDoc->IsInDtorClear())
{ {
const ScHint* p = dynamic_cast<const ScHint*>(&rHint); const ScHint* p = dynamic_cast<const ScHint*>(&rHint);
if ((p && (p->GetId() & SC_HINT_DATACHANGED)) || dynamic_cast<const ScAreaChangedHint*>(&rHint)) if ((p && (p->GetId() == SfxHintId::ScDataChanged)) || dynamic_cast<const ScAreaChangedHint*>(&rHint))
{ {
mpDoc->RemoveLookupCache( *this); mpDoc->RemoveLookupCache( *this);
delete this; delete this;

View File

@ -11,7 +11,7 @@
namespace sc { namespace sc {
RefHint::RefHint( Type eType ) : SfxHint(SC_HINT_REFERENCE), meType(eType) {} RefHint::RefHint( Type eType ) : SfxHint(SfxHintId::ScReference), meType(eType) {}
RefHint::~RefHint() {} RefHint::~RefHint() {}
RefHint::Type RefHint::getType() const RefHint::Type RefHint::getType() const

View File

@ -126,7 +126,7 @@ void SAL_CALL ScAccessibleContextBase::release()
void ScAccessibleContextBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) void ScAccessibleContextBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
if (rHint.GetId() == SFX_HINT_DYING) if (rHint.GetId() == SfxHintId::Dying)
{ {
// it seems the Broadcaster is dying, since the view is dying // it seems the Broadcaster is dying, since the view is dying
dispose(); dispose();

View File

@ -1551,7 +1551,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else else
{ {
// only notify if child exist, otherwise it is not necessary // only notify if child exist, otherwise it is not necessary
if ((rHint.GetId() == SC_HINT_ACC_TABLECHANGED) && if ((rHint.GetId() == SfxHintId::ScAccTableChanged) &&
mpAccessibleSpreadsheet.is()) mpAccessibleSpreadsheet.is())
{ {
FreeAccessibleSpreadsheet(); FreeAccessibleSpreadsheet();
@ -1575,12 +1575,12 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpAccessibleSpreadsheet.is()) if (mpAccessibleSpreadsheet.is())
mpAccessibleSpreadsheet->FireFirstCellFocus(); mpAccessibleSpreadsheet->FireFirstCellFocus();
} }
else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER) else if (rHint.GetId() == SfxHintId::ScAccMakeDrawLayer)
{ {
if (mpChildrenShapes) if (mpChildrenShapes)
mpChildrenShapes->SetDrawBroadcaster(); mpChildrenShapes->SetDrawBroadcaster();
} }
else if ((rHint.GetId() == SC_HINT_ACC_ENTEREDITMODE)) // this event comes only on creating edit field of a cell else if ((rHint.GetId() == SfxHintId::ScAccEnterEditMode)) // this event comes only on creating edit field of a cell
{ {
if (mpViewShell->GetViewData().HasEditView(meSplitPos)) if (mpViewShell->GetViewData().HasEditView(meSplitPos))
{ {
@ -1604,7 +1604,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
} }
} }
} }
else if (rHint.GetId() == SC_HINT_ACC_LEAVEEDITMODE) else if (rHint.GetId() == SfxHintId::ScAccLeaveEditMode)
{ {
if (mxTempAcc.is()) if (mxTempAcc.is())
{ {
@ -1619,7 +1619,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
CommitFocusGained(); CommitFocusGained();
} }
} }
else if ((rHint.GetId() == SC_HINT_ACC_VISAREACHANGED) || (rHint.GetId() == SC_HINT_ACC_WINDOWRESIZED)) else if ((rHint.GetId() == SfxHintId::ScAccVisAreaChanged) || (rHint.GetId() == SfxHintId::ScAccWindowResized))
{ {
Rectangle aOldVisArea(maVisArea); Rectangle aOldVisArea(maVisArea);
maVisArea = GetVisibleArea_Impl(); maVisArea = GetVisibleArea_Impl();

View File

@ -1236,7 +1236,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
else else
{ {
// only notify if child exist, otherwise it is not necessary // only notify if child exist, otherwise it is not necessary
if (rHint.GetId() == SC_HINT_DATACHANGED) if (rHint.GetId() == SfxHintId::ScDataChanged)
{ {
if (mpTable.is()) // if there is no table there is nothing to notify, because no one recongnizes the change if (mpTable.is()) // if there is no table there is nothing to notify, because no one recongnizes the change
{ {
@ -1284,11 +1284,11 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
} }
} }
} }
else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER) else if (rHint.GetId() == SfxHintId::ScAccMakeDrawLayer)
{ {
GetShapeChildren()->SetDrawBroadcaster(); GetShapeChildren()->SetDrawBroadcaster();
} }
else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED) else if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{ {
Size aOutputSize; Size aOutputSize;
vcl::Window* pSizeWindow = mpViewShell->GetWindow(); vcl::Window* pSizeWindow = mpViewShell->GetWindow();

View File

@ -123,7 +123,7 @@ void SAL_CALL ScAccessiblePageHeader::disposing()
void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
// only notify if child exist, otherwise it is not necessary // only notify if child exist, otherwise it is not necessary
if (rHint.GetId() == SC_HINT_DATACHANGED) if (rHint.GetId() == SfxHintId::ScDataChanged)
{ {
ScHFAreas aOldAreas(maAreas); ScHFAreas aOldAreas(maAreas);
std::for_each(aOldAreas.begin(), aOldAreas.end(), Acquire()); std::for_each(aOldAreas.begin(), aOldAreas.end(), Acquire());
@ -157,7 +157,7 @@ void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
} }
std::for_each(aOldAreas.begin(), aOldAreas.end(), Release()); std::for_each(aOldAreas.begin(), aOldAreas.end(), Release());
} }
else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED) else if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{ {
AccessibleEventObject aEvent; AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED; aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;

View File

@ -93,7 +93,7 @@ void SAL_CALL ScAccessiblePageHeaderArea::disposing()
void ScAccessiblePageHeaderArea::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessiblePageHeaderArea::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
// only notify if child exist, otherwise it is not necessary // only notify if child exist, otherwise it is not necessary
if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED) if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{ {
if (mpTextHelper) if (mpTextHelper)
mpTextHelper->UpdateChildren(); mpTextHelper->UpdateChildren();

View File

@ -83,7 +83,7 @@ void SAL_CALL ScAccessiblePreviewCell::disposing()
void ScAccessiblePreviewCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessiblePreviewCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED) if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{ {
if (mpTextHelper) if (mpTextHelper)
mpTextHelper->UpdateChildren(); mpTextHelper->UpdateChildren();

View File

@ -116,13 +116,13 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::disposing()
void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
const sal_uInt32 nId = rHint.GetId(); const SfxHintId nId = rHint.GetId();
if (nId == SC_HINT_ACC_VISAREACHANGED) if (nId == SfxHintId::ScAccVisAreaChanged)
{ {
if (mpTextHelper) if (mpTextHelper)
mpTextHelper->UpdateChildren(); mpTextHelper->UpdateChildren();
} }
else if ( nId == SFX_HINT_DATACHANGED ) else if ( nId == SfxHintId::DataChanged )
{ {
// column / row layout may change with any document change, // column / row layout may change with any document change,
// so it must be invalidated // so it must be invalidated

View File

@ -86,14 +86,14 @@ void SAL_CALL ScAccessiblePreviewTable::disposing()
void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
const sal_uInt32 nId = rHint.GetId(); const SfxHintId nId = rHint.GetId();
if ( nId == SFX_HINT_DATACHANGED ) if ( nId == SfxHintId::DataChanged )
{ {
// column / row layout may change with any document change, // column / row layout may change with any document change,
// so it must be invalidated // so it must be invalidated
DELETEZ( mpTableInfo ); DELETEZ( mpTableInfo );
} }
else if (nId == SC_HINT_ACC_VISAREACHANGED) else if (nId == SfxHintId::ScAccVisAreaChanged)
{ {
AccessibleEventObject aEvent; AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED; aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;

View File

@ -427,7 +427,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
((rRef.GetRange().aStart.Row() == maRange.aStart.Row()) && ((rRef.GetRange().aStart.Row() == maRange.aStart.Row()) &&
(rRef.GetRange().aEnd.Row() == maRange.aEnd.Row()))) (rRef.GetRange().aEnd.Row() == maRange.aEnd.Row())))
{ {
// ignore next SC_HINT_DATACHANGED notification // ignore next SfxHintId::ScDataChanged notification
mbDelIns = true; mbDelIns = true;
sal_Int16 nId(0); sal_Int16 nId(0);
@ -479,7 +479,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
} }
else else
{ {
if (rHint.GetId() == SC_HINT_ACC_CURSORCHANGED) if (rHint.GetId() == SfxHintId::ScAccCursorChanged)
{ {
if (mpViewShell) if (mpViewShell)
{ {
@ -657,7 +657,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
m_LastMarkedRanges = *mpMarkedRanges; m_LastMarkedRanges = *mpMarkedRanges;
} }
} }
else if (rHint.GetId() == SC_HINT_DATACHANGED) else if (rHint.GetId() == SfxHintId::ScDataChanged)
{ {
if (!mbDelIns) if (!mbDelIns)
CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE); CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);

View File

@ -680,7 +680,7 @@ ScAccessibleCellTextData::~ScAccessibleCellTextData()
void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
mpViewShell = nullptr; // invalid now mpViewShell = nullptr; // invalid now
if (mpViewForwarder) if (mpViewForwarder)
@ -907,7 +907,7 @@ ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
mpWindow = nullptr; mpWindow = nullptr;
mpEditView = nullptr; mpEditView = nullptr;
@ -1165,7 +1165,7 @@ ScAccessiblePreviewCellTextData::~ScAccessiblePreviewCellTextData()
void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
mpViewShell = nullptr; // invalid now mpViewShell = nullptr; // invalid now
if (mpViewForwarder) if (mpViewForwarder)
@ -1238,7 +1238,7 @@ ScAccessiblePreviewHeaderCellTextData::~ScAccessiblePreviewHeaderCellTextData()
void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
mpViewShell = nullptr; // invalid now mpViewShell = nullptr; // invalid now
if (mpViewForwarder) if (mpViewForwarder)
@ -1356,7 +1356,7 @@ ScAccessibleTextData* ScAccessibleHeaderTextData::Clone() const
void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
mpViewShell = nullptr;// invalid now mpViewShell = nullptr;// invalid now
mpDocSh = nullptr; mpDocSh = nullptr;
@ -1469,7 +1469,7 @@ ScAccessibleTextData* ScAccessibleNoteTextData::Clone() const
void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
mpViewShell = nullptr;// invalid now mpViewShell = nullptr;// invalid now
mpDocSh = nullptr; mpDocSh = nullptr;
@ -1605,7 +1605,7 @@ ScAccessibleCsvTextData::~ScAccessibleCsvTextData()
void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
mpWindow = nullptr; mpWindow = nullptr;
mpEditEngine = nullptr; mpEditEngine = nullptr;

View File

@ -394,7 +394,7 @@ handle_r1c1:
{ {
mpEditEngine->SetUpdateMode( true ); mpEditEngine->SetUpdateMode( true );
pDocSh->Broadcast( SfxHint( SC_HINT_SHOWRANGEFINDER ) ); pDocSh->Broadcast( SfxHint( SfxHintId::ScShowRangeFinder ) );
} }
} }
@ -484,7 +484,7 @@ void ScInputHandler::DeleteRangeFinder()
{ {
ScDocShell* pDocSh = pActiveViewSh->GetViewData().GetDocShell(); ScDocShell* pDocSh = pActiveViewSh->GetViewData().GetDocShell();
pRangeFindList->SetHidden(true); pRangeFindList->SetHidden(true);
pDocSh->Broadcast( SfxHint( SC_HINT_SHOWRANGEFINDER ) ); // Steal pDocSh->Broadcast( SfxHint( SfxHintId::ScShowRangeFinder ) ); // Steal
DELETEZ(pRangeFindList); DELETEZ(pRangeFindList);
} }
} }
@ -1838,7 +1838,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron
EnterHandler(); EnterHandler();
bFormulaMode = false; bFormulaMode = false;
pRefViewSh = nullptr; pRefViewSh = nullptr;
SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr); SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin) if (pInputWin)
pInputWin->SetFormulaMode(false); pInputWin->SetFormulaMode(false);
@ -2368,7 +2368,7 @@ void ScInputHandler::UpdateFormulaMode()
{ {
bFormulaMode = true; bFormulaMode = true;
pRefViewSh = pActiveViewSh; pRefViewSh = pActiveViewSh;
pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(this); SC_MOD()->SetRefInputHdl(this);
if (pInputWin) if (pInputWin)
pInputWin->SetFormulaMode(true); pInputWin->SetFormulaMode(true);
@ -2387,7 +2387,7 @@ void ScInputHandler::UpdateFormulaMode()
ShowRefFrame(); ShowRefFrame();
bFormulaMode = false; bFormulaMode = false;
pRefViewSh = nullptr; pRefViewSh = nullptr;
pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr); SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin) if (pInputWin)
pInputWin->SetFormulaMode(false); pInputWin->SetFormulaMode(false);
@ -2819,7 +2819,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
} }
bFormulaMode = false; bFormulaMode = false;
pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr); SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin) if (pInputWin)
pInputWin->SetFormulaMode(false); pInputWin->SetFormulaMode(false);
@ -2874,7 +2874,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
} }
} }
pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW_NOPAINT ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScKillEditViewNoPaint ) );
if ( pExecuteSh ) if ( pExecuteSh )
{ {
@ -2903,7 +2903,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
pLastState = nullptr; pLastState = nullptr;
} }
else else
pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget ) if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{ {
@ -2947,7 +2947,7 @@ void ScInputHandler::CancelHandler()
pExecuteSh->ActiveGrabFocus(); pExecuteSh->ActiveGrabFocus();
} }
bFormulaMode = false; bFormulaMode = false;
SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr); SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin) if (pInputWin)
pInputWin->SetFormulaMode(false); pInputWin->SetFormulaMode(false);
@ -3697,7 +3697,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
} }
if (bStopEditing) if (bStopEditing)
SfxGetpApp()->Broadcast( SfxHint( FID_KILLEDITVIEW ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
// As long as the content is not edited, turn off online spelling. // As long as the content is not edited, turn off online spelling.
// Online spelling is turned back on in StartTable, after setting // Online spelling is turned back on in StartTable, after setting

View File

@ -1518,7 +1518,7 @@ IMPL_LINK(ScTextWnd, NotifyHdl, EENotify&, rNotify, void)
// down to generate a scroll event // down to generate a scroll event
if ( rNotify.eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED if ( rNotify.eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED
|| rNotify.eNotificationType == EE_NOTIFY_TEXTHEIGHTCHANGED ) || rNotify.eNotificationType == EE_NOTIFY_TextHeightChanged )
SetScrollBarRange(); SetScrollBarRange();
} }
@ -1954,8 +1954,8 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
} }
else else
{ {
const sal_uInt32 nHintId = rHint.GetId(); const SfxHintId nHintId = rHint.GetId();
if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL) if ( nHintId == SfxHintId::ScAreasChanged || nHintId == SfxHintId::ScNavigatorUpdateAll)
FillRangeNames(); FillRangeNames();
} }
} }

View File

@ -190,7 +190,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
SetPool( pMessagePool ); SetPool( pMessagePool );
ScGlobal::InitTextHeight( pMessagePool ); ScGlobal::InitTextHeight( pMessagePool );
StartListening( *SfxGetpApp() ); // for SFX_HINT_DEINITIALIZING StartListening( *SfxGetpApp() ); // for SfxHintId::Deinitializing
} }
ScModule::~ScModule() ScModule::~ScModule()
@ -322,7 +322,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, Configura
void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint ) void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
if ( rHint.GetId() == SFX_HINT_DEINITIALIZING ) if ( rHint.GetId() == SfxHintId::Deinitializing )
{ {
// ConfigItems must be removed before ConfigManager // ConfigItems must be removed before ConfigManager
DeleteCfg(); DeleteCfg();
@ -1253,7 +1253,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
SetPrintOptions( rNewOpt ); SetPrintOptions( rNewOpt );
// broadcast causes all previews to recalc page numbers // broadcast causes all previews to recalc page numbers
SfxGetpApp()->Broadcast( SfxHint( SID_SCPRINTOPTIONS ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScPrintOptions ) );
} }
if ( bSaveAppOptions ) if ( bSaveAppOptions )
@ -1555,7 +1555,7 @@ void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm )
} }
SfxApplication* pSfxApp = SfxGetpApp(); SfxApplication* pSfxApp = SfxGetpApp();
pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
} }
} }

View File

@ -95,8 +95,8 @@ ScTablesHint::~ScTablesHint()
{ {
} }
ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) : ScIndexHint::ScIndexHint(SfxHintId nNewId, sal_uInt16 nIdx) :
nId( nNewId ), SfxHint( nNewId ),
nIndex( nIdx ) nIndex( nIdx )
{ {
} }

View File

@ -470,12 +470,7 @@ void UpdateStyleList(ListBox& rLbStyle, ScDocument* pDoc)
void ScConditionFrmtEntry::Notify(SfxBroadcaster&, const SfxHint& rHint) void ScConditionFrmtEntry::Notify(SfxBroadcaster&, const SfxHint& rHint)
{ {
const SfxStyleSheetHint* pHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint); if(rHint.GetId() == SfxHintId::StyleSheetModified)
if(!pHint)
return;
sal_uInt16 nHint = pHint->GetHint();
if(nHint == SfxStyleSheetHintId::MODIFIED)
{ {
if(!mbIsInStyleCreate) if(!mbIsInStyleCreate)
UpdateStyleList(*maLbStyle.get(), mpDoc); UpdateStyleList(*maLbStyle.get(), mpDoc);
@ -1301,12 +1296,7 @@ void ScDateFrmtEntry::SetInactive()
void ScDateFrmtEntry::Notify( SfxBroadcaster&, const SfxHint& rHint ) void ScDateFrmtEntry::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
const SfxStyleSheetHint* pHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint); if(rHint.GetId() == SfxHintId::StyleSheetModified)
if(!pHint)
return;
sal_uInt16 nHint = pHint->GetHint();
if(nHint == SfxStyleSheetHintId::MODIFIED)
{ {
if(!mbIsInStyleCreate) if(!mbIsInStyleCreate)
UpdateStyleList(*maLbStyle.get(), mpDoc); UpdateStyleList(*maLbStyle.get(), mpDoc);

View File

@ -106,7 +106,7 @@ bool ScDBDocFunc::AddDBRange( const OUString& rName, const ScRange& rRange, bool
} }
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
return true; return true;
} }
@ -139,7 +139,7 @@ bool ScDBDocFunc::DeleteDBRange(const OUString& rName)
} }
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
bDone = true; bDone = true;
} }
@ -186,7 +186,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew )
delete pUndoColl; delete pUndoColl;
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
bDone = true; bDone = true;
} }
} }
@ -267,7 +267,7 @@ void ScDBDocFunc::ModifyAllDBData( const ScDBCollection& rNewColl, const std::ve
pOldColl = nullptr; pOldColl = nullptr;
rDocShell.PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PaintPartFlags::Grid); rDocShell.PostPaint(ScRange(0, 0, 0, MAXCOL, MAXROW, MAXTAB), PaintPartFlags::Grid);
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
if (bRecord) if (bRecord)
{ {

View File

@ -2100,7 +2100,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
return bSuccess; return bSuccess;
} }
@ -2609,7 +2609,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
return true; return true;
} }
@ -2935,7 +2935,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
delete pClipDoc; delete pClipDoc;
return true; return true;
@ -3083,7 +3083,7 @@ bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
rDocShell.PostPaintExtras(); rDocShell.PostPaintExtras();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
bSuccess = true; bSuccess = true;
} }
else if (!bApi) else if (!bApi)
@ -3179,9 +3179,9 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ )
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
bSuccess = true; bSuccess = true;
} }
@ -3239,7 +3239,7 @@ void ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi )
if (!bVisible) if (!bVisible)
rDocShell.Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) ); rDocShell.Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) );
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PaintPartFlags::Extras); rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PaintPartFlags::Extras);
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
} }
@ -3301,7 +3301,7 @@ bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
} }
rDocShell.PostPaintExtras(); rDocShell.PostPaintExtras();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
bSuccess = true; bSuccess = true;
} }
@ -3338,7 +3338,7 @@ bool ScDocFunc::SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bo
rDocShell.PostPaintExtras(); rDocShell.PostPaintExtras();
ScDocShellModificator aModificator( rDocShell ); ScDocShellModificator aModificator( rDocShell );
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
bSuccess = true; bSuccess = true;
} }
@ -4953,7 +4953,7 @@ void ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTA
if (bModifyDoc) if (bModifyDoc)
{ {
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint(SC_HINT_AREAS_CHANGED) ); SfxGetpApp()->Broadcast( SfxHint(SfxHintId::ScAreasChanged) );
} }
} }
@ -4975,7 +4975,7 @@ void ScDocFunc::ModifyAllRangeNames(const std::map<OUString, std::unique_ptr<ScR
rDoc.CompileHybridFormula(); rDoc.CompileHybridFormula();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED)); SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
} }
void ScDocFunc::CreateOneName( ScRangeName& rList, void ScDocFunc::CreateOneName( ScRangeName& rList,
@ -5371,7 +5371,7 @@ void ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter,
if (pBindings) if (pBindings)
pBindings->Invalidate( SID_LINKS ); pBindings->Invalidate( SID_LINKS );
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator
} }
void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFormat* pFormat, SCTAB nTab, const ScRangeList& rRanges ) void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFormat* pFormat, SCTAB nTab, const ScRangeList& rRanges )
@ -5447,7 +5447,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
rDocShell.PostPaint(*pRepaintRange, PaintPartFlags::Grid); rDocShell.PostPaint(*pRepaintRange, PaintPartFlags::Grid);
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED)); SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
} }
void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab ) void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab )
@ -5475,7 +5475,7 @@ void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB
rDoc.SetStreamValid(nTab, false); rDoc.SetStreamValid(nTab, false);
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast(SfxHint(SC_HINT_AREAS_CHANGED)); SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
} }
void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction ) void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction )
@ -5507,7 +5507,7 @@ void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction
rDocShell.PostPaint(rRange, PaintPartFlags::Grid); rDocShell.PostPaint(rRange, PaintPartFlags::Grid);
rDocShell.PostDataChanged(); rDocShell.PostDataChanged();
rDoc.BroadcastCells(rRange, SC_HINT_DATACHANGED); rDoc.BroadcastCells(rRange, SfxHintId::ScDataChanged);
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
} }

View File

@ -507,7 +507,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css
else else
{ {
// still need to recalc volatile formula cells. // still need to recalc volatile formula cells.
aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS)); aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
} }
AfterXMLLoading(bRet); AfterXMLLoading(bRet);
@ -987,16 +987,11 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break; break;
} }
} }
else // Without parameter else if (rHint.GetId() == SfxHintId::TitleChanged) // Without parameter
{ {
switch ( rHint.GetId() )
{
case SFX_HINT_TITLECHANGED:
aDocument.SetName( SfxShell::GetName() ); aDocument.SetName( SfxShell::GetName() );
// RegisterNewTargetNames gibts nicht mehr // RegisterNewTargetNames gibts nicht mehr
SfxGetpApp()->Broadcast(SfxHint( SC_HINT_DOCNAME_CHANGED )); // Navigator SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDocNameChanged )); // Navigator
break;
}
} }
} }
@ -2488,8 +2483,8 @@ bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor, bool bRegisterRecent )
{ {
bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor, bRegisterRecent ); bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor, bRegisterRecent );
// SC_HINT_DOC_SAVED for change ReadOnly -> Read/Write // SfxHintId::ScDocSaved for change ReadOnly -> Read/Write
Broadcast( SfxHint( SC_HINT_DOC_SAVED ) ); Broadcast( SfxHint( SfxHintId::ScDocSaved ) );
return bRet; return bRet;
} }
@ -2804,7 +2799,7 @@ void ScDocShell::SetModified( bool bModified )
if ( SfxObjectShell::IsEnableSetModified() ) if ( SfxObjectShell::IsEnableSetModified() )
{ {
SfxObjectShell::SetModified( bModified ); SfxObjectShell::SetModified( bModified );
Broadcast( SfxHint( SFX_HINT_DOCCHANGED ) ); Broadcast( SfxHint( SfxHintId::DocChanged ) );
} }
} }
@ -2818,9 +2813,9 @@ void ScDocShell::SetDocumentModified()
{ {
// #i115009# broadcast BCA_BRDCST_ALWAYS, so a component can read recalculated results // #i115009# broadcast BCA_BRDCST_ALWAYS, so a component can read recalculated results
// of RecalcModeAlways formulas (like OFFSET) after modifying cells // of RecalcModeAlways formulas (like OFFSET) after modifying cells
aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS)); aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
aDocument.InvalidateTableArea(); // #i105279# needed here aDocument.InvalidateTableArea(); // #i105279# needed here
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) ); aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
pPaintLockData->SetModified(); // Later on ... pPaintLockData->SetModified(); // Later on ...
return; return;
@ -2836,7 +2831,7 @@ void ScDocShell::SetDocumentModified()
aDocument.InvalidateStyleSheetUsage(); aDocument.InvalidateStyleSheetUsage();
aDocument.InvalidateTableArea(); aDocument.InvalidateTableArea();
aDocument.InvalidateLastTableOpParams(); aDocument.InvalidateLastTableOpParams();
aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS)); aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() ) if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() )
aDocument.CalcFormulaTree( true ); aDocument.CalcFormulaTree( true );
aDocument.RefreshDirtyTableColumnNames(); aDocument.RefreshDirtyTableColumnNames();
@ -2857,7 +2852,7 @@ void ScDocShell::SetDocumentModified()
} }
// notify UNO objects after BCA_BRDCST_ALWAYS etc. // notify UNO objects after BCA_BRDCST_ALWAYS etc.
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) ); aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
} }
/** /**
@ -2895,7 +2890,7 @@ void ScDocShell::SetDrawModified()
if ( aDocument.IsChartListenerCollectionNeedsUpdate() ) if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
{ {
aDocument.UpdateChartListenerCollection(); aDocument.UpdateChartListenerCollection();
SfxGetpApp()->Broadcast(SfxHint( SC_HINT_DRAW_CHANGED )); // Navigator SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDrawChanged )); // Navigator
} }
SC_MOD()->AnythingChanged(); SC_MOD()->AnythingChanged();
} }
@ -3169,7 +3164,7 @@ void ScDocShellModificator::SetDocumentModified()
{ {
// uno broadcast is necessary for api to work // uno broadcast is necessary for api to work
// -> must also be done during xml import // -> must also be done during xml import
rDoc.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) ); rDoc.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
} }
} }

View File

@ -170,7 +170,7 @@ ScDrawLayer* ScDocShell::MakeDrawLayer()
aDocument.InitDrawLayer(this); aDocument.InitDrawLayer(this);
pDrawLayer = aDocument.GetDrawLayer(); pDrawLayer = aDocument.GetDrawLayer();
InitItems(); // including Undo and Basic InitItems(); // including Undo and Basic
Broadcast( SfxHint( SC_HINT_DRWLAYER_NEW ) ); Broadcast( SfxHint( SfxHintId::ScDrawLayerNew ) );
if (nDocumentLock) if (nDocumentLock)
pDrawLayer->setLock(true); pDrawLayer->setLock(true);
} }

View File

@ -84,8 +84,8 @@ void ScDocShell::PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddre
void ScDocShell::PostDataChanged() void ScDocShell::PostDataChanged()
{ {
Broadcast( SfxHint( FID_DATACHANGED ) ); Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
SfxGetpApp()->Broadcast(SfxHint( FID_ANYDATACHANGED )); // Navigator SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScAnyDataChanged )); // Navigator
aDocument.PrepareFormulaCalc(); aDocument.PrepareFormulaCalc();
//! Navigator direkt benachrichtigen! //! Navigator direkt benachrichtigen!
} }

View File

@ -456,7 +456,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{ {
// Formeln berechnen und painten wie im TrackTimeHdl // Formeln berechnen und painten wie im TrackTimeHdl
aDocument.TrackFormulas(); aDocument.TrackFormulas();
Broadcast(SfxHint(FID_DATACHANGED)); Broadcast(SfxHint(SfxHintId::ScDataChanged));
// wenn FID_DATACHANGED irgendwann mal asynchron werden sollte // wenn FID_DATACHANGED irgendwann mal asynchron werden sollte
// (z.B. mit Invalidate am Window), muss hier ein Update erzwungen werden. // (z.B. mit Invalidate am Window), muss hier ein Update erzwungen werden.
@ -1235,7 +1235,7 @@ void ScDocShell::DoRecalc( bool bApi )
if ( pSh ) if ( pSh )
pSh->UpdateCharts(true); pSh->UpdateCharts(true);
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) ); aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
// Wenn es Charts gibt, dann alles painten, damit nicht // Wenn es Charts gibt, dann alles painten, damit nicht
// PostDataChanged und die Charts nacheinander kommen und Teile // PostDataChanged und die Charts nacheinander kommen und Teile
@ -1263,17 +1263,17 @@ void ScDocShell::DoHardRecalc( bool /* bApi */ )
if ( pSh ) if ( pSh )
pSh->UpdateCharts(true); pSh->UpdateCharts(true);
// set notification flags for "calculate" event (used in SFX_HINT_DATACHANGED broadcast) // set notification flags for "calculate" event (used in SfxHintId::DataChanged broadcast)
// (might check for the presence of any formulas on each sheet) // (might check for the presence of any formulas on each sheet)
SCTAB nTabCount = aDocument.GetTableCount(); SCTAB nTabCount = aDocument.GetTableCount();
if (aDocument.HasAnySheetEventScript( ScSheetEventId::CALCULATE, true )) // search also for VBA handler if (aDocument.HasAnySheetEventScript( ScSheetEventId::CALCULATE, true )) // search also for VBA handler
for (SCTAB nTab=0; nTab<nTabCount; nTab++) for (SCTAB nTab=0; nTab<nTabCount; nTab++)
aDocument.SetCalcNotification(nTab); aDocument.SetCalcNotification(nTab);
// CalcAll doesn't broadcast value changes, so SC_HINT_CALCALL is broadcasted globally // CalcAll doesn't broadcast value changes, so SfxHintId::ScCalcAll is broadcasted globally
// in addition to SFX_HINT_DATACHANGED. // in addition to SfxHintId::DataChanged.
aDocument.BroadcastUno( SfxHint( SC_HINT_CALCALL ) ); aDocument.BroadcastUno( SfxHint( SfxHintId::ScCalcAll ) );
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) ); aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
// use hard recalc also to disable stream-copying of all sheets // use hard recalc also to disable stream-copying of all sheets
// (somewhat consistent with charts) // (somewhat consistent with charts)
@ -1309,14 +1309,14 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const OUString& rStyle )
void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{ {
sal_uInt16 nId = rHint.GetHint(); SfxHintId nId = rHint.GetId();
const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet(); const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet();
if (!pStyle) if (!pStyle)
return; return;
if ( pStyle->GetFamily() == SfxStyleFamily::Page ) if ( pStyle->GetFamily() == SfxStyleFamily::Page )
{ {
if ( nId == SfxStyleSheetHintId::MODIFIED ) if ( nId == SfxHintId::StyleSheetModified )
{ {
ScDocShellModificator aModificator( *this ); ScDocShellModificator aModificator( *this );
@ -1356,7 +1356,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
} }
else if ( pStyle->GetFamily() == SfxStyleFamily::Para ) else if ( pStyle->GetFamily() == SfxStyleFamily::Para )
{ {
if ( nId == SfxStyleSheetHintId::MODIFIED) if ( nId == SfxHintId::StyleSheetModified)
{ {
OUString aNewName = pStyle->GetName(); OUString aNewName = pStyle->GetName();
OUString aOldName = aNewName; OUString aOldName = aNewName;

View File

@ -102,7 +102,7 @@ void ScDocShell::DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCR
PostPaint( nX1, nY1, nTab, nX2, nY1, nTab, PaintPartFlags::Grid ); PostPaint( nX1, nY1, nTab, nX2, nY1, nTab, PaintPartFlags::Grid );
// No SetDocumentModified, as the unnamed database range might have to be restored later. // No SetDocumentModified, as the unnamed database range might have to be restored later.
// The UNO hint is broadcast directly instead, to keep UNO objects in valid state. // The UNO hint is broadcast directly instead, to keep UNO objects in valid state.
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) ); aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
} }
ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel ) ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel )
@ -314,7 +314,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
// "Import1" etc am Navigator bekanntmachen // "Import1" etc am Navigator bekanntmachen
if (eMode==SC_DB_IMPORT) if (eMode==SC_DB_IMPORT)
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
} }
pData = pNoNameData; pData = pNoNameData;
} }
@ -758,7 +758,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUStri
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
if (!aOldName.equals(rName)) if (!aOldName.equals(rName))
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
SfxBindings* pBindings = GetViewBindings(); SfxBindings* pBindings = GetViewBindings();
if (pBindings) if (pBindings)
@ -824,7 +824,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
PostPaintExtras(); // Tabellenreiter PostPaintExtras(); // Tabellenreiter
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
return nNewTab; return nNewTab;
} }
@ -991,7 +991,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
PostPaintGridAll(); PostPaintGridAll();
PostPaintExtras(); PostPaintExtras();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
return true; return true;
} }

View File

@ -939,7 +939,7 @@ bool ScImportExport::Text2Doc( SvStream& rStrm )
EndPaste(); EndPaste();
if (bOk && mbImportBroadcast) if (bOk && mbImportBroadcast)
{ {
pDoc->BroadcastCells(aRange, SC_HINT_DATACHANGED); pDoc->BroadcastCells(aRange, SfxHintId::ScDataChanged);
pDocSh->PostDataChanged(); pDocSh->PostDataChanged();
} }
@ -1504,7 +1504,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
if (mbImportBroadcast && !mbOverwriting) if (mbImportBroadcast && !mbOverwriting)
{ {
pDoc->BroadcastCells(aRange, SC_HINT_DATACHANGED); pDoc->BroadcastCells(aRange, SfxHintId::ScDataChanged);
pDocSh->PostDataChanged(); pDocSh->PostDataChanged();
} }
return true; return true;

View File

@ -103,7 +103,7 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const OUString& rItem ) :
pDocSh->GetDocument().StartListeningArea( aRange, false, &aForwarder ); pDocSh->GetDocument().StartListeningArea( aRange, false, &aForwarder );
StartListening(*pDocSh); // um mitzubekommen, wenn die DocShell geloescht wird StartListening(*pDocSh); // um mitzubekommen, wenn die DocShell geloescht wird
StartListening(*SfxGetpApp()); // for SC_HINT_AREAS_CHANGED StartListening(*SfxGetpApp()); // for SfxHintId::ScAreasChanged
} }
ScServerObject::~ScServerObject() ScServerObject::~ScServerObject()
@ -197,11 +197,11 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{ {
bool bDataChanged = false; bool bDataChanged = false;
// DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor // DocShell can't be tested via type info, because SfxHintId::Dying comes from the dtor
if ( &rBC == pDocSh ) if ( &rBC == pDocSh )
{ {
// from DocShell, only SFX_HINT_DYING is interesting // from DocShell, only SfxHintId::Dying is interesting
if ( rHint.GetId() == SFX_HINT_DYING ) if ( rHint.GetId() == SfxHintId::Dying )
{ {
pDocSh = nullptr; pDocSh = nullptr;
EndListening(*SfxGetpApp()); EndListening(*SfxGetpApp());
@ -210,7 +210,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
} }
else if (dynamic_cast<const SfxApplication*>( &rBC) != nullptr) else if (dynamic_cast<const SfxApplication*>( &rBC) != nullptr)
{ {
if ( !aItemStr.isEmpty() && rHint.GetId() == SC_HINT_AREAS_CHANGED ) if ( !aItemStr.isEmpty() && rHint.GetId() == SfxHintId::ScAreasChanged )
{ {
// check if named range was modified // check if named range was modified
ScRange aNew; ScRange aNew;
@ -223,7 +223,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// must be from Area broadcasters // must be from Area broadcasters
const ScHint* pScHint = dynamic_cast<const ScHint*>( &rHint ); const ScHint* pScHint = dynamic_cast<const ScHint*>( &rHint );
if (pScHint && (pScHint->GetId() & SC_HINT_DATACHANGED)) if (pScHint && (pScHint->GetId() == SfxHintId::ScDataChanged))
bDataChanged = true; bDataChanged = true;
else if (const ScAreaChangedHint *pChgHint = dynamic_cast<const ScAreaChangedHint*>(&rHint)) // position of broadcaster changed else if (const ScAreaChangedHint *pChgHint = dynamic_cast<const ScAreaChangedHint*>(&rHint)) // position of broadcaster changed
{ {
@ -236,7 +236,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
} }
else else
{ {
if (rHint.GetId() == SFX_HINT_DYING) if (rHint.GetId() == SfxHintId::Dying)
{ {
// If the range is being deleted, listening must be restarted // If the range is being deleted, listening must be restarted
// after the deletion is complete (done in GetData) // after the deletion is complete (done in GetData)

View File

@ -24,15 +24,6 @@
#include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/uno/XInterface.hpp>
#include <svl/hint.hxx> #include <svl/hint.hxx>
#define SC_HINT_ACC_SIMPLE_START SFX_HINT_USER00
#define SC_HINT_ACC_TABLECHANGED SC_HINT_ACC_SIMPLE_START + 1
#define SC_HINT_ACC_CURSORCHANGED SC_HINT_ACC_SIMPLE_START + 2
#define SC_HINT_ACC_VISAREACHANGED SC_HINT_ACC_SIMPLE_START + 3
#define SC_HINT_ACC_ENTEREDITMODE SC_HINT_ACC_SIMPLE_START + 4
#define SC_HINT_ACC_LEAVEEDITMODE SC_HINT_ACC_SIMPLE_START + 5
#define SC_HINT_ACC_MAKEDRAWLAYER SC_HINT_ACC_SIMPLE_START + 6
#define SC_HINT_ACC_WINDOWRESIZED SC_HINT_ACC_SIMPLE_START + 7
class ScAccWinFocusLostHint : public SfxHint class ScAccWinFocusLostHint : public SfxHint
{ {
public: public:

View File

@ -98,7 +98,7 @@ private:
void UpdateDrawView(); void UpdateDrawView();
void DoPrint( ScPreviewLocationData* pFillLocation ); void DoPrint( ScPreviewLocationData* pFillLocation );
void InvalidateLocationData( sal_uLong nId ); void InvalidateLocationData( SfxHintId nId );
using Window::SetZoom; using Window::SetZoom;

View File

@ -115,14 +115,12 @@ public:
class ScIndexHint : public SfxHint class ScIndexHint : public SfxHint
{ {
sal_uInt16 nId;
sal_uInt16 nIndex; sal_uInt16 nIndex;
public: public:
ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx); ScIndexHint(SfxHintId nNewId, sal_uInt16 nIdx);
virtual ~ScIndexHint() override; virtual ~ScIndexHint() override;
sal_uInt16 GetIndexHintId() const { return nId; }
sal_uInt16 GetIndex() const { return nIndex; } sal_uInt16 GetIndex() const { return nIndex; }
}; };

View File

@ -641,7 +641,7 @@ void ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
} }
SC_MOD()->SetRefDialog( nId, false, pMyViewFrm ); SC_MOD()->SetRefDialog( nId, false, pMyViewFrm );
pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW ) ); pSfxApp->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell(); ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if ( pScViewShell ) if ( pScViewShell )

View File

@ -256,7 +256,7 @@ void ScNameDefDlg::AddPushed()
// call invalidates the stream // call invalidates the stream
if (nTab != -1) if (nTab != -1)
mpDoc->SetStreamValid(nTab, false); mpDoc->SetStreamValid(nTab, false);
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_AREAS_CHANGED ) ); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreasChanged ) );
mpDocShell->SetDocumentModified(); mpDocShell->SetDocumentModified();
Close(); Close();
} }

View File

@ -81,7 +81,7 @@ void ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemStat
case SID_CURRENTDOC: case SID_CURRENTDOC:
// gar nix mehr, wird ueber SFX_HINT_DOCCHANGED erledigt // gar nix mehr, wird ueber SfxHintId::DocChanged erledigt
break; break;

Some files were not shown because too many files have changed in this diff Show More