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;
switch (rTextHint.GetId())
{
case TEXT_HINT_PARAINSERTED:
case TEXT_HINT_PARAREMOVED:
// TEXT_HINT_PARAINSERTED and TEXT_HINT_PARAREMOVED are sent at
case SfxHintId::TextParaInserted:
case SfxHintId::TextParaRemoved:
// SfxHintId::TextParaInserted and SfxHintId::TextParaRemoved are sent at
// "unsafe" times (when the text engine has not yet re-formatted its
// 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
// buffered until a following ::TextEngine::FormatDoc causes a
// TEXT_HINT_TEXTFORMATTED to come in:
case TEXT_HINT_FORMATPARA:
// SfxHintId::TextFormatted to come in:
case SfxHintId::TextFormatPara:
// ::TextEngine::FormatDoc sends a sequence of
// TEXT_HINT_FORMATPARAs, followed by an optional
// TEXT_HINT_TEXTHEIGHTCHANGED, followed in all cases by one
// TEXT_HINT_TEXTFORMATTED. Only the TEXT_HINT_FORMATPARAs contain
// SfxHintId::TextFormatParas, followed by an optional
// SfxHintId::TextHeightChanged, followed in all cases by one
// SfxHintId::TextFormatted. Only the SfxHintId::TextFormatParas contain
// 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:
{
::osl::MutexGuard aInternalGuard(GetMutex());
@ -1558,9 +1558,9 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
m_aParagraphNotifications.push(rTextHint);
break;
}
case TEXT_HINT_TEXTFORMATTED:
case TEXT_HINT_TEXTHEIGHTCHANGED:
case TEXT_HINT_MODIFIED:
case SfxHintId::TextFormatted:
case SfxHintId::TextHeightChanged:
case SfxHintId::TextModified:
{
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
@ -1568,7 +1568,7 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
handleParagraphNotifications();
break;
}
case TEXT_HINT_VIEWSCROLLED:
case SfxHintId::TextViewScrolled:
{
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
@ -1594,8 +1594,8 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
}
break;
}
case TEXT_HINT_VIEWSELECTIONCHANGED:
case TEXT_HINT_VIEWCARETCHANGED:
case SfxHintId::TextViewSelectionChanged:
case SfxHintId::TextViewCaretChanged:
{
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
@ -1607,20 +1607,21 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
}
else
{
// TEXT_HINT_VIEWSELECTIONCHANGED is sometimes sent at
// SfxHintId::TextViewSelectionChanged is sometimes sent at
// "unsafe" times (when the text engine has not yet re-
// formatted its content), so that for example calling
// ::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
// hints are just buffered (along with
// TEXT_HINT_PARAINSERTED/REMOVED/FORMATPARA) until a
// SfxHintId::TextParaInserted/REMOVED/FORMATPARA) until a
// following ::TextEngine::FormatDoc causes a
// TEXT_HINT_TEXTFORMATTED to come in:
// SfxHintId::TextFormatted to come in:
m_bSelectionChangedNotification = true;
}
break;
}
default: break;
}
}
}
@ -1875,10 +1876,10 @@ void Document::handleParagraphNotifications()
m_aParagraphNotifications.pop();
switch (aHint.GetId())
{
case TEXT_HINT_PARAINSERTED:
case SfxHintId::TextParaInserted:
{
::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
// will get invalidated), and adjust the old values so that they
@ -1926,7 +1927,7 @@ void Document::handleParagraphNotifications()
m_xParagraphs->begin() + nOldVisibleEnd, aIns);
break;
}
case TEXT_HINT_PARAREMOVED:
case SfxHintId::TextParaRemoved:
{
::sal_uLong n = aHint.GetValue();
if (n == TEXT_PARA_ALL)
@ -1951,7 +1952,7 @@ void Document::handleParagraphNotifications()
}
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);
// numeric overflow cannot occur
@ -2040,10 +2041,10 @@ void Document::handleParagraphNotifications()
}
break;
}
case TEXT_HINT_FORMATPARA:
case SfxHintId::TextFormatPara:
{
::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)].
changeHeight(static_cast< ::sal_Int32 >(
@ -2208,7 +2209,7 @@ void Document::handleSelectionChangeNotification()
::TextSelection const & rSelection = m_rView.GetSelection();
assert(rSelection.GetStart().GetPara() < m_xParagraphs->size() &&
rSelection.GetEnd().GetPara() < m_xParagraphs->size() &&
"bad TEXT_HINT_VIEWSELECTIONCHANGED event");
"bad SfxHintId::TextViewSelectionChanged event");
::sal_Int32 nNewFirstPara
= static_cast< ::sal_Int32 >(rSelection.GetStart().GetPara());
::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))
{
TextHint const& rTextHint = *pTextHint;
if( rTextHint.GetId() == TEXT_HINT_VIEWSCROLLED )
if( rTextHint.GetId() == SfxHintId::TextViewScrolled )
{
if ( rModulWindow.GetHScrollBar() )
rModulWindow.GetHScrollBar()->SetThumbPos( pEditView->GetStartDocPos().X() );
@ -1048,7 +1048,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
rModulWindow.GetLineNumberWindow().DoScroll
( rModulWindow.GetLineNumberWindow().GetCurYOffset() - pEditView->GetStartDocPos().Y() );
}
else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED )
else if( rTextHint.GetId() == SfxHintId::TextHeightChanged )
{
if ( pEditView->GetStartDocPos().Y() )
{
@ -1062,7 +1062,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
SetScrollBarRanges();
}
else if( rTextHint.GetId() == TEXT_HINT_TEXTFORMATTED )
else if( rTextHint.GetId() == SfxHintId::TextFormatted )
{
if ( rModulWindow.GetHScrollBar() )
{
@ -1079,20 +1079,20 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
if ( nCurTextWidth != nPrevTextWidth )
SetScrollBarRanges();
}
else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED )
else if( rTextHint.GetId() == SfxHintId::TextParaInserted )
{
ParagraphInsertedDeleted( rTextHint.GetValue(), true );
DoDelayedSyntaxHighlight( rTextHint.GetValue() );
}
else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED )
else if( rTextHint.GetId() == SfxHintId::TextParaRemoved )
{
ParagraphInsertedDeleted( rTextHint.GetValue(), false );
}
else if( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED )
else if( rTextHint.GetId() == SfxHintId::TextParaContentChanged )
{
DoDelayedSyntaxHighlight( rTextHint.GetValue() );
}
else if( rTextHint.GetId() == TEXT_HINT_VIEWSELECTIONCHANGED )
else if( rTextHint.GetId() == SfxHintId::TextViewSelectionChanged )
{
if (SfxBindings* pBindings = GetBindingsPtr())
{

View File

@ -475,21 +475,17 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if (GetShell())
{
switch (rHint.GetId())
if (rHint.GetId() == SfxHintId::Dying)
{
case SFX_HINT_DYING:
{
EndListening( rBC, true /* log off all */ );
aObjectCatalog->UpdateEntries();
}
break;
EndListening( rBC, true /* log off all */ );
aObjectCatalog->UpdateEntries();
}
if (SbxHint const* pSbxHint = dynamic_cast<SbxHint const*>(&rHint))
{
const sal_uInt32 nHintId = pSbxHint->GetId();
if ( ( nHintId == SBX_HINT_BASICSTART ) ||
( nHintId == SBX_HINT_BASICSTOP ) )
const SfxHintId nHintId = pSbxHint->GetId();
if ( ( nHintId == SfxHintId::BasicStart ) ||
( nHintId == SfxHintId::BasicStop ) )
{
if (SfxBindings* pBindings = GetBindingsPtr())
{
@ -515,7 +511,7 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
pBindings->Update( SID_BASICLOAD );
}
if ( nHintId == SBX_HINT_BASICSTOP )
if ( nHintId == SfxHintId::BasicStop )
{
// not only at error/break or explicit stoppage,
// 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)
{
BaseWindow* pWin = it->second;
if ( nHintId == SBX_HINT_BASICSTART )
if ( nHintId == SfxHintId::BasicStart )
pWin->BasicStarted();
else
pWin->BasicStopped();

View File

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

View File

@ -849,7 +849,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
BasicManager::~BasicManager()
{
// Notify listener if something needs to be saved
Broadcast( SfxHint( SFX_HINT_DYING) );
Broadcast( SfxHint( SfxHintId::Dying) );
}
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);
if( p )
{
const sal_uInt32 nId = p->GetId();
bool bRead = nId == SBX_HINT_DATAWANTED;
bool bWrite = nId == SBX_HINT_DATACHANGED;
bool bRequestInfo = nId == SBX_HINT_INFOWANTED;
const SfxHintId nId = p->GetId();
bool bRead = nId == SfxHintId::BasicDataWanted;
bool bWrite = nId == SfxHintId::BasicDataChanged;
bool bRequestInfo = nId == SfxHintId::BasicInfoWanted;
SbxVariable* pVar = p->GetVar();
SbxArray* pArg = pVar->GetParameters();
OUString aVarName( pVar->GetName() );

View File

@ -1999,7 +1999,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pProp )
{
bool bInvocation = pProp->isInvocationBased();
if( pHint->GetId() == SBX_HINT_DATAWANTED )
if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
// Test-Properties
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() )
{
@ -2160,7 +2160,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else if( pMeth )
{
bool bInvocation = pMeth->isInvocationBased();
if( pHint->GetId() == SBX_HINT_DATAWANTED )
if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
// number of Parameter -1 because of Param0 == this
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();
SbxArray* pParams = pVar->GetParameters();
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
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() );
// handle get/set of members of struct
if( pHint->GetId() == SBX_HINT_DATAWANTED )
if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
// Test-Properties
sal_Int32 nId = pProp->nId;
@ -4957,7 +4957,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else
StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND );
}
else if( pHint->GetId() == SBX_HINT_DATACHANGED )
else if( pHint->GetId() == SfxHintId::BasicDataChanged )
{
if ( it != maFields.end() )
{

View File

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

View File

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

View File

@ -1019,13 +1019,13 @@ void SbiRuntime::TOSMakeTemp()
SbxVariable* p = refExprStk->Get( nExprLvl - 1 );
if ( p->GetType() == SbxEMPTY )
{
p->Broadcast( SBX_HINT_DATAWANTED );
p->Broadcast( SfxHintId::BasicDataWanted );
}
SbxVariable* pDflt = 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
// pDft->pParent to be deleted, when p2->Compute() is
// called below pParent is accessed (but it's deleted)
@ -1301,12 +1301,12 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
SbxDataType p2Type = p2->GetType();
if ( p1Type == SbxEMPTY )
{
p1->Broadcast( SBX_HINT_DATAWANTED );
p1->Broadcast( SfxHintId::BasicDataWanted );
p1Type = p1->GetType();
}
if ( p2Type == SbxEMPTY )
{
p2->Broadcast( SBX_HINT_DATAWANTED );
p2->Broadcast( SfxHintId::BasicDataWanted );
p2Type = p2->GetType();
}
if ( p1Type == p2Type )
@ -1322,13 +1322,13 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
if ( pDflt )
{
p1 = pDflt;
p1->Broadcast( SBX_HINT_DATAWANTED );
p1->Broadcast( SfxHintId::BasicDataWanted );
}
pDflt = getDefaultProp( p2.get() );
if ( pDflt )
{
p2 = pDflt;
p2->Broadcast( SBX_HINT_DATAWANTED );
p2->Broadcast( SfxHintId::BasicDataWanted );
}
}
@ -1543,12 +1543,12 @@ void SbiRuntime::StepIS()
SbxDataType eType2 = refVar2->GetType();
if ( eType1 == SbxEMPTY )
{
refVar1->Broadcast( SBX_HINT_DATAWANTED );
refVar1->Broadcast( SfxHintId::BasicDataWanted );
eType1 = refVar1->GetType();
}
if ( eType2 == SbxEMPTY )
{
refVar2->Broadcast( SBX_HINT_DATAWANTED );
refVar2->Broadcast( SfxHintId::BasicDataWanted );
eType2 = refVar2->GetType();
}
@ -1568,7 +1568,7 @@ void SbiRuntime::StepIS()
void SbiRuntime::StepGET()
{
SbxVariable* p = GetTOS();
p->Broadcast( SBX_HINT_DATAWANTED );
p->Broadcast( SfxHintId::BasicDataWanted );
}
// #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
bool bObjAssign = false;
if ( refVar->GetType() == SbxEMPTY )
refVar->Broadcast( SBX_HINT_DATAWANTED );
refVar->Broadcast( SfxHintId::BasicDataWanted );
if ( refVar->GetType() == SbxOBJECT )
{
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
if ( pVal->GetType() == SbxEMPTY )
pVal->Broadcast( SBX_HINT_DATAWANTED );
pVal->Broadcast( SfxHintId::BasicDataWanted );
// evaluate methods and properties!
SbxVariable* pRes = new SbxVariable( *pVal );
pVal = pRes;
@ -3862,7 +3862,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
SbxVariable* pDflt = getDefaultProp( pElem );
if ( pDflt )
{
pDflt->Broadcast( SBX_HINT_DATAWANTED );
pDflt->Broadcast( SfxHintId::BasicDataWanted );
SbxBaseRef pDfltObj = pDflt->GetObject();
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());
if( nCallId )
{
const sal_uInt32 t = pHint->GetId();
if( t == SBX_HINT_INFOWANTED )
const SfxHintId t = pHint->GetId();
if( t == SfxHintId::BasicInfoWanted )
pVar->SetInfo( GetInfo( static_cast<short>(pVar->GetUserData()) ) );
else
{
bool bWrite = false;
if( t == SBX_HINT_DATACHANGED )
if( t == SfxHintId::BasicDataChanged )
bWrite = true;
if( t == SBX_HINT_DATAWANTED || bWrite )
if( t == SfxHintId::BasicDataWanted || bWrite )
{
RtlCall p = aMethods[ nCallId-1 ].pFunc;
SbxArrayRef rPar( pPar_ );

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -173,14 +173,14 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pTextHint )
{
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 )
mbEndReached = IsEndReached();
}
else if ( nId == TEXT_HINT_VIEWSCROLLED )
else if ( nId == SfxHintId::TextViewScrolled )
{
if ( ! mbEndReached )
mbEndReached = IsEndReached();

View File

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

View File

@ -425,7 +425,7 @@ void ImpEditEngine::FormatDoc()
sal_uInt32 nNewHeight = CalcTextHeight( &nNewHeightNTP );
long nDiff = nNewHeight - nCurTextHeight;
if ( nDiff )
aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TEXTHEIGHTCHANGED : EditStatusFlags::TEXTWIDTHCHANGED;
aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TextHeightChanged : EditStatusFlags::TEXTWIDTHCHANGED;
if ( nNewHeight < nCurTextHeight )
{
aInvalidRect.Bottom() = (long)std::max( nNewHeight, nCurTextHeight );
@ -516,7 +516,7 @@ void ImpEditEngine::CheckAutoPageSize()
|| ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) )
{
// 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++ )
{
// 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 )
{
SfxStyleSheet* pStyle = nullptr;
sal_uInt32 nId = 0;
const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
if ( pStyleSheetHint )
{
DBG_ASSERT( dynamic_cast< const SfxStyleSheet* >(pStyleSheetHint->GetStyleSheet()) != nullptr, "No SfxStyleSheet!" );
pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() );
nId = pStyleSheetHint->GetHint();
}
else if ( dynamic_cast< const SfxStyleSheet* >(&rBC) != nullptr )
{
pStyle = static_cast<SfxStyleSheet*>(&rBC);
nId = rHint.GetId();
}
if ( pStyle )
{
if ( ( nId == SFX_HINT_DYING ) ||
( nId == SfxStyleSheetHintId::INDESTRUCTION ) ||
( nId == SfxStyleSheetHintId::ERASED ) )
SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() );
SfxHintId nId = pStyleSheetHint->GetId();
if ( ( nId == SfxHintId::StyleSheetInDestruction ) ||
( nId == SfxHintId::StyleSheetErased ) )
{
RemoveStyleFromParagraphs( pStyle );
}
else if ( ( nId == SFX_HINT_DATACHANGED ) ||
( nId == SfxStyleSheetHintId::MODIFIED ) )
else if ( nId == SfxHintId::StyleSheetModified )
{
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 );
}

View File

@ -26,14 +26,14 @@
#include <osl/diagnose.h>
SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId ) :
SvxEditSourceHint::SvxEditSourceHint( SfxHintId _nId ) :
TextHint( _nId ),
mnStart( 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 ),
mnStart( nStart),
mnEnd( nEnd )
@ -48,37 +48,37 @@ SvxEditSourceHint::SvxEditSourceHint( sal_uInt32 _nId, sal_uLong nValue, sal_Int
switch( aNotify->eNotificationType )
{
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:
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:
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:
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:
return ::std::unique_ptr<SfxHint>( new TextHint( TEXT_HINT_TEXTHEIGHTCHANGED, aNotify->nParagraph ) );
case EE_NOTIFY_TextHeightChanged:
return ::std::unique_ptr<SfxHint>( new TextHint( SfxHintId::TextHeightChanged, aNotify->nParagraph ) );
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:
return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( EDITSOURCE_HINT_SELECTIONCHANGED ) );
return ::std::unique_ptr<SfxHint>( new SvxEditSourceHint( SfxHintId::EditSourceSelectionChanged ) );
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:
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:
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:
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:
return ::std::unique_ptr<SfxHint>( new SvxEditSourceHintEndPara );
default:

View File

@ -276,10 +276,10 @@ namespace frm
{
EditStatusFlags nStatusWord( _rStatus.GetStatusWord() );
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() ) );
updateScrollbars();

View File

@ -59,9 +59,6 @@ namespace o3tl {
#define SBXID_JSCRIPTMOD 0x6a62 // 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
{
NONE,

View File

@ -62,7 +62,7 @@ public:
// Interface to execute a method from the applications
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;

View File

@ -94,7 +94,7 @@ class BASIC_DLLPUBLIC SbxHint : public SfxHint
{
SbxVariable* pVar;
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; }
};
@ -103,7 +103,7 @@ class BASIC_DLLPUBLIC SbxAlias : public SbxVariable, public SfxListener
{
SbxVariableRef xAlias;
virtual ~SbxAlias() override;
virtual void Broadcast( sal_uInt32 ) override;
virtual void Broadcast( SfxHintId ) override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
public:
SbxAlias( const SbxAlias& );

View File

@ -200,14 +200,6 @@ namespace o3tl
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
#define SBXCR_SBX 0x20584253 // SBX(blank)

View File

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

View File

@ -117,15 +117,15 @@ namespace accessibility
only be called from the main office thread.
The EditSource set here is required to broadcast out the
following hints: EDITSOURCE_HINT_PARASMOVED,
EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
TEXT_HINT_TEXTHEIGHTCHANGED,
TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
following hints: SfxHintId::EditSourceParasMoved,
SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
SfxHintId::TextHeightChanged,
SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is
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
a UNO component. Nevertheless, it holds C++ references to

View File

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

View File

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

View File

@ -30,11 +30,8 @@
struct EENotify;
class EditEngine;
#define EDITSOURCE_HINT_PARASMOVED 20
#define EDITSOURCE_HINT_SELECTIONCHANGED 21
/** 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
start and the end of the moved paragraph range.
*/
@ -45,8 +42,8 @@ private:
sal_Int32 mnEnd;
public:
SvxEditSourceHint( sal_uInt32 nId );
SvxEditSourceHint( sal_uInt32 nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd );
SvxEditSourceHint( SfxHintId nId );
SvxEditSourceHint( SfxHintId nId, sal_uLong nValue, sal_Int32 nStart, sal_Int32 nEnd );
using TextHint::GetValue;
sal_Int32 GetStartValue() const { return mnStart;}
@ -55,7 +52,7 @@ public:
class SvxEditSourceHintEndPara :public SvxEditSourceHint
{
public:
SvxEditSourceHintEndPara() : SvxEditSourceHint(EDITSOURCE_HINT_SELECTIONCHANGED) {}
SvxEditSourceHintEndPara() : SvxEditSourceHint(SfxHintId::EditSourceSelectionChanged) {}
};
/** Helper class for common functionality in edit sources
*/

View File

@ -22,37 +22,105 @@
#include <sal/types.h>
#include <svl/svldllapi.h>
#define SFX_HINT_DYING 0x00000001
#define SFX_HINT_NAMECHANGED 0x00000002
#define SFX_HINT_TITLECHANGED 0x00000004
#define SFX_HINT_DATACHANGED 0x00000008
#define SFX_HINT_DOCCHANGED 0x00000010
#define SFX_HINT_UPDATEDONE 0x00000020
#define SFX_HINT_DEINITIALIZING 0x00000040
#define SFX_HINT_MODECHANGED 0x00000080
// unused, formerly SFX_HINT_CANCELLABLE
// unused, formerly SFX_HINT_DATAAVAILABLE
// unused, formerly SFX_HINT_SAVECOMPLETED
// unused, formerly SFX_HINT_RELEASEREF
#define SFX_HINT_COLORS_CHANGED 0x00001000
#define SFX_HINT_ACCESSIBILITY_CHANGED 0x00004000
// unused, formerly SFX_HINT_VIEWCREATED
#define SFX_HINT_USER00 0x00010000
#define SFX_HINT_USER01 0x00020000
#define SFX_HINT_USER02 0x00040000
#define SFX_HINT_USER03 0x00080000
#define SFX_HINT_USER04 0x00100000
#define SFX_HINT_USER05 0x00200000
enum class SfxHintId {
NONE,
Dying,
NameChanged,
TitleChanged,
DataChanged,
DocChanged,
UpdateDone,
Deinitializing,
ModeChanged,
ColorsChanged,
AccessibilityChanged,
// VCL text hints
TextParaInserted,
TextParaRemoved,
TextParaContentChanged,
TextHeightChanged,
TextFormatPara,
TextFormatted,
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
{
private:
sal_uInt32 mnId;
SfxHintId mnId;
public:
SfxHint() : mnId(0) {}
explicit SfxHint( sal_uInt32 nId ) : mnId(nId) {}
SfxHint() : mnId(SfxHintId::NONE) {}
explicit SfxHint( SfxHintId nId ) : mnId(nId) {}
virtual ~SfxHint();
sal_uInt32 GetId() const { return mnId; }
SfxHintId GetId() const { return mnId; }
};
#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
pointer to the <SfxStyleSheetBase>. The actions are:
#define SfxStyleSheetHintId::CREATED // style is created
#define SfxStyleSheetHintId::MODIFIED // style is modified
#define SfxStyleSheetHintId::CHANGED // style is replaced
#define SfxStyleSheetHintId::ERASED // style is deleted
#define SfxHintId::StyleSheetCreated // style is created
#define SfxHintId::StyleSheetModified // style is modified
#define SfxHintId::StyleSheetChanged // style is replaced
#define SfxHintId::StyleSheetErased // style is deleted
The following methods already broadcast themself
SfxSimpleHint(SFX_HINT_DYING) from:
SfxSimpleHint(SfxHintId::Dying) from:
SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
SfxStyleSheetHint( SfxStyleSheetHintId::CREATED, *p ) from:
SfxStyleSheetHint( SfxHintId::StyleSheetCreated, *p ) from:
SfxStyleSheetBasePool::Make( const String& rName,
SfxStyleFamily eFam, sal_uInt16 mask)
SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *pNew ) from:
SfxStyleSheetHint( SfxHintId::StyleSheetChanged, *pNew ) from:
SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet )
SfxStyleSheetHint( SfxStyleSheetHintId::ERASED, *p ) from:
SfxStyleSheetHint( SfxHintId::StyleSheetErased, *p ) from:
SfxStyleSheetBasePool::Erase( SfxStyleSheetBase* p )
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
{
public:
@ -311,14 +302,10 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint
{
SfxStyleSheetBase* pStyleSh;
sal_uInt16 nHint;
public:
SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& );
SfxStyleSheetHint( SfxHintId, SfxStyleSheetBase& );
SfxStyleSheetBase* GetStyleSheet() const
{ return pStyleSh; }
sal_uInt16 GetHint() const
{ return nHint; }
};
class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
@ -326,7 +313,7 @@ class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
OUString aName;
public:
SfxStyleSheetHintExtended( sal_uInt16, const OUString& rOld,
SfxStyleSheetHintExtended( SfxHintId, const OUString& rOld,
SfxStyleSheetBase& );
const OUString& GetOldName() const { return aName; }
};

View File

@ -85,7 +85,7 @@ namespace accessibility
AccessibleTextHelper will call the SvxEditSource and their
forwarder to update it's state. Avoid being inconsistent in
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
already include the newly inserted paragraph.
@ -147,15 +147,15 @@ namespace accessibility
from the main office thread.
The EditSource set here is required to broadcast out the
following hints: EDITSOURCE_HINT_PARASMOVED,
EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
TEXT_HINT_TEXTHEIGHTCHANGED,
TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
following hints: SfxHintId::EditSourceParasMoved,
SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
SfxHintId::TextHeightChanged,
SfxHintId::TextViewScrolled. Otherwise, not all state changes
will get noticed by the accessibility object. Further
more, when the corresponding core object or the model is
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
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
changed somehow, e.g. if the visible area has changed and
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.
*/
void UpdateChildren();

View File

@ -111,30 +111,14 @@ inline bool TextSelection::operator != ( const TextSelection& rSel ) const
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
{
private:
sal_uLong mnValue;
public:
TextHint( sal_uInt32 nId );
TextHint( sal_uInt32 nId, sal_uLong nValue );
TextHint( SfxHintId nId );
TextHint( SfxHintId nId, sal_uLong nValue );
sal_uLong GetValue() const { return mnValue; }
};

View File

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

View File

@ -51,7 +51,7 @@ void OColorListener::dispose()
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_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)
{
OColorListener::Notify(rBc, rHint);
if (rHint.GetId() == SFX_HINT_COLORS_CHANGED)
if (rHint.GetId() == SfxHintId::ColorsChanged)
{
setColor();
Invalidate(InvalidateFlags::Children);

View File

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

View File

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

View File

@ -584,7 +584,7 @@ public:
void PrepareBroadcastersForDestruction();
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
ScPostIt* GetCellNote( SCROW nRow );

View File

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

View File

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

View File

@ -203,23 +203,14 @@
#define FID_INPUTLINE_STATUS (SC_MESSAGE_START)
#define FID_INPUTLINE_ENTER (SC_MESSAGE_START + 1)
#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 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 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_PAGESTYLE (SC_MESSAGE_START + 15)
#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 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_ERW (SC_MESSAGE_START + 23)
@ -235,12 +226,6 @@
#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_ROWCOL_SELCOUNT (SC_MESSAGE_START + 38)
#define SID_AUTO_SUM (SC_MESSAGE_START + 39)
@ -256,7 +241,6 @@
#define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61)
#define SID_OPENDLG_CONDFRMT_MANAGER (SC_MESSAGE_START + 62)
#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_DATABAR (SC_MESSAGE_START + 67)
#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 {
void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, sal_uInt32 nHint )
void broadcastRangeByCell( SvtBroadcaster& rBC, const ScRange& rRange, SfxHintId nHint )
{
ScHint aHint(nHint, ScAddress());
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())
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;
SCTAB nEndTab = rRange.aEnd.Tab();
@ -1095,7 +1095,7 @@ void ScBroadcastAreaSlotMachine::EnterBulkBroadcast()
++nInBulkBroadcast;
}
void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast( sal_uInt32 nHintId )
void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast( SfxHintId nHintId )
{
if (nInBulkBroadcast > 0)
{
@ -1131,7 +1131,7 @@ void ScBroadcastAreaSlotMachine::InsertBulkGroupArea( ScBroadcastArea* pArea, co
pSet->set(rRange, true);
}
bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas( sal_uInt32 nHintId )
bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas( SfxHintId nHintId )
{
if (m_BulkGroupAreas.empty())
return false;

View File

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

View File

@ -1963,7 +1963,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol)
rCol.CellStorageModified();
// 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();
sc::SingleColumnSpanSet::SpansType::const_iterator itRange = aRanges.begin(), itRangeEnd = aRanges.end();
for (; itRange != itRangeEnd; ++itRange)
@ -2749,7 +2749,7 @@ public:
{
std::vector<SCROW> aRows;
maValueRanges.getRows(aRows);
mrColumn.BroadcastCells(aRows, SC_HINT_DATACHANGED);
mrColumn.BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
void fillBroadcastSpans( sc::ColumnSpanSet& rBroadcastSpans ) const
@ -2793,7 +2793,7 @@ public:
{
std::vector<SCROW> 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);
sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aHdl);
// 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))
{
// SetDirtyOnRangeHandler implicitly tracks notified
@ -3285,7 +3285,7 @@ void ScColumn::BroadcastRecalcOnRefMove()
sc::AutoCalcSwitch aSwitch(*pDocument, false);
RecalcOnRefMoveCollector aFunc;
sc::ProcessFormula(maCells, aFunc);
BroadcastCells(aFunc.getDirtyRows(), SC_HINT_DATACHANGED);
BroadcastCells(aFunc.getDirtyRows(), SfxHintId::ScDataChanged);
}
namespace {

View File

@ -71,11 +71,11 @@ using namespace formula;
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);
}
void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, sal_uInt32 nHint )
void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint )
{
if (rRows.empty())
return;
@ -707,7 +707,7 @@ void ScColumn::DeleteArea(
// cells that were already empty before the deletion.
std::vector<SCROW> 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)
aRows.push_back(i);
BroadcastCells(aRows, SC_HINT_DATACHANGED);
BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
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)
aRows.push_back(i);
BroadcastCells(aRows, SC_HINT_DATACHANGED);
BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
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)
aRows.push_back(i);
BroadcastCells(aRows, SC_HINT_DATACHANGED);
BroadcastCells(aRows, SfxHintId::ScDataChanged);
}
namespace {

View File

@ -330,7 +330,7 @@ IMPL_LINK_NOARG(ScDocument, TrackTimeHdl, Idle *, void)
else if (pShell) // execute
{
TrackFormulas();
pShell->Broadcast( SfxHint( FID_DATACHANGED ) );
pShell->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
// modified...
@ -386,7 +386,7 @@ ScDocument::~ScDocument()
delete pBASM; // BroadcastAreaSlotMachine
pBASM = nullptr;
delete pUnoBroadcaster; // broadcasted nochmal SFX_HINT_DYING
delete pUnoBroadcaster; // broadcasted nochmal SfxHintId::Dying
pUnoBroadcaster = nullptr;
delete pUnoRefUndoList;
@ -1009,7 +1009,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
sc::CopyToDocContext aCxt(*this);
nDestPos = std::min(nDestPos, (SCTAB)(GetTableCount() - 1));
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pBASM, SC_HINT_DATACHANGED);
ScBulkBroadcast aBulkBroadcast( pBASM, SfxHintId::ScDataChanged);
if (!bResultsOnly)
{
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.
if ( pUnoListenerCalls &&
rHint.GetId() == SFX_HINT_DATACHANGED &&
rHint.GetId() == SfxHintId::DataChanged &&
!bInUnoListenerCall )
{
// 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();
@ -126,7 +126,7 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool b
pTab->SetStreamValid(false);
}
BroadcastUno(SfxHint(SC_HINT_DATACHANGED));
BroadcastUno(SfxHint(SfxHintId::ScDataChanged));
}
namespace {
@ -535,7 +535,7 @@ bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
return pCell->GetPreviousTrack() || pFormulaTrack == pCell;
}
void ScDocument::FinalTrackFormulas( sal_uInt32 nHintId )
void ScDocument::FinalTrackFormulas( SfxHintId nHintId )
{
mbTrackFormulasPending = false;
mbFinalTrackFormulas = true;
@ -556,9 +556,9 @@ void ScDocument::FinalTrackFormulas( sal_uInt32 nHintId )
The next is broadcasted again, and so on.
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();
return;

View File

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

View File

@ -1241,7 +1241,7 @@ struct BroadcastRecalcOnRefMoveHandler : std::unary_function<ScTable*, void>
explicit BroadcastRecalcOnRefMoveHandler( ScDocument* pDoc ) :
aSwitch( *pDoc, false),
aBulk( pDoc->GetBASM(), SC_HINT_DATACHANGED)
aBulk( pDoc->GetBASM(), SfxHintId::ScDataChanged)
{
}
@ -2734,7 +2734,7 @@ public:
assert(mpCol);
ScRange aRange(mpCol->GetCol(), nRow1, mpCol->GetTab());
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 );
{
ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED);
ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
// Set all formula cells dirty, and collect non-empty non-formula cell
// positions so that we can broadcast on them below.
@ -3031,7 +3031,7 @@ void ScDocument::CopyMultiRangeFromClip(
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.
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
// position thus were not notified by a ScColumn::BroadcastNewCell()
// during ScTable::SetString(), so do it here.
Broadcast( ScHint( SC_HINT_DATACHANGED, aPos));
Broadcast( ScHint( SfxHintId::ScDataChanged, aPos));
}
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
// position thus were not notified by a ScColumn::BroadcastNewCell()
// during ScTable::SetValue(), so do it here.
Broadcast( ScHint( SC_HINT_DATACHANGED, rPos));
Broadcast( ScHint( SfxHintId::ScDataChanged, rPos));
}
else
{
@ -3774,7 +3774,7 @@ void ScDocument::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt )
bool bOldAutoCalc = GetAutoCalc();
bAutoCalc = false; // no mulitple calculations
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED);
ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
TableContainer::iterator it = maTabs.begin();
for (;it != maTabs.end(); ++it)
if (*it)
@ -3795,7 +3795,7 @@ void ScDocument::SetDirty( const ScRange& rRange, bool bIncludeEmptyCells )
bool bOldAutoCalc = GetAutoCalc();
bAutoCalc = false; // no mulitple calculations
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM(), SC_HINT_DATACHANGED);
ScBulkBroadcast aBulkBroadcast( GetBASM(), SfxHintId::ScDataChanged);
SCTAB nTab2 = rRange.aEnd.Tab();
for (SCTAB i=rRange.aStart.Tab(); i<=nTab2 && i < static_cast<SCTAB>(maTabs.size()); i++)
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
* doesn't? */
if (bIncludeEmptyCells)
BroadcastCells( rRange, SC_HINT_DATACHANGED, false);
BroadcastCells( rRange, SfxHintId::ScDataChanged, false);
}
SetAutoCalc( bOldAutoCalc );
}

View File

@ -2204,8 +2204,8 @@ void ScFormulaCell::Notify( const SfxHint& rHint )
if (pDocument->IsInDtorClear())
return;
const sal_uInt32 nHint = rHint.GetId();
if (nHint == SC_HINT_REFERENCE)
const SfxHintId nHint = rHint.GetId();
if (nHint == SfxHintId::ScReference)
{
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 (nHint & (SC_HINT_DATACHANGED | SC_HINT_TABLEOPDIRTY))
if (nHint == SfxHintId::ScDataChanged || nHint == SfxHintId::ScTableOpDirty)
{
bool bForceTrack = false;
if ( nHint & SC_HINT_TABLEOPDIRTY )
if ( nHint == SfxHintId::ScTableOpDirty )
{
bForceTrack = !bTableOpDirty;
if ( !bTableOpDirty )
@ -2395,7 +2395,7 @@ void ScFormulaCell::SetTableOpDirty()
bTableOpDirty = true;
}
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 )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
GetItemSet().SetParent( nullptr );
}

View File

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

View File

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

View File

@ -114,13 +114,13 @@ void SAL_CALL ScAddInListener::modified( const css::sheet::ResultEvent& aEvent )
// 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 )
{
ScDocument* pDoc = *it;
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;
}
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 )
{
ScDocument* pDoc = *it;
pDoc->TrackFormulas();
pDoc->GetDocumentShell()->Broadcast( SfxHint( FID_DATACHANGED ) );
pDoc->GetDocumentShell()->Broadcast( SfxHint( SfxHintId::ScDataChanged ) );
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -111,7 +111,7 @@ void ScLookupCache::Notify( const SfxHint& rHint )
if (!mpDoc->IsInDtorClear())
{
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);
delete this;

View File

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

View File

@ -126,7 +126,7 @@ void SAL_CALL ScAccessibleContextBase::release()
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
dispose();

View File

@ -1551,7 +1551,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else
{
// only notify if child exist, otherwise it is not necessary
if ((rHint.GetId() == SC_HINT_ACC_TABLECHANGED) &&
if ((rHint.GetId() == SfxHintId::ScAccTableChanged) &&
mpAccessibleSpreadsheet.is())
{
FreeAccessibleSpreadsheet();
@ -1575,12 +1575,12 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (mpAccessibleSpreadsheet.is())
mpAccessibleSpreadsheet->FireFirstCellFocus();
}
else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
else if (rHint.GetId() == SfxHintId::ScAccMakeDrawLayer)
{
if (mpChildrenShapes)
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))
{
@ -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())
{
@ -1619,7 +1619,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
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);
maVisArea = GetVisibleArea_Impl();

View File

@ -1236,7 +1236,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
else
{
// 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
{
@ -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();
}
else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
else if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{
Size aOutputSize;
vcl::Window* pSizeWindow = mpViewShell->GetWindow();

View File

@ -123,7 +123,7 @@ void SAL_CALL ScAccessiblePageHeader::disposing()
void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// only notify if child exist, otherwise it is not necessary
if (rHint.GetId() == SC_HINT_DATACHANGED)
if (rHint.GetId() == SfxHintId::ScDataChanged)
{
ScHFAreas aOldAreas(maAreas);
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());
}
else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
else if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{
AccessibleEventObject aEvent;
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 )
{
// only notify if child exist, otherwise it is not necessary
if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
if (rHint.GetId() == SfxHintId::ScAccVisAreaChanged)
{
if (mpTextHelper)
mpTextHelper->UpdateChildren();

View File

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

View File

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

View File

@ -86,14 +86,14 @@ void SAL_CALL ScAccessiblePreviewTable::disposing()
void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
const sal_uInt32 nId = rHint.GetId();
if ( nId == SFX_HINT_DATACHANGED )
const SfxHintId nId = rHint.GetId();
if ( nId == SfxHintId::DataChanged )
{
// column / row layout may change with any document change,
// so it must be invalidated
DELETEZ( mpTableInfo );
}
else if (nId == SC_HINT_ACC_VISAREACHANGED)
else if (nId == SfxHintId::ScAccVisAreaChanged)
{
AccessibleEventObject aEvent;
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().aEnd.Row() == maRange.aEnd.Row())))
{
// ignore next SC_HINT_DATACHANGED notification
// ignore next SfxHintId::ScDataChanged notification
mbDelIns = true;
sal_Int16 nId(0);
@ -479,7 +479,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
}
else
{
if (rHint.GetId() == SC_HINT_ACC_CURSORCHANGED)
if (rHint.GetId() == SfxHintId::ScAccCursorChanged)
{
if (mpViewShell)
{
@ -657,7 +657,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
m_LastMarkedRanges = *mpMarkedRanges;
}
}
else if (rHint.GetId() == SC_HINT_DATACHANGED)
else if (rHint.GetId() == SfxHintId::ScDataChanged)
{
if (!mbDelIns)
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 )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@ -907,7 +907,7 @@ ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
{
mpWindow = nullptr;
mpEditView = nullptr;
@ -1165,7 +1165,7 @@ ScAccessiblePreviewCellTextData::~ScAccessiblePreviewCellTextData()
void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@ -1238,7 +1238,7 @@ ScAccessiblePreviewHeaderCellTextData::~ScAccessiblePreviewHeaderCellTextData()
void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr; // invalid now
if (mpViewForwarder)
@ -1356,7 +1356,7 @@ ScAccessibleTextData* ScAccessibleHeaderTextData::Clone() const
void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr;// invalid now
mpDocSh = nullptr;
@ -1469,7 +1469,7 @@ ScAccessibleTextData* ScAccessibleNoteTextData::Clone() const
void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
{
mpViewShell = nullptr;// invalid now
mpDocSh = nullptr;
@ -1605,7 +1605,7 @@ ScAccessibleCsvTextData::~ScAccessibleCsvTextData()
void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ( rHint.GetId() == SFX_HINT_DYING )
if ( rHint.GetId() == SfxHintId::Dying )
{
mpWindow = nullptr;
mpEditEngine = nullptr;

View File

@ -394,7 +394,7 @@ handle_r1c1:
{
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();
pRangeFindList->SetHidden(true);
pDocSh->Broadcast( SfxHint( SC_HINT_SHOWRANGEFINDER ) ); // Steal
pDocSh->Broadcast( SfxHint( SfxHintId::ScShowRangeFinder ) ); // Steal
DELETEZ(pRangeFindList);
}
}
@ -1838,7 +1838,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchron
EnterHandler();
bFormulaMode = false;
pRefViewSh = nullptr;
SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@ -2368,7 +2368,7 @@ void ScInputHandler::UpdateFormulaMode()
{
bFormulaMode = true;
pRefViewSh = pActiveViewSh;
pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(this);
if (pInputWin)
pInputWin->SetFormulaMode(true);
@ -2387,7 +2387,7 @@ void ScInputHandler::UpdateFormulaMode()
ShowRefFrame();
bFormulaMode = false;
pRefViewSh = nullptr;
pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@ -2819,7 +2819,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
}
bFormulaMode = false;
pSfxApp->Broadcast( SfxHint( FID_REFMODECHANGED ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
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 )
{
@ -2903,7 +2903,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
pLastState = nullptr;
}
else
pSfxApp->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
pSfxApp->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
@ -2947,7 +2947,7 @@ void ScInputHandler::CancelHandler()
pExecuteSh->ActiveGrabFocus();
}
bFormulaMode = false;
SfxGetpApp()->Broadcast( SfxHint( FID_REFMODECHANGED ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScRefModeChanged ) );
SC_MOD()->SetRefInputHdl(nullptr);
if (pInputWin)
pInputWin->SetFormulaMode(false);
@ -3697,7 +3697,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
}
if (bStopEditing)
SfxGetpApp()->Broadcast( SfxHint( FID_KILLEDITVIEW ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScKillEditView ) );
// As long as the content is not edited, turn off online spelling.
// 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
if ( rNotify.eNotificationType == EE_NOTIFY_TEXTVIEWSCROLLED
|| rNotify.eNotificationType == EE_NOTIFY_TEXTHEIGHTCHANGED )
|| rNotify.eNotificationType == EE_NOTIFY_TextHeightChanged )
SetScrollBarRange();
}
@ -1954,8 +1954,8 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else
{
const sal_uInt32 nHintId = rHint.GetId();
if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL)
const SfxHintId nHintId = rHint.GetId();
if ( nHintId == SfxHintId::ScAreasChanged || nHintId == SfxHintId::ScNavigatorUpdateAll)
FillRangeNames();
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -507,7 +507,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css
else
{
// 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);
@ -987,16 +987,11 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
break;
}
}
else // Without parameter
else if (rHint.GetId() == SfxHintId::TitleChanged) // Without parameter
{
switch ( rHint.GetId() )
{
case SFX_HINT_TITLECHANGED:
aDocument.SetName( SfxShell::GetName() );
// RegisterNewTargetNames gibts nicht mehr
SfxGetpApp()->Broadcast(SfxHint( SC_HINT_DOCNAME_CHANGED )); // Navigator
break;
}
aDocument.SetName( SfxShell::GetName() );
// RegisterNewTargetNames gibts nicht mehr
SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDocNameChanged )); // Navigator
}
}
@ -2488,8 +2483,8 @@ bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor, bool bRegisterRecent )
{
bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor, bRegisterRecent );
// SC_HINT_DOC_SAVED for change ReadOnly -> Read/Write
Broadcast( SfxHint( SC_HINT_DOC_SAVED ) );
// SfxHintId::ScDocSaved for change ReadOnly -> Read/Write
Broadcast( SfxHint( SfxHintId::ScDocSaved ) );
return bRet;
}
@ -2804,7 +2799,7 @@ void ScDocShell::SetModified( bool bModified )
if ( SfxObjectShell::IsEnableSetModified() )
{
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
// 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.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
pPaintLockData->SetModified(); // Later on ...
return;
@ -2836,7 +2831,7 @@ void ScDocShell::SetDocumentModified()
aDocument.InvalidateStyleSheetUsage();
aDocument.InvalidateTableArea();
aDocument.InvalidateLastTableOpParams();
aDocument.Broadcast(ScHint(SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS));
aDocument.Broadcast(ScHint(SfxHintId::ScDataChanged, BCA_BRDCST_ALWAYS));
if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() )
aDocument.CalcFormulaTree( true );
aDocument.RefreshDirtyTableColumnNames();
@ -2857,7 +2852,7 @@ void ScDocShell::SetDocumentModified()
}
// 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() )
{
aDocument.UpdateChartListenerCollection();
SfxGetpApp()->Broadcast(SfxHint( SC_HINT_DRAW_CHANGED )); // Navigator
SfxGetpApp()->Broadcast(SfxHint( SfxHintId::ScDrawChanged )); // Navigator
}
SC_MOD()->AnythingChanged();
}
@ -3169,7 +3164,7 @@ void ScDocShellModificator::SetDocumentModified()
{
// uno broadcast is necessary for api to work
// -> 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);
pDrawLayer = aDocument.GetDrawLayer();
InitItems(); // including Undo and Basic
Broadcast( SfxHint( SC_HINT_DRWLAYER_NEW ) );
Broadcast( SfxHint( SfxHintId::ScDrawLayerNew ) );
if (nDocumentLock)
pDrawLayer->setLock(true);
}

View File

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

View File

@ -456,7 +456,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
// Formeln berechnen und painten wie im TrackTimeHdl
aDocument.TrackFormulas();
Broadcast(SfxHint(FID_DATACHANGED));
Broadcast(SfxHint(SfxHintId::ScDataChanged));
// wenn FID_DATACHANGED irgendwann mal asynchron werden sollte
// (z.B. mit Invalidate am Window), muss hier ein Update erzwungen werden.
@ -1235,7 +1235,7 @@ void ScDocShell::DoRecalc( bool bApi )
if ( pSh )
pSh->UpdateCharts(true);
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
// Wenn es Charts gibt, dann alles painten, damit nicht
// PostDataChanged und die Charts nacheinander kommen und Teile
@ -1263,17 +1263,17 @@ void ScDocShell::DoHardRecalc( bool /* bApi */ )
if ( pSh )
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)
SCTAB nTabCount = aDocument.GetTableCount();
if (aDocument.HasAnySheetEventScript( ScSheetEventId::CALCULATE, true )) // search also for VBA handler
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
aDocument.SetCalcNotification(nTab);
// CalcAll doesn't broadcast value changes, so SC_HINT_CALCALL is broadcasted globally
// in addition to SFX_HINT_DATACHANGED.
aDocument.BroadcastUno( SfxHint( SC_HINT_CALCALL ) );
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
// CalcAll doesn't broadcast value changes, so SfxHintId::ScCalcAll is broadcasted globally
// in addition to SfxHintId::DataChanged.
aDocument.BroadcastUno( SfxHint( SfxHintId::ScCalcAll ) );
aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
// use hard recalc also to disable stream-copying of all sheets
// (somewhat consistent with charts)
@ -1309,14 +1309,14 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const OUString& rStyle )
void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
sal_uInt16 nId = rHint.GetHint();
SfxHintId nId = rHint.GetId();
const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet();
if (!pStyle)
return;
if ( pStyle->GetFamily() == SfxStyleFamily::Page )
{
if ( nId == SfxStyleSheetHintId::MODIFIED )
if ( nId == SfxHintId::StyleSheetModified )
{
ScDocShellModificator aModificator( *this );
@ -1356,7 +1356,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
}
else if ( pStyle->GetFamily() == SfxStyleFamily::Para )
{
if ( nId == SfxStyleSheetHintId::MODIFIED)
if ( nId == SfxHintId::StyleSheetModified)
{
OUString aNewName = pStyle->GetName();
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 );
// 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.
aDocument.BroadcastUno( SfxHint( SFX_HINT_DATACHANGED ) );
aDocument.BroadcastUno( SfxHint( SfxHintId::DataChanged ) );
}
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
if (eMode==SC_DB_IMPORT)
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
}
pData = pNoNameData;
}
@ -758,7 +758,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUStri
aModificator.SetDocumentModified();
if (!aOldName.equals(rName))
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
@ -824,7 +824,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
PostPaintExtras(); // Tabellenreiter
aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
return nNewTab;
}
@ -991,7 +991,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
PostPaintGridAll();
PostPaintExtras();
aModificator.SetDocumentModified();
SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) );
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
return true;
}

View File

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

View File

@ -103,7 +103,7 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const OUString& rItem ) :
pDocSh->GetDocument().StartListeningArea( aRange, false, &aForwarder );
StartListening(*pDocSh); // um mitzubekommen, wenn die DocShell geloescht wird
StartListening(*SfxGetpApp()); // for SC_HINT_AREAS_CHANGED
StartListening(*SfxGetpApp()); // for SfxHintId::ScAreasChanged
}
ScServerObject::~ScServerObject()
@ -197,11 +197,11 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
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 )
{
// from DocShell, only SFX_HINT_DYING is interesting
if ( rHint.GetId() == SFX_HINT_DYING )
// from DocShell, only SfxHintId::Dying is interesting
if ( rHint.GetId() == SfxHintId::Dying )
{
pDocSh = nullptr;
EndListening(*SfxGetpApp());
@ -210,7 +210,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
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
ScRange aNew;
@ -223,7 +223,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// must be from Area broadcasters
const ScHint* pScHint = dynamic_cast<const ScHint*>( &rHint );
if (pScHint && (pScHint->GetId() & SC_HINT_DATACHANGED))
if (pScHint && (pScHint->GetId() == SfxHintId::ScDataChanged))
bDataChanged = true;
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
{
if (rHint.GetId() == SFX_HINT_DYING)
if (rHint.GetId() == SfxHintId::Dying)
{
// If the range is being deleted, listening must be restarted
// after the deletion is complete (done in GetData)

View File

@ -24,15 +24,6 @@
#include <com/sun/star/uno/XInterface.hpp>
#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
{
public:

View File

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

View File

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

View File

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

View File

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

View File

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

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