summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-09-01 21:17:51 +0200
committerMichael Stahl <mstahl@redhat.com>2017-09-01 23:55:11 +0200
commita871dbed8abfeaeb4faf44129b8983c26f7a9cb3 (patch)
treebbb7a45de146a480ff846094db4ec05f49fbe0ad
parent4cf89526e6eb76097ccfa0f710507b87da2a0aa0 (diff)
tdf#111970 svx: use SolarMutex for locking in FmXFormShell
FmXFormShell has a confusing mess of 3 of its own locks plus some SolarMutexGuards in a couple functions. But despite all that, most members are accessed without any locking. First, add a "_Lock" suffix to all (non-API) functions that access members or call into VCL, then add SolarMutexGuard in all API entry points that call _Lock functions, and finally remove the existing silly mutex members. This should also fix the reported assertion (which probably doesn't happen on master any more since the Scheduler has its own mutex now). Change-Id: I215cdfe49ffe675229baa4b19ab419f440f0ffb0
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/fmPropBrw.cxx2
-rw-r--r--svx/source/form/fmshell.cxx153
-rw-r--r--svx/source/form/fmshimp.cxx535
-rw-r--r--svx/source/form/fmview.cxx20
-rw-r--r--svx/source/form/fmvwimp.cxx16
-rw-r--r--svx/source/form/navigatortree.cxx38
-rw-r--r--svx/source/form/navigatortreemodel.cxx2
-rw-r--r--svx/source/form/tabwin.cxx2
-rw-r--r--svx/source/inc/fmshimp.hxx194
10 files changed, 488 insertions, 476 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 064fa09f1c81..455962328932 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1835,7 +1835,7 @@ void FmFilterNavigatorWin::UpdateContent(FmFormShell const * pFormShell)
m_pNavigator->UpdateContent( nullptr, nullptr );
else
{
- Reference< XFormController > xController(pFormShell->GetImpl()->getActiveInternalController());
+ Reference<XFormController> const xController(pFormShell->GetImpl()->getActiveInternalController_Lock());
Reference< XIndexAccess > xContainer;
if (xController.is())
{
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index b5459b8f074e..4431f27c7e0f 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -627,7 +627,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
FmFormShell* pShell = dynamic_cast<FmFormShell*>( static_cast<const SfxObjectItem*>(pState)->GetShell() );
InterfaceBag aSelection;
if ( pShell )
- pShell->GetImpl()->getCurrentSelection( aSelection );
+ pShell->GetImpl()->getCurrentSelection_Lock(aSelection);
impl_ensurePropertyBrowser_nothrow( pShell );
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 58c8e1abca9b..900d5c243624 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -222,13 +222,13 @@ void FmFormShell::NotifyMarkListChanged(FmFormView* pWhichView)
bool FmFormShell::PrepareClose(bool bUI)
{
- if ( GetImpl()->didPrepareClose() )
+ if (GetImpl()->didPrepareClose_Lock())
// we already did a PrepareClose for the current modifications of the current form
return true;
bool bResult = true;
// Save the data records, not in DesignMode and FilterMode
- if (!m_bDesignMode && !GetImpl()->isInFilterMode() &&
+ if (!m_bDesignMode && !GetImpl()->isInFilterMode_Lock() &&
m_pFormView && m_pFormView->GetActualOutDev() &&
m_pFormView->GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW)
{
@@ -241,9 +241,9 @@ bool FmFormShell::PrepareClose(bool bUI)
{
// First, the current contents of the controls are stored.
// If everything has gone smoothly, the modified records are stored.
- if ( GetImpl()->getActiveController().is() )
+ if (GetImpl()->getActiveController_Lock().is())
{
- const svx::ControllerFeatures& rController = GetImpl()->getActiveControllerFeatures();
+ const svx::ControllerFeatures& rController = GetImpl()->getActiveControllerFeatures_Lock();
if ( rController->commitCurrentControl() )
{
const bool bModified = rController->isModifiedRow();
@@ -259,7 +259,7 @@ bool FmFormShell::PrepareClose(bool bUI)
bResult = rController->commitCurrentRecord( );
SAL_FALLTHROUGH;
case RET_NO:
- GetImpl()->didPrepareClose( true );
+ GetImpl()->didPrepareClose_Lock(true);
break;
case RET_CANCEL:
@@ -281,7 +281,7 @@ void FmFormShell::impl_setDesignMode(bool bDesign)
if (!bDesign)
m_nLastSlot = SID_FM_DESIGN_MODE;
- GetImpl()->SetDesignMode(bDesign);
+ GetImpl()->SetDesignMode_Lock(bDesign);
// my m_bDesignMode is also set by the Impl ...
}
else
@@ -302,16 +302,16 @@ bool FmFormShell::HasUIFeature(SfxShellFeature nFeature) const
if (nFeature & SfxShellFeature::FormShowDatabaseBar)
{
// only if forms are also available
- bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && !GetImpl()->isInFilterMode();
+ bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar_Lock() && !GetImpl()->isInFilterMode_Lock();
}
else if (nFeature & SfxShellFeature::FormShowFilterBar)
{
// only if forms are also available
- bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && GetImpl()->isInFilterMode();
+ bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar_Lock() && GetImpl()->isInFilterMode_Lock();
}
else if (nFeature & SfxShellFeature::FormShowFilterNavigator)
{
- bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && GetImpl()->isInFilterMode();
+ bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar_Lock() && GetImpl()->isInFilterMode_Lock();
}
else if (nFeature & SfxShellFeature::FormShowField)
{
@@ -327,11 +327,11 @@ bool FmFormShell::HasUIFeature(SfxShellFeature nFeature) const
}
else if (nFeature & SfxShellFeature::FormShowTextControlBar)
{
- bResult = !GetImpl()->IsReadonlyDoc() && m_pImpl->IsActiveControl( true );
+ bResult = !GetImpl()->IsReadonlyDoc_Lock() && m_pImpl->IsActiveControl_Lock(true);
}
else if (nFeature & SfxShellFeature::FormShowDataNavigator)
{
- bResult = GetImpl()->isEnhancedForm();
+ bResult = GetImpl()->isEnhancedForm_Lock();
}
else if ( (nFeature & SfxShellFeature::FormTBControls)
|| (nFeature & SfxShellFeature::FormTBMoreControls)
@@ -518,7 +518,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_MORE_CONTROLS:
case SID_FM_FORM_DESIGN_TOOLS:
{
- FormToolboxes aToolboxAccess( GetImpl()->getHostFrame() );
+ FormToolboxes aToolboxAccess(GetImpl()->getHostFrame_Lock());
aToolboxAccess.toggleToolbox( nSlot );
rReq.Done();
}
@@ -533,7 +533,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
// if we execute this ourself, then either the application does not implement an own handling for this,
// of we're on the top of the dispatcher stack, which means a control has the focus.
// In the latter case, we put the focus to the document window, otherwise, we focus the first control
- const bool bHasControlFocus = GetImpl()->HasControlFocus();
+ const bool bHasControlFocus = GetImpl()->HasControlFocus_Lock();
if ( bHasControlFocus )
{
if (m_pFormView)
@@ -552,7 +552,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
break;
case SID_FM_VIEW_AS_GRID:
- GetImpl()->CreateExternalView();
+ GetImpl()->CreateExternalView_Lock();
break;
case SID_FM_CONVERTTO_EDIT :
case SID_FM_CONVERTTO_BUTTON :
@@ -574,10 +574,10 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_CONVERTTO_SCROLLBAR :
case SID_FM_CONVERTTO_SPINBUTTON :
case SID_FM_CONVERTTO_NAVIGATIONBAR :
- GetImpl()->executeControlConversionSlot(FmXFormShell::SlotToIdent(nSlot));
+ GetImpl()->executeControlConversionSlot_Lock(FmXFormShell::SlotToIdent(nSlot));
// after the conversion, re-determine the selection, since the
// selected object has changed
- GetImpl()->SetSelection(GetFormView()->GetMarkedObjectList());
+ GetImpl()->SetSelection_Lock(GetFormView()->GetMarkedObjectList());
break;
case SID_FM_LEAVE_CREATE:
m_nLastSlot = 0;
@@ -589,7 +589,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
bool bShow = true;
if ( pShowItem )
bShow = pShowItem->GetValue();
- GetImpl()->ShowSelectionProperties( bShow );
+ GetImpl()->ShowSelectionProperties_Lock(bShow);
rReq.Done();
} break;
@@ -601,10 +601,10 @@ void FmFormShell::Execute(SfxRequest &rReq)
bool bShow = pShowItem == nullptr || pShowItem->GetValue();
InterfaceBag aOnlyTheForm;
- aOnlyTheForm.insert( Reference< XInterface >( GetImpl()->getCurrentForm(), UNO_QUERY ) );
- GetImpl()->setCurrentSelection( aOnlyTheForm );
+ aOnlyTheForm.insert(Reference<XInterface>(GetImpl()->getCurrentForm_Lock(), UNO_QUERY));
+ GetImpl()->setCurrentSelection_Lock(aOnlyTheForm);
- GetImpl()->ShowSelectionProperties( bShow );
+ GetImpl()->ShowSelectionProperties_Lock(bShow);
rReq.Done();
} break;
@@ -614,10 +614,10 @@ void FmFormShell::Execute(SfxRequest &rReq)
const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(nSlot);
bool bShow = pShowItem == nullptr || pShowItem->GetValue();
- OSL_ENSURE( GetImpl()->onlyControlsAreMarked(), "FmFormShell::Execute: ControlProperties should be disabled!" );
+ OSL_ENSURE( GetImpl()->onlyControlsAreMarked_Lock(), "FmFormShell::Execute: ControlProperties should be disabled!" );
if ( bShow )
- GetImpl()->selectLastMarkedControls();
- GetImpl()->ShowSelectionProperties( bShow );
+ GetImpl()->selectLastMarkedControls_Lock();
+ GetImpl()->ShowSelectionProperties_Lock(bShow);
rReq.Done();
} break;
@@ -641,7 +641,8 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_TAB_DIALOG:
{
- GetImpl()->ExecuteTabOrderDialog( Reference< XTabControllerModel >( GetImpl()->getCurrentForm(), UNO_QUERY ) );
+ GetImpl()->ExecuteTabOrderDialog_Lock(
+ Reference<XTabControllerModel>(GetImpl()->getCurrentForm_Lock(), UNO_QUERY));
rReq.Done();
}
break;
@@ -678,15 +679,15 @@ void FmFormShell::Execute(SfxRequest &rReq)
break;
case SID_FM_USE_WIZARDS:
{
- GetImpl()->SetWizardUsing(!GetImpl()->GetWizardUsing());
+ GetImpl()->SetWizardUsing_Lock(!GetImpl()->GetWizardUsing_Lock());
GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_USE_WIZARDS);
}
break;
case SID_FM_SEARCH:
{
- const svx::ControllerFeatures& rController = GetImpl()->getActiveControllerFeatures();
+ const svx::ControllerFeatures& rController = GetImpl()->getActiveControllerFeatures_Lock();
if ( rController->commitCurrentControl() && rController->commitCurrentRecord() )
- GetImpl()->ExecuteSearch();
+ GetImpl()->ExecuteSearch_Lock();
rReq.Done();
}
break;
@@ -708,14 +709,14 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_ORDERCRIT:
case SID_FM_FORM_FILTERED:
{
- GetImpl()->ExecuteFormSlot( nSlot );
+ GetImpl()->ExecuteFormSlot_Lock(nSlot);
rReq.Done();
}
break;
case SID_FM_RECORD_ABSOLUTE:
{
- const svx::ControllerFeatures& rController = GetImpl()->getNavControllerFeatures();
+ const svx::ControllerFeatures& rController = GetImpl()->getNavControllerFeatures_Lock();
sal_Int32 nRecord = -1;
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -767,13 +768,13 @@ void FmFormShell::Execute(SfxRequest &rReq)
bReopenNavigator = true;
}
- Reference< runtime::XFormController > xController( GetImpl()->getActiveController() );
+ Reference<runtime::XFormController> const xController(GetImpl()->getActiveController_Lock());
if ( GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_FILTER_NAVIGATOR )
// closing the window was denied, for instance because of a invalid criterion
|| ( xController.is()
- && !GetImpl()->getActiveControllerFeatures()->commitCurrentControl( )
+ && !GetImpl()->getActiveControllerFeatures_Lock()->commitCurrentControl()
)
// committing the controller was denied
)
@@ -783,7 +784,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
}
}
- GetImpl()->stopFiltering( !bCancelled );
+ GetImpl()->stopFiltering_Lock(!bCancelled);
rReq.Done();
if ( bReopenNavigator )
@@ -795,7 +796,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_FILTER_START:
{
- GetImpl()->startFiltering();
+ GetImpl()->startFiltering_Lock();
rReq.Done();
// initially open the filter navigator, the whole form based filter is pretty useless without it
@@ -819,14 +820,14 @@ void FmFormShell::GetState(SfxItemSet &rSet)
case SID_FM_MORE_CONTROLS:
case SID_FM_FORM_DESIGN_TOOLS:
{
- FormToolboxes aToolboxAccess( GetImpl()->getHostFrame() );
+ FormToolboxes aToolboxAccess(GetImpl()->getHostFrame_Lock());
rSet.Put( SfxBoolItem( nWhich, aToolboxAccess.isToolboxVisible( nWhich ) ) );
}
break;
case SID_FM_FILTER_EXECUTE:
case SID_FM_FILTER_EXIT:
- if (!GetImpl()->isInFilterMode())
+ if (!GetImpl()->isInFilterMode_Lock())
rSet.DisableItem( nWhich );
break;
@@ -836,7 +837,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
else if (!GetFormModel())
rSet.DisableItem( nWhich );
else
- rSet.Put( SfxBoolItem(nWhich, GetImpl()->GetWizardUsing() ) );
+ rSet.Put(SfxBoolItem(nWhich, GetImpl()->GetWizardUsing_Lock()));
break;
case SID_FM_AUTOCONTROLFOCUS:
if (!GetFormModel())
@@ -899,7 +900,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
break;
case SID_FM_FILTER_NAVIGATOR_CONTROL:
{
- if (GetImpl()->isInFilterMode())
+ if (GetImpl()->isInFilterMode_Lock())
rSet.Put(SfxObjectItem(nWhich, this));
else
rSet.Put(SfxObjectItem(nWhich));
@@ -936,7 +937,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
case SID_FM_SHOW_PROPERTY_BROWSER:
{
- rSet.Put(SfxBoolItem(nWhich, GetImpl()->IsPropBrwOpen()));
+ rSet.Put(SfxBoolItem(nWhich, GetImpl()->IsPropBrwOpen_Lock()));
}
break;
@@ -944,14 +945,14 @@ void FmFormShell::GetState(SfxItemSet &rSet)
{
// potentially, give the Impl the opportunity to update its
// current objects which are aligned with the current MarkList
- if (GetImpl()->IsSelectionUpdatePending())
- GetImpl()->ForceUpdateSelection();
+ if (GetImpl()->IsSelectionUpdatePending_Lock())
+ GetImpl()->ForceUpdateSelection_Lock();
- if ( !m_pFormView || !m_bDesignMode || !GetImpl()->onlyControlsAreMarked() )
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->onlyControlsAreMarked_Lock())
rSet.DisableItem( nWhich );
else
{
- bool bChecked = GetImpl()->IsPropBrwOpen() && !GetImpl()->isSolelySelected( GetImpl()->getCurrentForm() );
+ bool const bChecked = GetImpl()->IsPropBrwOpen_Lock() && !GetImpl()->isSolelySelected_Lock(GetImpl()->getCurrentForm_Lock());
// if the property browser is open, and only controls are marked, and the current selection
// does not consist of only the current form, then the current selection is the (composition of)
// the currently marked controls
@@ -963,28 +964,28 @@ void FmFormShell::GetState(SfxItemSet &rSet)
{
// potentially, give the Impl the opportunity to update its
// current objects which are aligned with the current MarkList
- if (GetImpl()->IsSelectionUpdatePending())
- GetImpl()->ForceUpdateSelection();
+ if (GetImpl()->IsSelectionUpdatePending_Lock())
+ GetImpl()->ForceUpdateSelection_Lock();
- if ( !m_pFormView || !m_bDesignMode || !GetImpl()->getCurrentForm().is() )
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurrentForm_Lock().is())
rSet.DisableItem( nWhich );
else
{
- bool bChecked = GetImpl()->IsPropBrwOpen() && GetImpl()->isSolelySelected( GetImpl()->getCurrentForm() );
+ bool const bChecked = GetImpl()->IsPropBrwOpen_Lock() && GetImpl()->isSolelySelected_Lock(GetImpl()->getCurrentForm_Lock());
rSet.Put(SfxBoolItem(nWhich, bChecked));
}
} break;
case SID_FM_TAB_DIALOG:
// potentially, give the Impl the opportunity to update its
// current objects which are aligned with the current MarkList
- if (GetImpl()->IsSelectionUpdatePending())
- GetImpl()->ForceUpdateSelection();
+ if (GetImpl()->IsSelectionUpdatePending_Lock())
+ GetImpl()->ForceUpdateSelection_Lock();
- if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurrentForm().is() )
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurrentForm_Lock().is() )
rSet.DisableItem( nWhich );
break;
case SID_FM_DESIGN_MODE:
- if (!m_pFormView || GetImpl()->IsReadonlyDoc() )
+ if (!m_pFormView || GetImpl()->IsReadonlyDoc_Lock())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, m_bDesignMode) );
@@ -1019,7 +1020,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
else
{
- if (!GetImpl()->canConvertCurrentSelectionToControl("ConvertToFixed"))
+ if (!GetImpl()->canConvertCurrentSelectionToControl_Lock("ConvertToFixed"))
// if it cannot be converted to a fixed text, it is no single control
rSet.DisableItem( nWhich );
}
@@ -1046,7 +1047,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
case SID_FM_CONVERTTO_FORMATTED :
case SID_FM_CONVERTTO_SPINBUTTON :
{
- if (!m_pFormView || !m_bDesignMode || !GetImpl()->canConvertCurrentSelectionToControl(FmXFormShell::SlotToIdent(nWhich)))
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->canConvertCurrentSelectionToControl_Lock(FmXFormShell::SlotToIdent(nWhich)))
rSet.DisableItem( nWhich );
else
{
@@ -1063,12 +1064,12 @@ void FmFormShell::GetState(SfxItemSet &rSet)
void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich)
{
- if ( !GetImpl()->getNavController().is()
- || !isRowSetAlive(GetImpl()->getNavController()->getModel())
+ if ( !GetImpl()->getNavController_Lock().is()
+ || !isRowSetAlive(GetImpl()->getNavController_Lock()->getModel())
|| !m_pFormView
|| m_bDesignMode
- || !GetImpl()->getActiveForm().is()
- || GetImpl()->isInFilterMode()
+ || !GetImpl()->getActiveForm_Lock().is()
+ || GetImpl()->isInFilterMode_Lock()
)
rSet.DisableItem(nWhich);
else
@@ -1079,20 +1080,20 @@ void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich)
switch (nWhich)
{
case SID_FM_VIEW_AS_GRID:
- if (GetImpl()->getHostFrame().is() && GetImpl()->getNavController().is())
+ if (GetImpl()->getHostFrame_Lock().is() && GetImpl()->getNavController_Lock().is())
{
bEnable = true;
bool bDisplayingCurrent =
- GetImpl()->getInternalForm(
- Reference< XForm >( GetImpl()->getNavController()->getModel(), UNO_QUERY )
- ) == GetImpl()->getExternallyDisplayedForm();
+ GetImpl()->getInternalForm_Lock(
+ Reference<XForm>(GetImpl()->getNavController_Lock()->getModel(), UNO_QUERY)
+ ) == GetImpl()->getExternallyDisplayedForm_Lock();
rSet.Put(SfxBoolItem(nWhich, bDisplayingCurrent));
}
break;
case SID_FM_SEARCH:
{
- Reference< css::beans::XPropertySet > xNavSet(GetImpl()->getActiveForm(), UNO_QUERY);
+ Reference<css::beans::XPropertySet> const xNavSet(GetImpl()->getActiveForm_Lock(), UNO_QUERY);
sal_Int32 nCount = ::comphelper::getINT32(xNavSet->getPropertyValue(FM_PROP_ROWCOUNT));
bEnable = nCount != 0;
} break;
@@ -1100,7 +1101,7 @@ void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich)
case SID_FM_RECORD_TOTAL:
{
FeatureState aState;
- GetImpl()->getNavControllerFeatures()->getState( nWhich, aState );
+ GetImpl()->getNavControllerFeatures_Lock()->getState( nWhich, aState );
if ( SID_FM_RECORD_ABSOLUTE == nWhich )
{
sal_Int32 nPosition = 0;
@@ -1147,7 +1148,7 @@ void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich)
break;
case SID_FM_FILTER_START:
- bEnable = GetImpl()->getActiveControllerFeatures()->canDoFormFilter();
+ bEnable = GetImpl()->getActiveControllerFeatures_Lock()->canDoFormFilter();
break;
}
}
@@ -1175,7 +1176,7 @@ void FmFormShell::SetView( FmFormView* _pView )
if ( m_pFormView )
{
if ( IsActive() )
- GetImpl()->viewDeactivated( *m_pFormView );
+ GetImpl()->viewDeactivated_Lock(*m_pFormView);
m_pFormView->SetFormShell( nullptr, FmFormView::FormShellAccess() );
m_pFormView = nullptr;
@@ -1196,14 +1197,14 @@ void FmFormShell::SetView( FmFormView* _pView )
// to the former.
// FS - 30.06.99 - 67308
if ( IsActive() )
- GetImpl()->viewActivated( *m_pFormView );
+ GetImpl()->viewActivated_Lock(*m_pFormView);
}
void FmFormShell::DetermineForms(bool bInvalidate)
{
// are there forms on the current page
- bool bForms = GetImpl()->hasForms();
+ bool bForms = GetImpl()->hasForms_Lock();
if (bForms != m_bHasForms)
{
m_bHasForms = bForms;
@@ -1215,13 +1216,13 @@ void FmFormShell::DetermineForms(bool bInvalidate)
bool FmFormShell::GetY2KState(sal_uInt16& nReturn)
{
- return GetImpl()->GetY2KState(nReturn);
+ return GetImpl()->GetY2KState_Lock(nReturn);
}
void FmFormShell::SetY2KState(sal_uInt16 n)
{
- GetImpl()->SetY2KState(n);
+ GetImpl()->SetY2KState_Lock(n);
}
@@ -1230,7 +1231,7 @@ void FmFormShell::Activate(bool bMDI)
SfxShell::Activate(bMDI);
if ( m_pFormView )
- GetImpl()->viewActivated( *m_pFormView, true );
+ GetImpl()->viewActivated_Lock(*m_pFormView, true);
}
@@ -1239,37 +1240,37 @@ void FmFormShell::Deactivate(bool bMDI)
SfxShell::Deactivate(bMDI);
if ( m_pFormView )
- GetImpl()->viewDeactivated( *m_pFormView, false );
+ GetImpl()->viewDeactivated_Lock(*m_pFormView, false);
}
void FmFormShell::ExecuteTextAttribute( SfxRequest& _rReq )
{
- m_pImpl->ExecuteTextAttribute( _rReq );
+ m_pImpl->ExecuteTextAttribute_Lock(_rReq);
}
void FmFormShell::GetTextAttributeState( SfxItemSet& _rSet )
{
- m_pImpl->GetTextAttributeState( _rSet );
+ m_pImpl->GetTextAttributeState_Lock(_rSet);
}
bool FmFormShell::IsActiveControl() const
{
- return m_pImpl->IsActiveControl(false);
+ return m_pImpl->IsActiveControl_Lock(false);
}
void FmFormShell::ForgetActiveControl()
{
- m_pImpl->ForgetActiveControl();
+ m_pImpl->ForgetActiveControl_Lock();
}
void FmFormShell::SetControlActivationHandler( const Link<LinkParamNone*,void>& _rHdl )
{
- m_pImpl->SetControlActivationHandler( _rHdl );
+ m_pImpl->SetControlActivationHandler_Lock(_rHdl);
}
@@ -1304,7 +1305,7 @@ void FmFormShell::ToggleControlFocus( const SdrUnoObj& i_rUnoObject, const SdrVi
// check if the focus currently is in a control
// Well, okay, do it the other way 'round: Check whether the current control of the active controller
// actually has the focus. This should be equivalent.
- const bool bHasControlFocus = GetImpl()->HasControlFocus();
+ const bool bHasControlFocus = GetImpl()->HasControlFocus_Lock();
if ( bHasControlFocus )
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index a9117cc06822..57e700035123 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -638,7 +638,7 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame )
,m_bFirstActivation( true )
{
m_aMarkTimer.SetTimeout(100);
- m_aMarkTimer.SetInvokeHandler(LINK(this,FmXFormShell,OnTimeOut));
+ m_aMarkTimer.SetInvokeHandler(LINK(this, FmXFormShell, OnTimeOut_Lock));
m_aMarkTimer.SetDebugName("svx::FmXFormShell m_aMarkTimer");
m_xAttachedFrame = _pViewFrame->GetFrame().GetFrameInterface();
@@ -650,7 +650,7 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame )
osl_atomic_decrement(&m_refCount);
// cache the current configuration settings we're interested in
- implAdjustConfigCache();
+ implAdjustConfigCache_Lock();
// and register for changes on this settings
Sequence< OUString > aNames { "FormControlPilotsEnabled" };
EnableNotification(aNames);
@@ -662,7 +662,7 @@ FmXFormShell::~FmXFormShell()
}
-Reference< css::frame::XModel > FmXFormShell::getContextDocument() const
+Reference< css::frame::XModel > FmXFormShell::getContextDocument_Lock() const
{
Reference< css::frame::XModel > xModel;
@@ -683,14 +683,15 @@ Reference< css::frame::XModel > FmXFormShell::getContextDocument() const
}
-bool FmXFormShell::isEnhancedForm() const
+bool FmXFormShell::isEnhancedForm_Lock() const
{
- return getDocumentType() == eEnhancedForm;
+ return getDocumentType_Lock() == eEnhancedForm;
}
-bool FmXFormShell::impl_checkDisposed() const
+bool FmXFormShell::impl_checkDisposed_Lock() const
{
+ DBG_TESTSOLARMUTEX();
if ( !m_pShell )
{
OSL_FAIL( "FmXFormShell::impl_checkDisposed: already disposed!" );
@@ -700,13 +701,13 @@ bool FmXFormShell::impl_checkDisposed() const
}
-::svxform::DocumentType FmXFormShell::getDocumentType() const
+::svxform::DocumentType FmXFormShell::getDocumentType_Lock() const
{
if ( m_eDocumentType != eUnknownDocumentType )
return m_eDocumentType;
// determine the type of document we live in
- Reference< css::frame::XModel > xModel = getContextDocument();
+ Reference<css::frame::XModel> xModel = getContextDocument_Lock();
if ( xModel.is() )
m_eDocumentType = DocumentClassification::classifyDocument( xModel );
else
@@ -720,9 +721,9 @@ bool FmXFormShell::impl_checkDisposed() const
}
-bool FmXFormShell::IsReadonlyDoc() const
+bool FmXFormShell::IsReadonlyDoc_Lock() const
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return true;
FmFormModel* pModel = m_pShell->GetFormModel();
@@ -735,11 +736,12 @@ bool FmXFormShell::IsReadonlyDoc() const
void SAL_CALL FmXFormShell::disposing(const lang::EventObject& e)
{
+ SolarMutexGuard g;
if (m_xActiveController == e.Source)
{
// the controller will release, then release everything
- stopListening();
+ stopListening_Lock();
m_xActiveForm = nullptr;
m_xActiveController = nullptr;
m_xNavigationController = nullptr;
@@ -766,14 +768,16 @@ void SAL_CALL FmXFormShell::disposing(const lang::EventObject& e)
m_xExternalDisplayedForm = nullptr;
m_xExtViewTriggerController = nullptr;
- InvalidateSlot( SID_FM_VIEW_AS_GRID, false );
+ InvalidateSlot_Lock( SID_FM_VIEW_AS_GRID, false );
}
}
void SAL_CALL FmXFormShell::propertyChange(const PropertyChangeEvent& evt)
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock())
return;
if (evt.PropertyName == FM_PROP_ROWCOUNT)
@@ -796,22 +800,24 @@ void SAL_CALL FmXFormShell::propertyChange(const PropertyChangeEvent& evt)
else
{
// with the following the slot is invalidated asynchron
- LockSlotInvalidation(true);
- InvalidateSlot(SID_FM_RECORD_TOTAL, false);
- LockSlotInvalidation(false);
+ LockSlotInvalidation_Lock(true);
+ InvalidateSlot_Lock(SID_FM_RECORD_TOTAL, false);
+ LockSlotInvalidation_Lock(false);
}
}
// this may be called from a non-main-thread so invalidate the shell asynchronously
- LockSlotInvalidation(true);
- InvalidateSlot(0, false); // special meaning : invalidate m_pShell
- LockSlotInvalidation(false);
+ LockSlotInvalidation_Lock(true);
+ InvalidateSlot_Lock(0, false); // special meaning : invalidate m_pShell
+ LockSlotInvalidation_Lock(false);
}
void FmXFormShell::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatures )
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock())
return;
OSL_ENSURE( _rFeatures.size() > 0, "FmXFormShell::invalidateFeatures: invalid arguments!" );
@@ -840,18 +846,22 @@ void FmXFormShell::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatu
void SAL_CALL FmXFormShell::formActivated(const lang::EventObject& rEvent)
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock())
return;
Reference< runtime::XFormController > xController( rEvent.Source, UNO_QUERY_THROW );
m_pTextShell->formActivated( xController );
- setActiveController( xController );
+ setActiveController_Lock(xController);
}
void SAL_CALL FmXFormShell::formDeactivated(const lang::EventObject& rEvent)
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock())
return;
Reference< runtime::XFormController > xController( rEvent.Source, UNO_QUERY_THROW );
@@ -861,11 +871,12 @@ void SAL_CALL FmXFormShell::formDeactivated(const lang::EventObject& rEvent)
void FmXFormShell::disposing()
{
+ SolarMutexGuard g;
FmXFormShell_BASE::disposing();
if ( m_pShell && !m_pShell->IsDesignMode() )
- setActiveController( nullptr, true );
+ setActiveController_Lock(nullptr, true);
// do NOT save the content of the old form (the second parameter tells this)
// if we're here, then we expect that PrepareClose has been called, and thus the user
// got a chance to commit or reject any changes. So in case we're here and there
@@ -875,7 +886,7 @@ void FmXFormShell::disposing()
m_xAttachedFrame = nullptr;
- CloseExternalFormViewer();
+ CloseExternalFormViewer_Lock();
while ( m_aLoadingPages.size() )
{
@@ -884,7 +895,6 @@ void FmXFormShell::disposing()
}
{
- ::osl::MutexGuard aGuard(m_aInvalidationSafety);
if (m_nInvalidationEvent)
{
Application::RemoveUserEvent(m_nInvalidationEvent);
@@ -898,9 +908,6 @@ void FmXFormShell::disposing()
}
{
- ::osl::ClearableMutexGuard aGuard(m_aAsyncSafety);
- aGuard.clear();
-
DBG_ASSERT(!m_nInvalidationEvent, "FmXFormShell::~FmXFormShell : still have an invalidation event !");
// should have been deleted while being disposed
@@ -909,10 +916,10 @@ void FmXFormShell::disposing()
DisableNotification();
- RemoveElement( m_xForms );
+ RemoveElement_Lock(m_xForms);
m_xForms.clear();
- impl_switchActiveControllerListening( false );
+ impl_switchActiveControllerListening_Lock(false);
m_xActiveController = nullptr;
m_xActiveForm = nullptr;
@@ -934,17 +941,15 @@ void FmXFormShell::disposing()
}
-void FmXFormShell::UpdateSlot( sal_Int16 _nId )
+void FmXFormShell::UpdateSlot_Lock(sal_Int16 _nId)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- ::osl::MutexGuard aGuard(m_aInvalidationSafety);
-
if ( m_nLockSlotInvalidation )
{
OSL_FAIL( "FmXFormShell::UpdateSlot: cannot update if invalidation is currently locked!" );
- InvalidateSlot( _nId, false );
+ InvalidateSlot_Lock(_nId, false);
}
else
{
@@ -955,12 +960,11 @@ void FmXFormShell::UpdateSlot( sal_Int16 _nId )
}
-void FmXFormShell::InvalidateSlot( sal_Int16 nId, bool bWithId )
+void FmXFormShell::InvalidateSlot_Lock(sal_Int16 nId, bool bWithId)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- ::osl::MutexGuard aGuard(m_aInvalidationSafety);
if (m_nLockSlotInvalidation)
{
sal_uInt8 nFlags = ( bWithId ? 0x01 : 0 );
@@ -974,12 +978,11 @@ void FmXFormShell::InvalidateSlot( sal_Int16 nId, bool bWithId )
}
-void FmXFormShell::LockSlotInvalidation(bool bLock)
+void FmXFormShell::LockSlotInvalidation_Lock(bool bLock)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- ::osl::MutexGuard aGuard(m_aInvalidationSafety);
DBG_ASSERT(bLock || m_nLockSlotInvalidation>0, "FmXFormShell::LockSlotInvalidation : invalid call !");
if (bLock)
@@ -988,17 +991,16 @@ void FmXFormShell::LockSlotInvalidation(bool bLock)
{
// (asynchronously) invalidate everything accumulated during the locked phase
if (!m_nInvalidationEvent)
- m_nInvalidationEvent = Application::PostUserEvent(LINK(this, FmXFormShell, OnInvalidateSlots));
+ m_nInvalidationEvent = Application::PostUserEvent(LINK(this, FmXFormShell, OnInvalidateSlots_Lock));
}
}
-IMPL_LINK_NOARG(FmXFormShell, OnInvalidateSlots, void*,void)
+IMPL_LINK_NOARG(FmXFormShell, OnInvalidateSlots_Lock, void*,void)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- ::osl::MutexGuard aGuard(m_aInvalidationSafety);
m_nInvalidationEvent = nullptr;
for (std::vector<InvalidSlotInfo>::const_iterator i = m_arrInvalidSlots.begin(); i < m_arrInvalidSlots.end(); ++i)
@@ -1012,25 +1014,25 @@ IMPL_LINK_NOARG(FmXFormShell, OnInvalidateSlots, void*,void)
}
-void FmXFormShell::ForceUpdateSelection()
+void FmXFormShell::ForceUpdateSelection_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- if (IsSelectionUpdatePending())
+ if (IsSelectionUpdatePending_Lock())
{
m_aMarkTimer.Stop();
// optionally turn off the invalidation of slots which is implicitly done by SetSelection
- LockSlotInvalidation(true);
+ LockSlotInvalidation_Lock(true);
- SetSelection(m_pShell->GetFormView()->GetMarkedObjectList());
+ SetSelection_Lock(m_pShell->GetFormView()->GetMarkedObjectList());
- LockSlotInvalidation(false);
+ LockSlotInvalidation_Lock(false);
}
}
-VclBuilder* FmXFormShell::GetConversionMenu()
+VclBuilder* FmXFormShell::GetConversionMenu_Lock()
{
VclBuilder* pBuilder = new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/convertmenu.ui", "");
VclPtr<PopupMenu> pNewMenu(pBuilder->get_menu("menu"));
@@ -1063,19 +1065,19 @@ bool FmXFormShell::isControlConversionSlot(const OString& rIdent)
return false;
}
-void FmXFormShell::executeControlConversionSlot(const OString &rIdent)
+void FmXFormShell::executeControlConversionSlot_Lock(const OString &rIdent)
{
- OSL_PRECOND( canConvertCurrentSelectionToControl(rIdent), "FmXFormShell::executeControlConversionSlot: illegal call!" );
+ OSL_PRECOND( canConvertCurrentSelectionToControl_Lock(rIdent), "FmXFormShell::executeControlConversionSlot: illegal call!" );
InterfaceBag::const_iterator aSelectedElement = m_aCurrentSelection.begin();
if ( aSelectedElement == m_aCurrentSelection.end() )
return;
- executeControlConversionSlot(Reference< XFormComponent >(*aSelectedElement, UNO_QUERY), rIdent);
+ executeControlConversionSlot_Lock(Reference<XFormComponent>(*aSelectedElement, UNO_QUERY), rIdent);
}
-bool FmXFormShell::executeControlConversionSlot(const Reference< XFormComponent >& _rxObject, const OString& rIdent)
+bool FmXFormShell::executeControlConversionSlot_Lock(const Reference<XFormComponent>& _rxObject, const OString& rIdent)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return false;
OSL_ENSURE( _rxObject.is(), "FmXFormShell::executeControlConversionSlot: invalid object!" );
@@ -1088,7 +1090,7 @@ bool FmXFormShell::executeControlConversionSlot(const Reference< XFormComponent
if ( !pFormPage )
return false;
- OSL_ENSURE( isSolelySelected( _rxObject ),
+ OSL_ENSURE( isSolelySelected_Lock(_rxObject),
"FmXFormShell::executeControlConversionSlot: hmm ... shouldn't this parameter be redundant?" );
for (size_t lookupSlot = 0; lookupSlot < SAL_N_ELEMENTS(aConvertSlots); ++lookupSlot)
@@ -1205,7 +1207,7 @@ bool FmXFormShell::executeControlConversionSlot(const Reference< XFormComponent
if (aOldScripts.getLength())
{
// find the control for the model
- Reference< XControlContainer > xControlContainer( getControlContainerForView() );
+ Reference<XControlContainer> xControlContainer(getControlContainerForView_Lock());
Sequence< Reference< XControl> > aControls( xControlContainer->getControls() );
const Reference< XControl>* pControls = aControls.getConstArray();
@@ -1278,7 +1280,7 @@ bool FmXFormShell::executeControlConversionSlot(const Reference< XFormComponent
return false;
}
-bool FmXFormShell::canConvertCurrentSelectionToControl(const OString& rIdent)
+bool FmXFormShell::canConvertCurrentSelectionToControl_Lock(const OString& rIdent)
{
if ( m_aCurrentSelection.empty() )
return false;
@@ -1315,19 +1317,19 @@ bool FmXFormShell::canConvertCurrentSelectionToControl(const OString& rIdent)
return true; // all other slots: assume "yes"
}
-void FmXFormShell::checkControlConversionSlotsForCurrentSelection(Menu& rMenu)
+void FmXFormShell::checkControlConversionSlotsForCurrentSelection_Lock(Menu& rMenu)
{
for (sal_Int16 i = 0; i < rMenu.GetItemCount(); ++i)
{
// the context is already of a type that corresponds to the entry -> disable
const sal_uInt16 nId = rMenu.GetItemId(i);
- rMenu.EnableItem(nId, canConvertCurrentSelectionToControl(rMenu.GetItemIdent(nId)));
+ rMenu.EnableItem(nId, canConvertCurrentSelectionToControl_Lock(rMenu.GetItemIdent(nId)));
}
}
-void FmXFormShell::LoopGrids(LoopGridsSync nSync, LoopGridsFlags nFlags)
+void FmXFormShell::LoopGrids_Lock(LoopGridsSync nSync, LoopGridsFlags nFlags)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
Reference< XIndexContainer> xControlModels(m_xActiveForm, UNO_QUERY);
@@ -1384,9 +1386,9 @@ void FmXFormShell::LoopGrids(LoopGridsSync nSync, LoopGridsFlags nFlags)
}
-Reference< XControlContainer > FmXFormShell::getControlContainerForView()
+Reference< XControlContainer > FmXFormShell::getControlContainerForView_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return nullptr;
SdrPageView* pPageView = nullptr;
@@ -1401,9 +1403,9 @@ Reference< XControlContainer > FmXFormShell::getControlContainerForView()
}
-void FmXFormShell::ExecuteTabOrderDialog( const Reference< XTabControllerModel >& _rxForForm )
+void FmXFormShell::ExecuteTabOrderDialog_Lock(const Reference<XTabControllerModel>& _rxForForm)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
OSL_PRECOND( _rxForForm.is(), "FmXFormShell::ExecuteTabOrderDialog: invalid tabbing model!" );
@@ -1418,7 +1420,7 @@ void FmXFormShell::ExecuteTabOrderDialog( const Reference< XTabControllerModel >
Reference< dialogs::XExecutableDialog > xDialog = form::TabOrderDialog::createWithModel(
comphelper::getProcessComponentContext(),
- _rxForForm, getControlContainerForView(), xParentWindow
+ _rxForForm, getControlContainerForView_Lock(), xParentWindow
);
xDialog->execute();
@@ -1430,16 +1432,18 @@ void FmXFormShell::ExecuteTabOrderDialog( const Reference< XTabControllerModel >
}
-void FmXFormShell::ExecuteSearch()
+void FmXFormShell::ExecuteSearch_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
// a collection of all (logical) forms
FmFormArray aEmpty;
m_aSearchForms.swap( aEmpty );
::std::vector< OUString > aContextNames;
- impl_collectFormSearchContexts_nothrow( m_pShell->GetCurPage()->GetForms(), OUString(), m_aSearchForms, aContextNames );
+ impl_collectFormSearchContexts_nothrow_Lock(
+ m_pShell->GetCurPage()->GetForms(), OUString(),
+ m_aSearchForms, aContextNames);
if ( m_aSearchForms.size() != aContextNames.size() )
{
@@ -1457,7 +1461,7 @@ void FmXFormShell::ExecuteSearch()
{
FmSearchContext aTestContext;
aTestContext.nContext = static_cast< sal_Int16 >( form - m_aSearchForms.begin() );
- sal_uInt32 nValidControls = OnSearchContextRequest(aTestContext );
+ sal_uInt32 nValidControls = OnSearchContextRequest_Lock(aTestContext);
if ( nValidControls > 0 )
{
aValidForms.push_back( *form );
@@ -1477,7 +1481,7 @@ void FmXFormShell::ExecuteSearch()
// now I need another 'initial context'
sal_Int16 nInitialContext = 0;
- Reference< XForm> xActiveForm( getActiveForm());
+ Reference<XForm> xActiveForm(getActiveForm_Lock());
for ( size_t i=0; i<m_aSearchForms.size(); ++i )
{
if (m_aSearchForms.at(i) == xActiveForm)
@@ -1551,7 +1555,7 @@ void FmXFormShell::ExecuteSearch()
}
// taking care of possible GridControls that I know
- LoopGrids(LoopGridsSync::DISABLE_SYNC);
+ LoopGrids_Lock(LoopGridsSync::DISABLE_SYNC);
// Now I am ready for the dialogue.
// When the potential deadlocks caused by the use of the solar mutex in
@@ -1562,35 +1566,35 @@ void FmXFormShell::ExecuteSearch()
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<AbstractFmSearchDialog> pDialog;
if ( pFact )
- pDialog.disposeAndReset(pFact->CreateFmSearchDialog( &m_pShell->GetViewShell()->GetViewFrame()->GetWindow(), strInitialText, aContextNames, nInitialContext, LINK( this, FmXFormShell, OnSearchContextRequest ) ));
+ pDialog.disposeAndReset(pFact->CreateFmSearchDialog( &m_pShell->GetViewShell()->GetViewFrame()->GetWindow(), strInitialText, aContextNames, nInitialContext, LINK(this, FmXFormShell, OnSearchContextRequest_Lock) ));
DBG_ASSERT( pDialog, "FmXFormShell::ExecuteSearch: could not create the search dialog!" );
if ( pDialog )
{
pDialog->SetActiveField( strActiveField );
- pDialog->SetFoundHandler( LINK( this, FmXFormShell, OnFoundData ) );
- pDialog->SetCanceledNotFoundHdl( LINK( this, FmXFormShell, OnCanceledNotFound ) );
+ pDialog->SetFoundHandler(LINK(this, FmXFormShell, OnFoundData_Lock));
+ pDialog->SetCanceledNotFoundHdl(LINK(this, FmXFormShell, OnCanceledNotFound_Lock));
pDialog->Execute();
pDialog.disposeAndClear();
}
// restore GridControls again
- LoopGrids(LoopGridsSync::ENABLE_SYNC, LoopGridsFlags::DISABLE_ROCTRLR);
+ LoopGrids_Lock(LoopGridsSync::ENABLE_SYNC, LoopGridsFlags::DISABLE_ROCTRLR);
m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetSdrPageView());
// because I marked controls in OnFoundData (if I was there)
}
-bool FmXFormShell::GetY2KState(sal_uInt16& n)
+bool FmXFormShell::GetY2KState_Lock(sal_uInt16& n)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return false;
if (m_pShell->IsDesignMode())
// in the design mode (without active controls) the main document is to take care of it
return false;
- Reference< XForm> xForm( getActiveForm());
+ Reference<XForm> xForm(getActiveForm_Lock());
if (!xForm.is())
// no current form (in particular no current control) -> the main document is to take care
return false;
@@ -1620,12 +1624,12 @@ bool FmXFormShell::GetY2KState(sal_uInt16& n)
}
-void FmXFormShell::SetY2KState(sal_uInt16 n)
+void FmXFormShell::SetY2KState_Lock(sal_uInt16 n)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- Reference< XForm > xActiveForm( getActiveForm());
+ Reference<XForm> xActiveForm(getActiveForm_Lock());
Reference< XRowSet > xActiveRowSet( xActiveForm, UNO_QUERY );
if ( xActiveRowSet.is() )
{
@@ -1690,9 +1694,9 @@ void FmXFormShell::SetY2KState(sal_uInt16 n)
}
-void FmXFormShell::CloseExternalFormViewer()
+void FmXFormShell::CloseExternalFormViewer_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
if (!m_xExternalViewController.is())
@@ -1711,9 +1715,9 @@ void FmXFormShell::CloseExternalFormViewer()
}
-Reference< XResultSet> FmXFormShell::getInternalForm(const Reference< XResultSet>& _xForm) const
+Reference<XResultSet> FmXFormShell::getInternalForm_Lock(const Reference<XResultSet>& _xForm) const
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return nullptr;
Reference< runtime::XFormController> xExternalCtrlr(m_xExternalViewController, UNO_QUERY);
@@ -1726,9 +1730,9 @@ Reference< XResultSet> FmXFormShell::getInternalForm(const Reference< XResultSet
}
-Reference< XForm> FmXFormShell::getInternalForm(const Reference< XForm>& _xForm) const
+Reference<XForm> FmXFormShell::getInternalForm_Lock(const Reference<XForm>& _xForm) const
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return nullptr;
Reference< runtime::XFormController > xExternalCtrlr(m_xExternalViewController, UNO_QUERY);
@@ -1758,8 +1762,8 @@ bool FmXFormShell::IsFormSlotEnabled( sal_Int32 _nSlot, FeatureState* _pComplete
{
const svx::ControllerFeatures& rController =
lcl_isNavigationRelevant( _nSlot )
- ? getNavControllerFeatures()
- : getActiveControllerFeatures();
+ ? getNavControllerFeatures_Lock()
+ : getActiveControllerFeatures_Lock();
if ( !_pCompleteState )
return rController->isEnabled( _nSlot );
@@ -1769,12 +1773,12 @@ bool FmXFormShell::IsFormSlotEnabled( sal_Int32 _nSlot, FeatureState* _pComplete
}
-void FmXFormShell::ExecuteFormSlot( sal_Int32 _nSlot )
+void FmXFormShell::ExecuteFormSlot_Lock( sal_Int32 _nSlot )
{
const svx::ControllerFeatures& rController =
lcl_isNavigationRelevant( _nSlot )
- ? getNavControllerFeatures()
- : getActiveControllerFeatures();
+ ? getNavControllerFeatures_Lock()
+ : getActiveControllerFeatures_Lock();
rController->execute( _nSlot );
@@ -1782,7 +1786,7 @@ void FmXFormShell::ExecuteFormSlot( sal_Int32 _nSlot )
{
// if we're doing an UNDO, *and* if the affected form is the form which we also display
// as external view, then we need to reset the controls of the external form, too
- if ( getInternalForm( getActiveForm() ) == m_xExternalDisplayedForm )
+ if (getInternalForm_Lock(getActiveForm_Lock()) == m_xExternalDisplayedForm)
{
Reference< XIndexAccess > xContainer( m_xExternalDisplayedForm, UNO_QUERY );
if ( xContainer.is() )
@@ -1804,7 +1808,7 @@ void FmXFormShell::ExecuteFormSlot( sal_Int32 _nSlot )
}
-void FmXFormShell::impl_switchActiveControllerListening( const bool _bListen )
+void FmXFormShell::impl_switchActiveControllerListening_Lock(const bool _bListen)
{
Reference< XComponent> xComp( m_xActiveController, UNO_QUERY );
if ( !xComp.is() )
@@ -1817,9 +1821,9 @@ void FmXFormShell::impl_switchActiveControllerListening( const bool _bListen )
}
-void FmXFormShell::setActiveController( const Reference< runtime::XFormController >& xController, bool _bNoSaveOldContent )
+void FmXFormShell::setActiveController_Lock(const Reference<runtime::XFormController>& xController, bool _bNoSaveOldContent)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
if (m_bChangingDesignMode)
@@ -1836,12 +1840,10 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle
if (xController != m_xActiveController)
{
- ::osl::ClearableMutexGuard aGuard(m_aAsyncSafety);
// switch all nav dispatchers belonging to the form of the current nav controller to 'non active'
Reference< XResultSet> xNavigationForm;
if (m_xNavigationController.is())
xNavigationForm.set(m_xNavigationController->getModel(), UNO_QUERY);
- aGuard.clear();
m_bInActivate = true;
@@ -1852,8 +1854,8 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle
Reference< XResultSet> xNewForm;
if (xController.is())
xNewForm = Reference< XResultSet>(xController->getModel(), UNO_QUERY);
- xOldForm = getInternalForm(xOldForm);
- xNewForm = getInternalForm(xNewForm);
+ xOldForm = getInternalForm_Lock(xOldForm);
+ xNewForm = getInternalForm_Lock(xNewForm);
bool bDifferentForm = ( xOldForm.get() != xNewForm.get() );
bool bNeedSave = bDifferentForm && !_bNoSaveOldContent;
@@ -1891,23 +1893,23 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle
}
}
- stopListening();
+ stopListening_Lock();
- impl_switchActiveControllerListening( false );
+ impl_switchActiveControllerListening_Lock(false);
m_aActiveControllerFeatures.dispose();
m_xActiveController = xController;
if ( m_xActiveController.is() )
m_aActiveControllerFeatures.assign( m_xActiveController );
- impl_switchActiveControllerListening( true );
+ impl_switchActiveControllerListening_Lock(true);
if ( m_xActiveController.is() )
- m_xActiveForm = getInternalForm( Reference< XForm >( m_xActiveController->getModel(), UNO_QUERY ) );
+ m_xActiveForm = getInternalForm_Lock(Reference<XForm>(m_xActiveController->getModel(), UNO_QUERY));
else
m_xActiveForm = nullptr;
- startListening();
+ startListening_Lock();
// activate all dispatchers belonging to form of the new navigation controller
xNavigationForm = nullptr;
@@ -1919,37 +1921,37 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle
m_pShell->UIFeatureChanged();
m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell);
- InvalidateSlot(SID_FM_FILTER_NAVIGATOR_CONTROL, true);
+ InvalidateSlot_Lock(SID_FM_FILTER_NAVIGATOR_CONTROL, true);
}
}
-void FmXFormShell::getCurrentSelection( InterfaceBag& /* [out] */ _rSelection ) const
+void FmXFormShell::getCurrentSelection_Lock(InterfaceBag& /* [out] */ _rSelection) const
{
_rSelection = m_aCurrentSelection;
}
-bool FmXFormShell::setCurrentSelectionFromMark( const SdrMarkList& _rMarkList )
+bool FmXFormShell::setCurrentSelectionFromMark_Lock(const SdrMarkList& _rMarkList)
{
m_aLastKnownMarkedControls.clear();
if ( ( _rMarkList.GetMarkCount() > 0 ) && isControlList( _rMarkList ) )
collectInterfacesFromMarkList( _rMarkList, m_aLastKnownMarkedControls );
- return setCurrentSelection( m_aLastKnownMarkedControls );
+ return setCurrentSelection_Lock(m_aLastKnownMarkedControls);
}
-bool FmXFormShell::selectLastMarkedControls()
+bool FmXFormShell::selectLastMarkedControls_Lock()
{
- return setCurrentSelection( m_aLastKnownMarkedControls );
+ return setCurrentSelection_Lock(m_aLastKnownMarkedControls);
}
-bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection )
+bool FmXFormShell::setCurrentSelection_Lock( const InterfaceBag& _rSelection )
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return false;
DBG_ASSERT( m_pShell->IsDesignMode(), "FmXFormShell::setCurrentSelection: only to be used in design mode!" );
@@ -2018,39 +2020,39 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection )
}
if ( !m_aCurrentSelection.empty() )
- impl_updateCurrentForm( xNewCurrentForm );
+ impl_updateCurrentForm_Lock(xNewCurrentForm);
// ensure some slots are updated
for (sal_Int16 i : SelObjectSlotMap)
- InvalidateSlot( i, false);
+ InvalidateSlot_Lock(i, false);
return true;
}
-bool FmXFormShell::isSolelySelected( const Reference< XInterface >& _rxObject )
+bool FmXFormShell::isSolelySelected_Lock(const Reference<XInterface>& _rxObject)
{
return ( m_aCurrentSelection.size() == 1 ) && ( *m_aCurrentSelection.begin() == _rxObject );
}
-void FmXFormShell::forgetCurrentForm()
+void FmXFormShell::forgetCurrentForm_Lock()
{
if ( !m_xCurrentForm.is() )
return;
// reset ...
- impl_updateCurrentForm( nullptr );
+ impl_updateCurrentForm_Lock(nullptr);
// ... and try finding a new current form
// #i88186# / 2008-04-12 / frank.schoenheit@sun.com
- impl_defaultCurrentForm_nothrow();
+ impl_defaultCurrentForm_nothrow_Lock();
}
-void FmXFormShell::impl_updateCurrentForm( const Reference< XForm >& _rxNewCurForm )
+void FmXFormShell::impl_updateCurrentForm_Lock(const Reference<XForm>& _rxNewCurForm)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
m_xCurrentForm = _rxNewCurForm;
@@ -2062,13 +2064,13 @@ void FmXFormShell::impl_updateCurrentForm( const Reference< XForm >& _rxNewCurFo
// ensure the UI which depends on the current form is up-to-date
for (sal_Int16 i : DlgSlotMap)
- InvalidateSlot( i, false );
+ InvalidateSlot_Lock(i, false);
}
-void FmXFormShell::startListening()
+void FmXFormShell::startListening_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
Reference< XRowSet> xDatabaseForm(m_xActiveForm, UNO_QUERY);
@@ -2145,9 +2147,9 @@ void FmXFormShell::startListening()
}
-void FmXFormShell::stopListening()
+void FmXFormShell::stopListening_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
Reference< XRowSet> xDatabaseForm(m_xActiveForm, UNO_QUERY);
@@ -2168,28 +2170,28 @@ void FmXFormShell::stopListening()
}
-void FmXFormShell::ShowSelectionProperties( bool bShow )
+void FmXFormShell::ShowSelectionProperties_Lock(bool bShow)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
// if the window is already visible, only update the state
bool bHasChild = m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_SHOW_PROPERTIES );
if ( bHasChild && bShow )
- UpdateSlot( SID_FM_PROPERTY_CONTROL );
+ UpdateSlot_Lock(SID_FM_PROPERTY_CONTROL);
// else toggle state
else
m_pShell->GetViewShell()->GetViewFrame()->ToggleChildWindow(SID_FM_SHOW_PROPERTIES);
- InvalidateSlot( SID_FM_PROPERTIES, false );
- InvalidateSlot( SID_FM_CTL_PROPERTIES, false );
+ InvalidateSlot_Lock(SID_FM_PROPERTIES, false);
+ InvalidateSlot_Lock(SID_FM_CTL_PROPERTIES, false);
}
-IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation&, rfriWhere, void)
+IMPL_LINK(FmXFormShell, OnFoundData_Lock, FmFoundRecordInformation&, rfriWhere, void)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
DBG_ASSERT((rfriWhere.nContext >= 0) && (rfriWhere.nContext < (sal_Int16)m_aSearchForms.size()),
@@ -2211,7 +2213,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation&, rfriWhere, void)
OSL_FAIL("Can position on bookmark!");
}
- LoopGrids(LoopGridsSync::FORCE_SYNC);
+ LoopGrids_Lock(LoopGridsSync::FORCE_SYNC);
// and to the field (for that, I collected the XVclComponent interfaces before the start of the search)
SAL_WARN_IF(static_cast<size_t>(rfriWhere.nFieldPos) >=
@@ -2244,7 +2246,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation&, rfriWhere, void)
sal_Int32 nGridColumn = m_arrRelativeGridColumn[rfriWhere.nFieldPos];
if (nGridColumn != -1)
{ // unfortunately, I have to first get the control again
- Reference<XControl> xControl( pFormObject ? impl_getControl( xControlModel, *pFormObject ) : Reference< XControl>() );
+ Reference<XControl> xControl(pFormObject ? impl_getControl_Lock(xControlModel, *pFormObject) : Reference<XControl>());
Reference< XGrid> xGrid(xControl, UNO_QUERY);
DBG_ASSERT(xGrid.is(), "FmXFormShell::OnFoundData : invalid control!");
// if one of the asserts fires, I probably did something wrong on building of m_arrSearchedControls
@@ -2270,9 +2272,9 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation&, rfriWhere, void)
}
-IMPL_LINK(FmXFormShell, OnCanceledNotFound, FmFoundRecordInformation&, rfriWhere, void)
+IMPL_LINK(FmXFormShell, OnCanceledNotFound_Lock, FmFoundRecordInformation&, rfriWhere, void)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
DBG_ASSERT((rfriWhere.nContext >= 0) && (rfriWhere.nContext < (sal_Int16)m_aSearchForms.size()),
@@ -2299,9 +2301,9 @@ IMPL_LINK(FmXFormShell, OnCanceledNotFound, FmFoundRecordInformation&, rfriWhere
}
-IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscContextInfo, sal_uInt32)
+IMPL_LINK(FmXFormShell, OnSearchContextRequest_Lock, FmSearchContext&, rfmscContextInfo, sal_uInt32)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return 0;
DBG_ASSERT(rfmscContextInfo.nContext < (sal_Int16)m_aSearchForms.size(), "FmXFormShell::OnSearchContextRequest : invalid parameter !");
@@ -2379,7 +2381,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscContextIn
{
// the current element has no ControlSource, so it is a GridControl (that
// is the only thing that still permits the SearchableControlIteratore)
- xControl = impl_getControl( xControlModel, *pFormObject );
+ xControl = impl_getControl_Lock(xControlModel, *pFormObject);
DBG_ASSERT(xControl.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
Reference< XGridPeer> xGridPeer;
@@ -2440,7 +2442,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscContextIn
// now I need the Control to SdrObject
if (!xControl.is())
{
- xControl = impl_getControl( xControlModel, *pFormObject );
+ xControl = impl_getControl_Lock(xControlModel, *pFormObject);
DBG_ASSERT(xControl.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
}
@@ -2502,51 +2504,55 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscContextIn
// XContainerListener
-void FmXFormShell::elementInserted(const ContainerEvent& evt)
+void SAL_CALL FmXFormShell::elementInserted(const ContainerEvent& evt)
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock())
return;
// new object to listen to
Reference< XInterface> xTemp;
evt.Element >>= xTemp;
- AddElement(xTemp);
+ AddElement_Lock(xTemp);
- SolarMutexGuard g;
m_pShell->DetermineForms(true);
}
-void FmXFormShell::elementReplaced(const ContainerEvent& evt)
+void SAL_CALL FmXFormShell::elementReplaced(const ContainerEvent& evt)
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock() )
return;
Reference< XInterface> xTemp;
evt.ReplacedElement >>= xTemp;
- RemoveElement(xTemp);
+ RemoveElement_Lock(xTemp);
evt.Element >>= xTemp;
- AddElement(xTemp);
+ AddElement_Lock(xTemp);
}
-void FmXFormShell::elementRemoved(const ContainerEvent& evt)
+void SAL_CALL FmXFormShell::elementRemoved(const ContainerEvent& evt)
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock())
return;
Reference< XInterface> xTemp;
evt.Element >>= xTemp;
- RemoveElement(xTemp);
+ RemoveElement_Lock(xTemp);
- SolarMutexGuard g;
m_pShell->DetermineForms(true);
}
-void FmXFormShell::UpdateForms( bool _bInvalidate )
+void FmXFormShell::UpdateForms_Lock(bool _bInvalidate)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
Reference< XIndexAccess > xForms;
@@ -2560,9 +2566,9 @@ void FmXFormShell::UpdateForms( bool _bInvalidate )
if ( m_xForms != xForms )
{
- RemoveElement( m_xForms );
+ RemoveElement_Lock( m_xForms );
m_xForms = xForms;
- AddElement( m_xForms );
+ AddElement_Lock(m_xForms);
}
SolarMutexGuard g;
@@ -2570,9 +2576,9 @@ void FmXFormShell::UpdateForms( bool _bInvalidate )
}
-void FmXFormShell::AddElement(const Reference< XInterface>& _xElement)
+void FmXFormShell::AddElement_Lock(const Reference<XInterface>& _xElement)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
impl_AddElement_nothrow(_xElement);
}
@@ -2602,14 +2608,14 @@ void FmXFormShell::impl_AddElement_nothrow(const Reference< XInterface>& Element
}
-void FmXFormShell::RemoveElement(const Reference< XInterface>& Element)
+void FmXFormShell::RemoveElement_Lock(const Reference<XInterface>& Element)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- impl_RemoveElement_nothrow(Element);
+ impl_RemoveElement_nothrow_Lock(Element);
}
-void FmXFormShell::impl_RemoveElement_nothrow(const Reference< XInterface>& Element)
+void FmXFormShell::impl_RemoveElement_nothrow_Lock(const Reference<XInterface>& Element)
{
const Reference< css::view::XSelectionSupplier> xSelSupplier(Element, UNO_QUERY);
if (xSelSupplier.is())
@@ -2628,7 +2634,7 @@ void FmXFormShell::impl_RemoveElement_nothrow(const Reference< XInterface>& Elem
for (sal_uInt32 i = 0; i < nCount; i++)
{
xElement.set(xContainer->getByIndex(i),UNO_QUERY);
- impl_RemoveElement_nothrow(xElement);
+ impl_RemoveElement_nothrow_Lock(xElement);
}
}
@@ -2638,9 +2644,11 @@ void FmXFormShell::impl_RemoveElement_nothrow(const Reference< XInterface>& Elem
}
-void FmXFormShell::selectionChanged(const lang::EventObject& rEvent)
+void SAL_CALL FmXFormShell::selectionChanged(const lang::EventObject& rEvent)
{
- if ( impl_checkDisposed() )
+ SolarMutexGuard g;
+
+ if (impl_checkDisposed_Lock())
return;
Reference< XSelectionSupplier > xSupplier( rEvent.Source, UNO_QUERY );
@@ -2649,7 +2657,7 @@ void FmXFormShell::selectionChanged(const lang::EventObject& rEvent)
if ( !xSelObj.is() )
return;
- EnableTrackProperties(false);
+ EnableTrackProperties_Lock(false);
bool bMarkChanged = m_pShell->GetFormView()->checkUnMarkAll(rEvent.Source);
Reference< XForm > xNewForm( GetForm( rEvent.Source ) );
@@ -2657,56 +2665,56 @@ void FmXFormShell::selectionChanged(const lang::EventObject& rEvent)
InterfaceBag aNewSelection;
aNewSelection.insert( Reference<XInterface>( xSelObj, UNO_QUERY ) );
- if ( setCurrentSelection( aNewSelection ) && IsPropBrwOpen() )
- ShowSelectionProperties( true );
+ if (setCurrentSelection_Lock(aNewSelection) && IsPropBrwOpen_Lock())
+ ShowSelectionProperties_Lock(true);
- EnableTrackProperties(true);
+ EnableTrackProperties_Lock(true);
if ( bMarkChanged )
m_pShell->NotifyMarkListChanged( m_pShell->GetFormView() );
}
-IMPL_LINK_NOARG(FmXFormShell, OnTimeOut, Timer*, void)
+IMPL_LINK_NOARG(FmXFormShell, OnTimeOut_Lock, Timer*, void)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
if (m_pShell->IsDesignMode() && m_pShell->GetFormView())
- SetSelection(m_pShell->GetFormView()->GetMarkedObjectList());
+ SetSelection_Lock(m_pShell->GetFormView()->GetMarkedObjectList());
}
-void FmXFormShell::SetSelectionDelayed()
+void FmXFormShell::SetSelectionDelayed_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- if (m_pShell->IsDesignMode() && IsTrackPropertiesEnabled() && !m_aMarkTimer.IsActive())
+ if (m_pShell->IsDesignMode() && IsTrackPropertiesEnabled_Lock() && !m_aMarkTimer.IsActive())
m_aMarkTimer.Start();
}
-void FmXFormShell::SetSelection(const SdrMarkList& rMarkList)
+void FmXFormShell::SetSelection_Lock(const SdrMarkList& rMarkList)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
- DetermineSelection(rMarkList);
+ DetermineSelection_Lock(rMarkList);
m_pShell->NotifyMarkListChanged(m_pShell->GetFormView());
}
-void FmXFormShell::DetermineSelection(const SdrMarkList& rMarkList)
+void FmXFormShell::DetermineSelection_Lock(const SdrMarkList& rMarkList)
{
- if ( setCurrentSelectionFromMark( rMarkList ) && IsPropBrwOpen() )
- ShowSelectionProperties( true );
+ if (setCurrentSelectionFromMark_Lock(rMarkList) && IsPropBrwOpen_Lock())
+ ShowSelectionProperties_Lock(true);
}
-bool FmXFormShell::IsPropBrwOpen() const
+bool FmXFormShell::IsPropBrwOpen_Lock() const
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return false;
return m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame()
@@ -2725,9 +2733,9 @@ public:
:m_rShell( _rShell )
,m_bEnabled( false )
{
- if ( m_rShell.IsTrackPropertiesEnabled() )
+ if (m_rShell.IsTrackPropertiesEnabled_Lock())
{
- m_rShell.EnableTrackProperties( false );
+ m_rShell.EnableTrackProperties_Lock(false);
m_bEnabled = true;
}
}
@@ -2735,14 +2743,14 @@ public:
~SuspendPropertyTracking( )
{
if ( m_bEnabled ) // note that ( false != m_bEnabled ) implies ( NULL != m_pShell )
- m_rShell.EnableTrackProperties( true );
+ m_rShell.EnableTrackProperties_Lock(true);
}
};
-void FmXFormShell::SetDesignMode(bool bDesign)
+void FmXFormShell::SetDesignMode_Lock(bool bDesign)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
DBG_ASSERT(m_pShell->GetFormView(), "FmXFormShell::SetDesignMode : invalid call (have no shell or no view) !");
@@ -2763,7 +2771,7 @@ void FmXFormShell::SetDesignMode(bool bDesign)
{
// we are currently filtering, so stop filtering
if (m_bFilterMode)
- stopFiltering(false);
+ stopFiltering_Lock(false);
// unsubscribe from the objects of my MarkList
pFormView->GetImpl()->stopMarkListWatching();
@@ -2777,7 +2785,7 @@ void FmXFormShell::SetDesignMode(bool bDesign)
}
if (bDesign && m_xExternalViewController.is())
- CloseExternalFormViewer();
+ CloseExternalFormViewer_Lock();
pFormView->ChangeDesignMode(bDesign);
@@ -2786,7 +2794,7 @@ void FmXFormShell::SetDesignMode(bool bDesign)
m_pShell->Broadcast(aChangedHint);
m_pShell->m_bDesignMode = bDesign;
- UpdateForms( false );
+ UpdateForms_Lock(false);
m_pTextShell->designModeChanged();
@@ -2802,7 +2810,7 @@ void FmXFormShell::SetDesignMode(bool bDesign)
// synchronize with the restored mark list
if ( aList.GetMarkCount() )
- SetSelection( aList );
+ SetSelection_Lock(aList);
}
else
{
@@ -2826,15 +2834,15 @@ void FmXFormShell::SetDesignMode(bool bDesign)
}
-Reference< XControl> FmXFormShell::impl_getControl( const Reference< XControlModel >& i_rxModel, const FmFormObj& i_rKnownFormObj )
+Reference< XControl> FmXFormShell::impl_getControl_Lock(const Reference<XControlModel>& i_rxModel, const FmFormObj& i_rKnownFormObj)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return nullptr;
Reference< XControl > xControl;
try
{
- Reference< XControlContainer> xControlContainer( getControlContainerForView(), UNO_SET_THROW );
+ Reference< XControlContainer> xControlContainer(getControlContainerForView_Lock(), UNO_SET_THROW);
Sequence< Reference< XControl > > seqControls( xControlContainer->getControls() );
// ... that I can then search
@@ -2869,8 +2877,8 @@ Reference< XControl> FmXFormShell::impl_getControl( const Reference< XControlMod
return xControl;
}
-
-void FmXFormShell::impl_collectFormSearchContexts_nothrow( const Reference< XInterface>& _rxStartingPoint,
+// note: _out_rForms is a member so needs lock
+void FmXFormShell::impl_collectFormSearchContexts_nothrow_Lock( const Reference<XInterface>& _rxStartingPoint,
const OUString& _rCurrentLevelPrefix, FmFormArray& _out_rForms, ::std::vector< OUString >& _out_rNames )
{
try
@@ -2915,7 +2923,9 @@ void FmXFormShell::impl_collectFormSearchContexts_nothrow( const Reference< XInt
_out_rNames.push_back( sCompleteCurrentName.makeStringAndClear() );
// and descend
- impl_collectFormSearchContexts_nothrow( xCurrentAsForm, aNextLevelPrefix.makeStringAndClear(), _out_rForms, _out_rNames );
+ impl_collectFormSearchContexts_nothrow_Lock(
+ xCurrentAsForm, aNextLevelPrefix.makeStringAndClear(),
+ _out_rForms, _out_rNames);
}
}
catch( const Exception& )
@@ -2925,9 +2935,9 @@ void FmXFormShell::impl_collectFormSearchContexts_nothrow( const Reference< XInt
}
-void FmXFormShell::startFiltering()
+void FmXFormShell::startFiltering_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
// setting all forms in filter mode
@@ -2935,13 +2945,13 @@ void FmXFormShell::startFiltering()
// if the active controller is our external one we have to use the trigger controller
Reference< XControlContainer> xContainer;
- if (getActiveController() == m_xExternalViewController)
+ if (getActiveController_Lock() == m_xExternalViewController)
{
DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::startFiltering : inconsistent : active external controller, but no one triggered this !");
xContainer = m_xExtViewTriggerController->getContainer();
}
else
- xContainer = getActiveController()->getContainer();
+ xContainer = getActiveController_Lock()->getContainer();
PFormViewPageWindowAdapter pAdapter = pXView->findWindow( xContainer );
if ( pAdapter.is() )
@@ -3001,9 +3011,9 @@ void saveFilter(const Reference< runtime::XFormController >& _rxController)
}
-void FmXFormShell::stopFiltering(bool bSave)
+void FmXFormShell::stopFiltering_Lock(bool bSave)
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
m_bFilterMode = false;
@@ -3012,13 +3022,13 @@ void FmXFormShell::stopFiltering(bool bSave)
// if the active controller is our external one we have to use the trigger controller
Reference< XControlContainer> xContainer;
- if (getActiveController() == m_xExternalViewController)
+ if (getActiveController_Lock() == m_xExternalViewController)
{
DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::stopFiltering : inconsistent : active external controller, but no one triggered this !");
xContainer = m_xExtViewTriggerController->getContainer();
}
else
- xContainer = getActiveController()->getContainer();
+ xContainer = getActiveController_Lock()->getContainer();
PFormViewPageWindowAdapter pAdapter = pXView->findWindow(xContainer);
if ( pAdapter.is() )
@@ -3106,9 +3116,9 @@ void FmXFormShell::stopFiltering(bool bSave)
}
-void FmXFormShell::CreateExternalView()
+void FmXFormShell::CreateExternalView_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
DBG_ASSERT(m_xAttachedFrame.is(), "FmXFormShell::CreateExternalView : no frame !");
@@ -3118,7 +3128,7 @@ void FmXFormShell::CreateExternalView()
Reference< css::frame::XFrame> xExternalViewFrame;
OUString sFrameName("_beamer");
- Reference< runtime::XFormController > xCurrentNavController( getNavController());
+ Reference<runtime::XFormController> xCurrentNavController(getNavController_Lock());
// the creation of the "partwindow" may cause a deactivate of the document which will result in our nav controller to be set to NULL
// _first_ check if we have any valid fields we can use for the grid view
@@ -3182,9 +3192,9 @@ void FmXFormShell::CreateExternalView()
// if we display the active form we interpret the slot as "remove it"
Reference< XForm> xCurrentModel(xCurrentNavController->getModel(), UNO_QUERY);
- if ((xCurrentModel == m_xExternalDisplayedForm) || (getInternalForm(xCurrentModel) == m_xExternalDisplayedForm))
+ if ((xCurrentModel == m_xExternalDisplayedForm) || (getInternalForm_Lock(xCurrentModel) == m_xExternalDisplayedForm))
{
- if ( m_xExternalViewController == getActiveController() )
+ if (m_xExternalViewController == getActiveController_Lock())
{
Reference< runtime::XFormController > xAsFormController( m_xExternalViewController, UNO_QUERY );
ControllerFeatures aHelper( xAsFormController );
@@ -3192,8 +3202,8 @@ void FmXFormShell::CreateExternalView()
}
Reference< runtime::XFormController > xNewController(m_xExtViewTriggerController);
- CloseExternalFormViewer();
- setActiveController(xNewController);
+ CloseExternalFormViewer_Lock();
+ setActiveController_Lock(xNewController);
return;
}
@@ -3510,11 +3520,11 @@ void FmXFormShell::CreateExternalView()
OSL_FAIL("FmXFormShell::CreateExternalView : could not create the external form view !");
}
#endif
- InvalidateSlot( SID_FM_VIEW_AS_GRID, false );
+ InvalidateSlot_Lock(SID_FM_VIEW_AS_GRID, false);
}
-void FmXFormShell::implAdjustConfigCache()
+void FmXFormShell::implAdjustConfigCache_Lock()
{
// get (cache) the wizard usage flag
Sequence< OUString > aNames { "FormControlPilotsEnabled" };
@@ -3526,7 +3536,8 @@ void FmXFormShell::implAdjustConfigCache()
void FmXFormShell::Notify( const css::uno::Sequence< OUString >& _rPropertyNames)
{
- if ( impl_checkDisposed() )
+ DBG_TESTSOLARMUTEX();
+ if (impl_checkDisposed_Lock())
return;
const OUString* pSearch = _rPropertyNames.getConstArray();
@@ -3534,8 +3545,8 @@ void FmXFormShell::Notify( const css::uno::Sequence< OUString >& _rPropertyNames
for (;pSearch < pSearchTil; ++pSearch)
if (*pSearch == "FormControlPilotsEnabled")
{
- implAdjustConfigCache();
- InvalidateSlot( SID_FM_USE_WIZARDS, true );
+ implAdjustConfigCache_Lock();
+ InvalidateSlot_Lock(SID_FM_USE_WIZARDS, true);
}
}
@@ -3544,7 +3555,7 @@ void FmXFormShell::ImplCommit()
}
-void FmXFormShell::SetWizardUsing(bool _bUseThem)
+void FmXFormShell::SetWizardUsing_Lock(bool _bUseThem)
{
m_bUseWizards = _bUseThem;
@@ -3555,7 +3566,7 @@ void FmXFormShell::SetWizardUsing(bool _bUseThem)
}
-void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, bool _bDeactivateController /* = sal_True */ )
+void FmXFormShell::viewDeactivated_Lock(FmFormView& _rCurrentView, bool _bDeactivateController)
{
if ( _rCurrentView.GetImpl() && !_rCurrentView.IsDesignMode() )
@@ -3592,13 +3603,13 @@ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, bool _bDeactivate
{
pPage->GetImpl().SetFormsCreationHdl( Link<FmFormPageImpl&,void>() );
}
- UpdateForms( true );
+ UpdateForms_Lock(true);
}
-IMPL_LINK_NOARG( FmXFormShell, OnFirstTimeActivation, void*, void )
+IMPL_LINK_NOARG( FmXFormShell, OnFirstTimeActivation_Lock, void*, void )
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
m_nActivationEvent = nullptr;
@@ -3606,7 +3617,7 @@ IMPL_LINK_NOARG( FmXFormShell, OnFirstTimeActivation, void*, void )
if ( pDocument && !pDocument->HasName() )
{
- if ( isEnhancedForm() )
+ if (isEnhancedForm_Lock())
{
// show the data navigator
if ( !m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_SHOW_DATANAVIGATOR ) )
@@ -3616,15 +3627,14 @@ IMPL_LINK_NOARG( FmXFormShell, OnFirstTimeActivation, void*, void )
}
-IMPL_LINK_NOARG( FmXFormShell, OnFormsCreated, FmFormPageImpl&, void )
+IMPL_LINK_NOARG( FmXFormShell, OnFormsCreated_Lock, FmFormPageImpl&, void )
{
- UpdateForms( true );
+ UpdateForms_Lock(true);
}
-void FmXFormShell::viewActivated( FmFormView& _rCurrentView, bool _bSyncAction /* = sal_False */ )
+void FmXFormShell::viewActivated_Lock(FmFormView& _rCurrentView, bool _bSyncAction)
{
-
FmFormPage* pPage = _rCurrentView.GetCurPage();
// activate our view if we are activated ourself
@@ -3635,7 +3645,9 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, bool _bSyncAction /
if ( pPage )
{
if ( !pPage->GetImpl().hasEverBeenActivated() )
- loadForms( pPage, LoadFormsFlags::Load | ( _bSyncAction ? LoadFormsFlags::Sync : LoadFormsFlags::Async ) );
+ loadForms_Lock(pPage, LoadFormsFlags::Load
+ | (_bSyncAction ? LoadFormsFlags::Sync
+ : LoadFormsFlags::Async));
pPage->GetImpl().setHasBeenActivated( );
}
@@ -3653,26 +3665,26 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, bool _bSyncAction /
// set callbacks at the page
if ( pPage )
{
- pPage->GetImpl().SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) );
+ pPage->GetImpl().SetFormsCreationHdl(LINK(this, FmXFormShell, OnFormsCreated_Lock));
}
- UpdateForms( true );
+ UpdateForms_Lock(true);
if ( m_bFirstActivation )
{
- m_nActivationEvent = Application::PostUserEvent( LINK( this, FmXFormShell, OnFirstTimeActivation ) );
+ m_nActivationEvent = Application::PostUserEvent(LINK(this, FmXFormShell, OnFirstTimeActivation_Lock));
m_bFirstActivation = false;
}
// find a default "current form", if there is none, yet
// #i88186# / 2008-04-12 / frank.schoenheit@sun.com
- impl_defaultCurrentForm_nothrow();
+ impl_defaultCurrentForm_nothrow_Lock();
}
-void FmXFormShell::impl_defaultCurrentForm_nothrow()
+void FmXFormShell::impl_defaultCurrentForm_nothrow_Lock()
{
- if ( impl_checkDisposed() )
+ if (impl_checkDisposed_Lock())
return;
if ( m_xCurrentForm.is() )
@@ -3691,7 +3703,7 @@ void FmXFormShell::impl_defaultCurrentForm_nothrow()
return;
Reference< XForm > xNewCurrentForm( xForms->getByIndex(0), UNO_QUERY_THROW );
- impl_updateCurrentForm( xNewCurrentForm );
+ impl_updateCurrentForm_Lock(xNewCurrentForm);
}
catch( const Exception& )
{
@@ -3759,12 +3771,12 @@ void FmXFormShell::smartControlReset( const Reference< XIndexAccess >& _rxModels
}
-IMPL_LINK_NOARG( FmXFormShell, OnLoadForms, void*, void )
+IMPL_LINK_NOARG( FmXFormShell, OnLoadForms_Lock, void*, void )
{
FmLoadAction aAction = m_aLoadingPages.front();
m_aLoadingPages.pop();
- loadForms( aAction.pPage, aAction.nFlags & ~LoadFormsFlags::Async );
+ loadForms_Lock(aAction.pPage, aAction.nFlags & ~LoadFormsFlags::Async);
}
@@ -3806,7 +3818,7 @@ namespace
}
-void FmXFormShell::loadForms( FmFormPage* _pPage, const LoadFormsFlags _nBehaviour /* LoadFormsFlags::Load | LoadFormsFlags::Sync */ )
+void FmXFormShell::loadForms_Lock(FmFormPage* _pPage, const LoadFormsFlags _nBehaviour /* LoadFormsFlags::Load | LoadFormsFlags::Sync */)
{
DBG_ASSERT( ( _nBehaviour & ( LoadFormsFlags::Async | LoadFormsFlags::Unload ) ) != ( LoadFormsFlags::Async | LoadFormsFlags::Unload ),
"FmXFormShell::loadForms: async loading not supported - this will heavily fail!" );
@@ -3816,7 +3828,7 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const LoadFormsFlags _nBehavio
m_aLoadingPages.push( FmLoadAction(
_pPage,
_nBehaviour,
- Application::PostUserEvent( LINK( this, FmXFormShell, OnLoadForms ), _pPage )
+ Application::PostUserEvent(LINK(this, FmXFormShell, OnLoadForms_Lock), _pPage)
) );
return;
}
@@ -3882,63 +3894,68 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const LoadFormsFlags _nBehavio
}
-void FmXFormShell::ExecuteTextAttribute( SfxRequest& _rReq )
+void FmXFormShell::ExecuteTextAttribute_Lock(SfxRequest& _rReq)
{
+ DBG_TESTSOLARMUTEX();
m_pTextShell->ExecuteTextAttribute( _rReq );
}
-void FmXFormShell::GetTextAttributeState( SfxItemSet& _rSet )
+void FmXFormShell::GetTextAttributeState_Lock(SfxItemSet& _rSet)
{
+ DBG_TESTSOLARMUTEX();
m_pTextShell->GetTextAttributeState( _rSet );
}
-bool FmXFormShell::IsActiveControl( bool _bCountRichTextOnly ) const
+bool FmXFormShell::IsActiveControl_Lock(bool _bCountRichTextOnly ) const
{
+ DBG_TESTSOLARMUTEX();
return m_pTextShell->IsActiveControl( _bCountRichTextOnly );
}
-void FmXFormShell::ForgetActiveControl()
+void FmXFormShell::ForgetActiveControl_Lock()
{
+ DBG_TESTSOLARMUTEX();
m_pTextShell->ForgetActiveControl();
}
-void FmXFormShell::SetControlActivationHandler( const Link<LinkParamNone*,void>& _rHdl )
+void FmXFormShell::SetControlActivationHandler_Lock(const Link<LinkParamNone*,void>& _rHdl)
{
+ DBG_TESTSOLARMUTEX();
m_pTextShell->SetControlActivationHandler( _rHdl );
}
-void FmXFormShell::handleShowPropertiesRequest()
+void FmXFormShell::handleShowPropertiesRequest_Lock()
{
- if ( onlyControlsAreMarked() )
- ShowSelectionProperties( true );
+ if (onlyControlsAreMarked_Lock())
+ ShowSelectionProperties_Lock( true );
}
-void FmXFormShell::handleMouseButtonDown( const SdrViewEvent& _rViewEvent )
+void FmXFormShell::handleMouseButtonDown_Lock(const SdrViewEvent& _rViewEvent)
{
// catch simple double clicks
if ( ( _rViewEvent.nMouseClicks == 2 ) && ( _rViewEvent.nMouseCode == MOUSE_LEFT ) )
{
if ( _rViewEvent.eHit == SdrHitKind::MarkedObject )
{
- if ( onlyControlsAreMarked() )
- ShowSelectionProperties( true );
+ if (onlyControlsAreMarked_Lock())
+ ShowSelectionProperties_Lock( true );
}
}
}
-bool FmXFormShell::HasControlFocus() const
+bool FmXFormShell::HasControlFocus_Lock() const
{
bool bHasControlFocus = false;
try
{
- Reference< runtime::XFormController > xController( getActiveController() );
+ Reference<runtime::XFormController> xController(getActiveController_Lock());
Reference< XControl > xCurrentControl;
if ( xController.is() )
xCurrentControl.set( xController->getCurrentControl() );
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index af79ba17b2b2..012206cffe5f 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -166,7 +166,7 @@ void FmFormView::MarkListHasChanged()
//OLMRefreshAllIAOManagers();
}
- pFormShell->GetImpl()->SetSelectionDelayed();
+ pFormShell->GetImpl()->SetSelectionDelayed_Lock();
}
}
@@ -235,7 +235,7 @@ void FmFormView::ChangeDesignMode(bool bDesign)
// --- 2. simulate a deactivation (the shell will handle some things there ...?)
if ( pFormShell && pFormShell->GetImpl() )
- pFormShell->GetImpl()->viewDeactivated( *this );
+ pFormShell->GetImpl()->viewDeactivated_Lock(*this);
else
pImpl->Deactivate();
@@ -248,7 +248,7 @@ void FmFormView::ChangeDesignMode(bool bDesign)
if ( pCurPage )
{
if ( pFormShell && pFormShell->GetImpl() )
- pFormShell->GetImpl()->loadForms( pCurPage, ( bDesign ? LoadFormsFlags::Unload : LoadFormsFlags::Load ) );
+ pFormShell->GetImpl()->loadForms_Lock(pCurPage, (bDesign ? LoadFormsFlags::Unload : LoadFormsFlags::Load));
}
// --- 5. base class functionality
@@ -257,7 +257,7 @@ void FmFormView::ChangeDesignMode(bool bDesign)
// --- 6. simulate a activation (the shell will handle some things there ...?)
OSL_PRECOND( pFormShell && pFormShell->GetImpl(), "FmFormView::ChangeDesignMode: is this really allowed? No shell?" );
if ( pFormShell && pFormShell->GetImpl() )
- pFormShell->GetImpl()->viewActivated( *this );
+ pFormShell->GetImpl()->viewActivated_Lock(*this);
else
pImpl->Activate();
@@ -326,18 +326,18 @@ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
else if ( pFormShell && pFormShell->IsDesignMode() )
{
FmXFormShell* pFormShellImpl = pFormShell->GetImpl();
- pFormShellImpl->UpdateForms( true );
+ pFormShellImpl->UpdateForms_Lock(true);
// so that the form navigator can react to the pagechange
pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_FMEXPLORER_CONTROL, true);
- pFormShellImpl->SetSelection(GetMarkedObjectList());
+ pFormShellImpl->SetSelection_Lock(GetMarkedObjectList());
}
}
// notify our shell that we have been activated
if ( pFormShell && pFormShell->GetImpl() )
- pFormShell->GetImpl()->viewActivated( *this );
+ pFormShell->GetImpl()->viewActivated_Lock(*this);
else
pImpl->Activate();
@@ -353,7 +353,7 @@ void FmFormView::HideSdrPage()
// --- 2. tell the shell the view is (going to be) deactivated
if ( pFormShell && pFormShell->GetImpl() )
- pFormShell->GetImpl()->viewDeactivated( *this );
+ pFormShell->GetImpl()->viewDeactivated_Lock(*this);
else
pImpl->Deactivate();
@@ -506,7 +506,7 @@ bool FmFormView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
&& rKeyCode.IsMod2()
)
{
- pFormShell->GetImpl()->handleShowPropertiesRequest();
+ pFormShell->GetImpl()->handleShowPropertiesRequest_Lock();
}
}
@@ -535,7 +535,7 @@ bool FmFormView::MouseButtonDown( const MouseEvent& _rMEvt, vcl::Window* _pWin )
{
SdrViewEvent aViewEvent;
PickAnything( _rMEvt, SdrMouseEventKind::BUTTONDOWN, aViewEvent );
- pFormShell->GetImpl()->handleMouseButtonDown( aViewEvent );
+ pFormShell->GetImpl()->handleMouseButtonDown_Lock(aViewEvent);
}
return bReturn;
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 5ec7438bfb25..b7d6d5750271 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -725,7 +725,7 @@ IMPL_LINK_NOARG(FmXFormView, OnActivate, void*, void)
if(!pShImpl)
return;
- find_active_databaseform fad(pShImpl->getActiveController());
+ find_active_databaseform fad(pShImpl->getActiveController_Lock());
vcl::Window* pWindow = const_cast<vcl::Window*>(static_cast<const vcl::Window*>(m_pView->GetActualOutDev()));
PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? nullptr : m_aPageWindowAdapters[0];
@@ -764,7 +764,7 @@ IMPL_LINK_NOARG(FmXFormView, OnActivate, void*, void)
xControllerToActivate = xController;
}
- pShImpl->setActiveController( xControllerToActivate );
+ pShImpl->setActiveController_Lock(xControllerToActivate);
}
}
}
@@ -797,7 +797,7 @@ void FmXFormView::Deactivate(bool bDeactivateController)
FmXFormShell* pShImpl = m_pView->GetFormShell() ? m_pView->GetFormShell()->GetImpl() : nullptr;
if (pShImpl && bDeactivateController)
- pShImpl->setActiveController( nullptr );
+ pShImpl->setActiveController_Lock(nullptr);
}
@@ -1018,7 +1018,7 @@ void FmXFormView::onCreatedFormObject( FmFormObj const & _rFormObject )
return;
// it is valid that the form shell's forms collection is not initialized, yet
- pShellImpl->UpdateForms( true );
+ pShellImpl->UpdateForms_Lock(true);
m_xLastCreatedControlModel.set( _rFormObject.GetUnoControlModel(), UNO_QUERY );
if ( !m_xLastCreatedControlModel.is() )
@@ -1026,13 +1026,13 @@ void FmXFormView::onCreatedFormObject( FmFormObj const & _rFormObject )
// some initial property defaults
FormControlFactory aControlFactory;
- aControlFactory.initializeControlModel( pShellImpl->getDocumentType(), _rFormObject );
+ aControlFactory.initializeControlModel(pShellImpl->getDocumentType_Lock(), _rFormObject);
- if ( !pShellImpl->GetWizardUsing() )
+ if (!pShellImpl->GetWizardUsing_Lock())
return;
// #i31958# don't call wizards in XForms mode
- if ( pShellImpl->isEnhancedForm() )
+ if (pShellImpl->isEnhancedForm_Lock())
return;
// #i46898# no wizards if there is no Base installed - currently, all wizards are
@@ -1916,7 +1916,7 @@ void SAL_CALL FmXFormView::focusLost( const FocusEvent& /*e*/ )
DocumentType FmXFormView::impl_getDocumentType() const
{
if ( GetFormShell() && GetFormShell()->GetImpl() )
- return GetFormShell()->GetImpl()->getDocumentType();
+ return GetFormShell()->GetImpl()->getDocumentType_Lock();
return eUnknownDocumentType;
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 3a25f3d57f2a..2131a14c4e05 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -390,11 +390,11 @@ namespace svxform
const sal_uInt16 nBrowserId = aContextMenu->GetItemId("props");
// in XML forms, we don't allow for the properties of a form
// #i36484#
- if ( pFormShell->GetImpl()->isEnhancedForm() && !m_nControlsSelected )
+ if (pFormShell->GetImpl()->isEnhancedForm_Lock() && !m_nControlsSelected)
aContextMenu->RemoveItem(aContextMenu->GetItemPos(nBrowserId));
// if the property browser is already open, we don't allow for the properties, too
- if( pFormShell->GetImpl()->IsPropBrwOpen() )
+ if (pFormShell->GetImpl()->IsPropBrwOpen_Lock())
aContextMenu->RemoveItem(aContextMenu->GetItemPos(nBrowserId));
// and finally, if there's a mixed selection of forms and controls, disable the entry, too
else
@@ -416,16 +416,16 @@ namespace svxform
const sal_Int16 nChangeId = aContextMenu->GetItemId("change");
if (!m_bRootSelected && !m_nFormsSelected && (m_nControlsSelected == 1))
{
- xBuilder.reset(FmXFormShell::GetConversionMenu());
+ xBuilder.reset(FmXFormShell::GetConversionMenu_Lock());
xConversionMenu = xBuilder->get_menu("menu");
aContextMenu->SetPopupMenu(nChangeId, xConversionMenu);
#if OSL_DEBUG_LEVEL > 0
FmControlData* pCurrent = static_cast<FmControlData*>((*m_arrCurrentSelection.begin())->GetUserData());
- OSL_ENSURE( pFormShell->GetImpl()->isSolelySelected( pCurrent->GetFormComponent() ),
+ OSL_ENSURE( pFormShell->GetImpl()->isSolelySelected_Lock( pCurrent->GetFormComponent() ),
"NavigatorTree::Command: inconsistency between the navigator selection, and the selection as the shell knows it!" );
#endif
- pFormShell->GetImpl()->checkControlConversionSlotsForCurrentSelection(*aContextMenu->GetPopupMenu(nChangeId));
+ pFormShell->GetImpl()->checkControlConversionSlotsForCurrentSelection_Lock(*aContextMenu->GetPopupMenu(nChangeId));
}
else
aContextMenu->EnableItem(nChangeId, false );
@@ -488,7 +488,7 @@ namespace svxform
Reference< XTabControllerModel > xTabController(xForm, UNO_QUERY);
if( !xTabController.is() )
break;
- GetNavModel()->GetFormShell()->GetImpl()->ExecuteTabOrderDialog( xTabController );
+ GetNavModel()->GetFormShell()->GetImpl()->ExecuteTabOrderDialog_Lock(xTabController);
}
else if (sIdent == "props")
ShowSelectionProperties(true);
@@ -510,7 +510,7 @@ namespace svxform
else if (FmXFormShell::isControlConversionSlot(sIdent))
{
FmControlData* pCurrent = static_cast<FmControlData*>((*m_arrCurrentSelection.begin())->GetUserData());
- if (pFormShell->GetImpl()->executeControlConversionSlot(pCurrent->GetFormComponent(), sIdent))
+ if (pFormShell->GetImpl()->executeControlConversionSlot_Lock(pCurrent->GetFormComponent(), sIdent))
ShowSelectionProperties();
}
}
@@ -1154,7 +1154,7 @@ namespace svxform
// in addition, with the move of controls such things as "the current form" may have changed - force the shell
// to update itself accordingly
if( pFormShell && pFormShell->GetImpl() && pFormShell->GetFormView() )
- pFormShell->GetImpl()->DetermineSelection( pFormShell->GetFormView()->GetMarkedObjectList() );
+ pFormShell->GetImpl()->DetermineSelection_Lock( pFormShell->GetFormView()->GetMarkedObjectList() );
if ( m_aControlExchange.isClipboardOwner() && ( DND_ACTION_MOVE == _nAction ) )
m_aControlExchange->clear();
@@ -1352,7 +1352,7 @@ namespace svxform
{
InterfaceBag aSelection;
aSelection.insert( Reference<XInterface>( xNewForm, UNO_QUERY ) );
- pFormShell->GetImpl()->setCurrentSelection( aSelection );
+ pFormShell->GetImpl()->setCurrentSelection_Lock(aSelection);
pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_PROPERTIES, true, true);
}
@@ -1629,11 +1629,11 @@ namespace svxform
// and now my form and my SelObject
if ( bSetSelectionAsMarkList )
- pFormShell->GetImpl()->setCurrentSelectionFromMark( pFormShell->GetFormView()->GetMarkedObjectList() );
+ pFormShell->GetImpl()->setCurrentSelectionFromMark_Lock(pFormShell->GetFormView()->GetMarkedObjectList());
else
- pFormShell->GetImpl()->setCurrentSelection( aSelection );
+ pFormShell->GetImpl()->setCurrentSelection_Lock(aSelection);
- if ( pFormShell->GetImpl()->IsPropBrwOpen() || bForce )
+ if (pFormShell->GetImpl()->IsPropBrwOpen_Lock() || bForce)
{
// and now deliver all to the PropertyBrowser
pFormShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON );
@@ -1685,7 +1685,7 @@ namespace svxform
// form). The other way round, the EntryDatas would be invalid, if I'd first delete the controls and
// then go on to the structure. This means I have to delete the forms *after* the normal controls, so
// that during UNDO, they're restored in the proper order.
- pFormShell->GetImpl()->EnableTrackProperties(false);
+ pFormShell->GetImpl()->EnableTrackProperties_Lock(false);
for (SvLBoxEntrySortedArray::reverse_iterator it = m_arrCurrentSelection.rbegin();
it != m_arrCurrentSelection.rend(); )
{
@@ -1725,7 +1725,7 @@ namespace svxform
else
++it;
}
- pFormShell->GetImpl()->EnableTrackProperties(true);
+ pFormShell->GetImpl()->EnableTrackProperties_Lock(true);
// let the view delete the marked controls
pFormShell->GetFormView()->DeleteMarked();
@@ -1772,8 +1772,8 @@ namespace svxform
if (dynamic_cast<const FmFormData*>( pCurrent) != nullptr)
{
Reference< XForm > xCurrentForm( static_cast< FmFormData* >( pCurrent )->GetFormIface() );
- if ( pFormShell->GetImpl()->getCurrentForm() == xCurrentForm ) // shell knows form to be deleted ?
- pFormShell->GetImpl()->forgetCurrentForm(); // -> take away ...
+ if (pFormShell->GetImpl()->getCurrentForm_Lock() == xCurrentForm) // shell knows form to be deleted ?
+ pFormShell->GetImpl()->forgetCurrentForm_Lock(); // -> take away ...
}
GetNavModel()->Remove(pCurrent, true);
}
@@ -1941,7 +1941,7 @@ namespace svxform
CollectSelectionData(SDI_NORMALIZED_FORMARK);
// the view shouldn't notify now if MarkList changed
- pFormShell->GetImpl()->EnableTrackProperties(false);
+ pFormShell->GetImpl()->EnableTrackProperties_Lock(false);
UnmarkAllViewObj();
@@ -1981,7 +1981,7 @@ namespace svxform
ShowSelectionProperties();
// reset flag at view
- pFormShell->GetImpl()->EnableTrackProperties(true);
+ pFormShell->GetImpl()->EnableTrackProperties_Lock(true);
// if exactly one form is selected now, shell should notice it as CurrentForm
// (if selection handling isn't locked, view cares about it in MarkListHasChanged
@@ -1994,7 +1994,7 @@ namespace svxform
{
InterfaceBag aSelection;
aSelection.insert( Reference< XInterface >( pSingleSelectionData->GetFormIface(), UNO_QUERY ) );
- pFormShell->GetImpl()->setCurrentSelection( aSelection );
+ pFormShell->GetImpl()->setCurrentSelection_Lock(aSelection);
}
}
}
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 3708f9322e34..cf0f494b0af1 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -422,7 +422,7 @@ namespace svxform
// If root has no more form, reset CurForm at shell
if ( !GetRootList()->size() )
- m_pFormShell->GetImpl()->forgetCurrentForm();
+ m_pFormShell->GetImpl()->forgetCurrentForm_Lock();
}
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 26e6c0ce790c..7bbdf77adb2e 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -287,7 +287,7 @@ void FmFieldWin::UpdateContent(FmFormShell const * pShell)
if (!pShell || !pShell->GetImpl())
return;
- Reference< XForm > xForm = pShell->GetImpl()->getCurrentForm();
+ Reference<XForm> const xForm = pShell->GetImpl()->getCurrentForm_Lock();
if ( xForm.is() )
UpdateContent( xForm );
}
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 9a08becee8ff..37aa7c74b46f 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -176,11 +176,6 @@ class SVX_DLLPUBLIC FmXFormShell : public FmXFormShell_BASE
// we explicitly switch off the propbrw before leaving the design mode
// this flag tells us if we have to switch it on again when reentering
- ::osl::Mutex m_aAsyncSafety;
- // secure the access to our thread related members
- ::osl::Mutex m_aInvalidationSafety;
- // secure the access to all our slot invalidation related members
-
css::form::NavigationBarMode m_eNavigate; // kind of navigation
// since I want to mark an SdrObject when searching for the treatment of the "found",
@@ -252,14 +247,14 @@ class SVX_DLLPUBLIC FmXFormShell : public FmXFormShell_BASE
public:
// attribute access
SAL_DLLPRIVATE const css::uno::Reference< css::frame::XFrame >&
- getHostFrame() const { return m_xAttachedFrame; }
+ getHostFrame_Lock() const { return m_xAttachedFrame; }
SAL_DLLPRIVATE const css::uno::Reference< css::sdbc::XResultSet >&
- getExternallyDisplayedForm() const { return m_xExternalDisplayedForm; }
+ getExternallyDisplayedForm_Lock() const { return m_xExternalDisplayedForm; }
SAL_DLLPRIVATE bool
- didPrepareClose() const { return m_bPreparedClose; }
+ didPrepareClose_Lock() const { return m_bPreparedClose; }
SAL_DLLPRIVATE void
- didPrepareClose( bool _bDid ) { m_bPreparedClose = _bDid; }
+ didPrepareClose_Lock(bool bDid) { m_bPreparedClose = bDid; }
public:
SAL_DLLPRIVATE FmXFormShell(FmFormShell& _rShell, SfxViewFrame* _pViewFrame);
@@ -289,53 +284,53 @@ protected:
SAL_DLLPRIVATE virtual void SAL_CALL disposing() override;
public:
- SAL_DLLPRIVATE void EnableTrackProperties( bool bEnable) { m_bTrackProperties = bEnable; }
- SAL_DLLPRIVATE bool IsTrackPropertiesEnabled() {return m_bTrackProperties;}
+ SAL_DLLPRIVATE void EnableTrackProperties_Lock(bool bEnable) { m_bTrackProperties = bEnable; }
+ SAL_DLLPRIVATE bool IsTrackPropertiesEnabled_Lock() { return m_bTrackProperties; }
// activation handling
- SAL_DLLPRIVATE void viewActivated( FmFormView& _rCurrentView, bool _bSyncAction = false );
- SAL_DLLPRIVATE void viewDeactivated( FmFormView& _rCurrentView, bool _bDeactivateController = true );
+ SAL_DLLPRIVATE void viewActivated_Lock(FmFormView& _rCurrentView, bool _bSyncAction = false);
+ SAL_DLLPRIVATE void viewDeactivated_Lock(FmFormView& _rCurrentView, bool _bDeactivateController = true);
// IControllerFeatureInvalidation
- SAL_DLLPRIVATE virtual void invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatures ) override;
+ SAL_DLLPRIVATE virtual void invalidateFeatures/*_NoLock*/( const ::std::vector< sal_Int32 >& _rFeatures ) override;
- SAL_DLLPRIVATE void ExecuteTabOrderDialog( // execute SID_FM_TAB_DIALOG
+ SAL_DLLPRIVATE void ExecuteTabOrderDialog_Lock( // execute SID_FM_TAB_DIALOG
const css::uno::Reference< css::awt::XTabControllerModel >& _rxForForm
);
// stuff
- SAL_DLLPRIVATE void AddElement(const css::uno::Reference< css::uno::XInterface>& Element);
- SAL_DLLPRIVATE void RemoveElement(const css::uno::Reference< css::uno::XInterface>& Element);
+ SAL_DLLPRIVATE void AddElement_Lock(const css::uno::Reference< css::uno::XInterface>& Element);
+ SAL_DLLPRIVATE void RemoveElement_Lock(const css::uno::Reference< css::uno::XInterface>& Element);
/** updates m_xForms, to be either <NULL/>, if we're in alive mode, or our current page's forms collection,
if in design mode
*/
- SAL_DLLPRIVATE void UpdateForms( bool _bInvalidate );
+ SAL_DLLPRIVATE void UpdateForms_Lock(bool bInvalidate);
- SAL_DLLPRIVATE void ExecuteSearch(); // execute SID_FM_SEARCH
- SAL_DLLPRIVATE void CreateExternalView(); // execute SID_FM_VIEW_AS_GRID
+ SAL_DLLPRIVATE void ExecuteSearch_Lock(); // execute SID_FM_SEARCH
+ SAL_DLLPRIVATE void CreateExternalView_Lock(); // execute SID_FM_VIEW_AS_GRID
- SAL_DLLPRIVATE bool GetY2KState(sal_uInt16& n);
- SAL_DLLPRIVATE void SetY2KState(sal_uInt16 n);
+ SAL_DLLPRIVATE bool GetY2KState_Lock(sal_uInt16 & n);
+ SAL_DLLPRIVATE void SetY2KState_Lock(sal_uInt16 n);
protected:
// form handling
/// load or unload the forms on a page
- SAL_DLLPRIVATE void loadForms( FmFormPage* _pPage, const LoadFormsFlags _nBehaviour );
- SAL_DLLPRIVATE void smartControlReset( const css::uno::Reference< css::container::XIndexAccess >& _rxModels );
+ SAL_DLLPRIVATE void loadForms_Lock( FmFormPage* _pPage, const LoadFormsFlags _nBehaviour );
+ SAL_DLLPRIVATE void smartControlReset( const css::uno::Reference< css::container::XIndexAccess >& _rxModels );
- SAL_DLLPRIVATE void startListening();
- SAL_DLLPRIVATE void stopListening();
+ SAL_DLLPRIVATE void startListening_Lock();
+ SAL_DLLPRIVATE void stopListening_Lock();
SAL_DLLPRIVATE css::uno::Reference< css::awt::XControl >
- impl_getControl(
+ impl_getControl_Lock(
const css::uno::Reference< css::awt::XControlModel>& i_rxModel,
const FmFormObj& i_rKnownFormObj
);
// collects in strNames the names of all forms
- SAL_DLLPRIVATE static void impl_collectFormSearchContexts_nothrow(
+ SAL_DLLPRIVATE static void impl_collectFormSearchContexts_nothrow_Lock(
const css::uno::Reference< css::uno::XInterface>& _rxStartingPoint,
const OUString& _rCurrentLevelPrefix,
FmFormArray& _out_rForms,
@@ -344,163 +339,162 @@ protected:
/** checks whenever the instance is already disposed, if so, this is reported as assertion error (debug
builds only) and <TRUE/> is returned.
*/
- SAL_DLLPRIVATE bool impl_checkDisposed() const;
+ SAL_DLLPRIVATE bool impl_checkDisposed_Lock() const;
public:
// method for non design mode (alive mode)
- SAL_DLLPRIVATE void setActiveController( const css::uno::Reference< css::form::runtime::XFormController>& _xController, bool _bNoSaveOldContent = false );
- SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getActiveController() const {return m_xActiveController;}
- SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getActiveInternalController() const { return m_xActiveController == m_xExternalViewController ? m_xExtViewTriggerController : m_xActiveController; }
- SAL_DLLPRIVATE const css::uno::Reference< css::form::XForm>& getActiveForm() const {return m_xActiveForm;}
- SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getNavController() const {return m_xNavigationController;}
+ SAL_DLLPRIVATE void setActiveController_Lock(const css::uno::Reference< css::form::runtime::XFormController>& _xController, bool _bNoSaveOldContent = false);
+ SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getActiveController_Lock() const { return m_xActiveController; }
+ SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getActiveInternalController_Lock() const { return m_xActiveController == m_xExternalViewController ? m_xExtViewTriggerController : m_xActiveController; }
+ SAL_DLLPRIVATE const css::uno::Reference< css::form::XForm>& getActiveForm_Lock() const { return m_xActiveForm; }
+ SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getNavController_Lock() const { return m_xNavigationController; }
- SAL_DLLPRIVATE const svx::ControllerFeatures& getActiveControllerFeatures() const
+ SAL_DLLPRIVATE const svx::ControllerFeatures& getActiveControllerFeatures_Lock() const
{ return m_aActiveControllerFeatures; }
- SAL_DLLPRIVATE const svx::ControllerFeatures& getNavControllerFeatures() const
+ SAL_DLLPRIVATE const svx::ControllerFeatures& getNavControllerFeatures_Lock() const
{ return m_aNavControllerFeatures.isAssigned() ? m_aNavControllerFeatures : m_aActiveControllerFeatures; }
/** announces a new "current selection"
@return
<TRUE/> if and only if the to-bet-set selection was different from the previous selection
*/
- SAL_DLLPRIVATE bool setCurrentSelection( const InterfaceBag& _rSelection );
+ SAL_DLLPRIVATE bool setCurrentSelection_Lock(const InterfaceBag& rSelection);
/** sets the new selection to the last known marked controls
*/
- SAL_DLLPRIVATE bool selectLastMarkedControls();
+ SAL_DLLPRIVATE bool selectLastMarkedControls_Lock();
/** retrieves the current selection
*/
- void getCurrentSelection( InterfaceBag& /* [out] */ _rSelection ) const;
+ void getCurrentSelection_Lock(InterfaceBag& /* [out] */ _rSelection) const;
/** sets a new current selection as indicated by a mark list
@return
<TRUE/> if and only if the to-bet-set selection was different from the previous selection
*/
- SAL_DLLPRIVATE bool setCurrentSelectionFromMark(const SdrMarkList& rMarkList);
+ SAL_DLLPRIVATE bool setCurrentSelectionFromMark_Lock(const SdrMarkList& rMarkList);
/// returns the currently selected form, or the form which all currently selected controls belong to, or <NULL/>
SAL_DLLPRIVATE const css::uno::Reference< css::form::XForm >&
- getCurrentForm() const { return m_xCurrentForm; }
- SAL_DLLPRIVATE void forgetCurrentForm();
+ getCurrentForm_Lock() const { return m_xCurrentForm; }
+ SAL_DLLPRIVATE void forgetCurrentForm_Lock();
/// returns whether the last known marking contained only controls
- SAL_DLLPRIVATE bool onlyControlsAreMarked() const { return !m_aLastKnownMarkedControls.empty(); }
+ SAL_DLLPRIVATE bool onlyControlsAreMarked_Lock() const { return !m_aLastKnownMarkedControls.empty(); }
/// determines whether the current selection consists of exactly the given object
- SAL_DLLPRIVATE bool isSolelySelected(
+ SAL_DLLPRIVATE bool isSolelySelected_Lock(
const css::uno::Reference< css::uno::XInterface >& _rxObject
);
/// handles a MouseButtonDown event of the FmFormView
- SAL_DLLPRIVATE void handleMouseButtonDown( const SdrViewEvent& _rViewEvent );
+ SAL_DLLPRIVATE void handleMouseButtonDown_Lock( const SdrViewEvent& _rViewEvent );
/// handles the request for showing the "Properties"
- SAL_DLLPRIVATE void handleShowPropertiesRequest();
+ SAL_DLLPRIVATE void handleShowPropertiesRequest_Lock();
- SAL_DLLPRIVATE bool hasForms() const {return m_xForms.is() && m_xForms->getCount() != 0;}
- SAL_DLLPRIVATE bool hasDatabaseBar() const {return m_bDatabaseBar;}
+ SAL_DLLPRIVATE bool hasForms_Lock() const { return m_xForms.is() && m_xForms->getCount() != 0; }
+ SAL_DLLPRIVATE bool hasDatabaseBar_Lock() const { return m_bDatabaseBar; }
- SAL_DLLPRIVATE void ShowSelectionProperties( bool bShow );
- SAL_DLLPRIVATE bool IsPropBrwOpen() const;
+ SAL_DLLPRIVATE void ShowSelectionProperties_Lock(bool bShow);
+ SAL_DLLPRIVATE bool IsPropBrwOpen_Lock() const;
- SAL_DLLPRIVATE void DetermineSelection(const SdrMarkList& rMarkList);
- SAL_DLLPRIVATE void SetSelection(const SdrMarkList& rMarkList);
- SAL_DLLPRIVATE void SetSelectionDelayed();
+ SAL_DLLPRIVATE void DetermineSelection_Lock(const SdrMarkList& rMarkList);
+ SAL_DLLPRIVATE void SetSelection_Lock(const SdrMarkList& rMarkList);
+ SAL_DLLPRIVATE void SetSelectionDelayed_Lock();
- SAL_DLLPRIVATE void SetDesignMode(bool bDesign);
+ SAL_DLLPRIVATE void SetDesignMode_Lock(bool bDesign);
- SAL_DLLPRIVATE bool GetWizardUsing() const { return m_bUseWizards; }
- SAL_DLLPRIVATE void SetWizardUsing(bool _bUseThem);
+ SAL_DLLPRIVATE bool GetWizardUsing_Lock() const { return m_bUseWizards; }
+ SAL_DLLPRIVATE void SetWizardUsing_Lock(bool _bUseThem);
// setting the filter mode
- SAL_DLLPRIVATE bool isInFilterMode() const {return m_bFilterMode;}
- SAL_DLLPRIVATE void startFiltering();
- SAL_DLLPRIVATE void stopFiltering(bool bSave);
+ SAL_DLLPRIVATE bool isInFilterMode_Lock() const { return m_bFilterMode; }
+ SAL_DLLPRIVATE void startFiltering_Lock();
+ SAL_DLLPRIVATE void stopFiltering_Lock(bool bSave);
// a menu that contains all ControlConversion entries
- SAL_DLLPRIVATE static VclBuilder* GetConversionMenu();
+ SAL_DLLPRIVATE static VclBuilder* GetConversionMenu_Lock();
/// checks whether a given control conversion slot can be applied to the current selection
- SAL_DLLPRIVATE bool canConvertCurrentSelectionToControl(const OString& rIdent);
+ SAL_DLLPRIVATE bool canConvertCurrentSelectionToControl_Lock(const OString& rIdent);
/// enables or disables all conversion slots in a menu, according to the current selection
- SAL_DLLPRIVATE void checkControlConversionSlotsForCurrentSelection( Menu& rMenu );
+ SAL_DLLPRIVATE void checkControlConversionSlotsForCurrentSelection_Lock(Menu& rMenu);
/// executes a control conversion slot for a given object
- SAL_DLLPRIVATE bool executeControlConversionSlot(const css::uno::Reference< css::form::XFormComponent >& _rxObject, const OString& rIdent);
+ SAL_DLLPRIVATE bool executeControlConversionSlot_Lock(const css::uno::Reference< css::form::XFormComponent >& _rxObject, const OString& rIdent);
/** executes a control conversion slot for the current selection
@precond canConvertCurrentSelectionToControl( <arg>_nSlotId</arg> ) must return <TRUE/>
*/
- SAL_DLLPRIVATE void executeControlConversionSlot(const OString& rIdent);
+ SAL_DLLPRIVATE void executeControlConversionSlot_Lock(const OString& rIdent);
/// checks whether the given slot id denotes a control conversion slot
SAL_DLLPRIVATE static bool isControlConversionSlot(const OString& rIdent);
- SAL_DLLPRIVATE void ExecuteTextAttribute( SfxRequest& _rReq );
- SAL_DLLPRIVATE void GetTextAttributeState( SfxItemSet& _rSet );
- SAL_DLLPRIVATE bool IsActiveControl( bool _bCountRichTextOnly ) const;
- SAL_DLLPRIVATE void ForgetActiveControl();
- SAL_DLLPRIVATE void SetControlActivationHandler( const Link<LinkParamNone*,void>& _rHdl );
+ SAL_DLLPRIVATE void ExecuteTextAttribute_Lock(SfxRequest& _rReq);
+ SAL_DLLPRIVATE void GetTextAttributeState_Lock(SfxItemSet& _rSet);
+ SAL_DLLPRIVATE bool IsActiveControl_Lock(bool _bCountRichTextOnly) const;
+ SAL_DLLPRIVATE void ForgetActiveControl_Lock();
+ SAL_DLLPRIVATE void SetControlActivationHandler_Lock(const Link<LinkParamNone*,void>& _rHdl);
/// classifies our host document
- SAL_DLLPRIVATE ::svxform::DocumentType
- getDocumentType() const;
- SAL_DLLPRIVATE bool isEnhancedForm() const;
+ SAL_DLLPRIVATE ::svxform::DocumentType getDocumentType_Lock() const;
+ SAL_DLLPRIVATE bool isEnhancedForm_Lock() const;
/// determines whether our host document is currently read-only
- SAL_DLLPRIVATE bool IsReadonlyDoc() const;
+ SAL_DLLPRIVATE bool IsReadonlyDoc_Lock() const;
// Setting the curObject/selObject/curForm is delayed (SetSelectionDelayed). With the
// following functions this can be inquired/enforced.
- SAL_DLLPRIVATE inline bool IsSelectionUpdatePending();
- SAL_DLLPRIVATE void ForceUpdateSelection();
+ SAL_DLLPRIVATE inline bool IsSelectionUpdatePending_Lock();
+ SAL_DLLPRIVATE void ForceUpdateSelection_Lock();
- SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel> getContextDocument() const;
- SAL_DLLPRIVATE css::uno::Reference< css::form::XForm> getInternalForm(const css::uno::Reference< css::form::XForm>& _xForm) const;
- SAL_DLLPRIVATE css::uno::Reference< css::sdbc::XResultSet> getInternalForm(const css::uno::Reference< css::sdbc::XResultSet>& _xForm) const;
+ SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel> getContextDocument_Lock() const;
+ SAL_DLLPRIVATE css::uno::Reference< css::form::XForm> getInternalForm_Lock(const css::uno::Reference< css::form::XForm>& _xForm) const;
+ SAL_DLLPRIVATE css::uno::Reference< css::sdbc::XResultSet> getInternalForm_Lock(const css::uno::Reference< css::sdbc::XResultSet>& _xForm) const;
// if the form belongs to the controller (extern) displaying a grid, the according internal form will
// be displayed, _xForm else
// check if the current control of the active controller has the focus
- SAL_DLLPRIVATE bool HasControlFocus() const;
+ SAL_DLLPRIVATE bool HasControlFocus_Lock() const;
private:
- DECL_DLLPRIVATE_LINK(OnFoundData, FmFoundRecordInformation&, void);
- DECL_DLLPRIVATE_LINK(OnCanceledNotFound, FmFoundRecordInformation&, void);
- DECL_DLLPRIVATE_LINK(OnSearchContextRequest, FmSearchContext&, sal_uInt32);
- DECL_DLLPRIVATE_LINK(OnTimeOut, Timer*, void);
- DECL_DLLPRIVATE_LINK(OnFirstTimeActivation, void*, void);
- DECL_DLLPRIVATE_LINK(OnFormsCreated, FmFormPageImpl&, void);
+ DECL_DLLPRIVATE_LINK(OnFoundData_Lock, FmFoundRecordInformation&, void);
+ DECL_DLLPRIVATE_LINK(OnCanceledNotFound_Lock, FmFoundRecordInformation&, void);
+ DECL_DLLPRIVATE_LINK(OnSearchContextRequest_Lock, FmSearchContext&, sal_uInt32);
+ DECL_DLLPRIVATE_LINK(OnTimeOut_Lock, Timer*, void);
+ DECL_DLLPRIVATE_LINK(OnFirstTimeActivation_Lock, void*, void);
+ DECL_DLLPRIVATE_LINK(OnFormsCreated_Lock, FmFormPageImpl&, void);
- SAL_DLLPRIVATE void LoopGrids(LoopGridsSync nSync, LoopGridsFlags nWhat = LoopGridsFlags::NONE);
+ SAL_DLLPRIVATE void LoopGrids_Lock(LoopGridsSync nSync, LoopGridsFlags nWhat = LoopGridsFlags::NONE);
// invalidation of slots
- SAL_DLLPRIVATE void InvalidateSlot( sal_Int16 nId, bool bWithId );
- SAL_DLLPRIVATE void UpdateSlot( sal_Int16 nId );
+ SAL_DLLPRIVATE void InvalidateSlot_Lock(sal_Int16 nId, bool bWithId);
+ SAL_DLLPRIVATE void UpdateSlot_Lock(sal_Int16 nId);
// locking the invalidation - if the internal locking counter goes to 0, all accumulated slots
// are invalidated (asynchronously)
- SAL_DLLPRIVATE void LockSlotInvalidation(bool bLock);
+ SAL_DLLPRIVATE void LockSlotInvalidation_Lock(bool bLock);
- DECL_DLLPRIVATE_LINK(OnInvalidateSlots, void*, void);
+ DECL_DLLPRIVATE_LINK(OnInvalidateSlots_Lock, void*, void);
- SAL_DLLPRIVATE void CloseExternalFormViewer();
+ SAL_DLLPRIVATE void CloseExternalFormViewer_Lock();
// closes the task-local beamer displaying a grid view for a form
// ConfigItem related stuff
SAL_DLLPRIVATE virtual void Notify( const css::uno::Sequence< OUString >& _rPropertyNames) override;
- SAL_DLLPRIVATE void implAdjustConfigCache();
+ SAL_DLLPRIVATE void implAdjustConfigCache_Lock();
SAL_DLLPRIVATE css::uno::Reference< css::awt::XControlContainer >
- getControlContainerForView();
+ getControlContainerForView_Lock();
/** finds and sets a default for m_xCurrentForm, if it is currently NULL
*/
- SAL_DLLPRIVATE void impl_defaultCurrentForm_nothrow();
+ SAL_DLLPRIVATE void impl_defaultCurrentForm_nothrow_Lock();
/** sets m_xCurrentForm to the provided form, and updates everything which
depends on the current form
*/
- SAL_DLLPRIVATE void impl_updateCurrentForm( const css::uno::Reference< css::form::XForm >& _rxNewCurForm );
+ SAL_DLLPRIVATE void impl_updateCurrentForm_Lock( const css::uno::Reference< css::form::XForm >& _rxNewCurForm );
/** adds or removes ourself as XEventListener at m_xActiveController
*/
- SAL_DLLPRIVATE void impl_switchActiveControllerListening( const bool _bListen );
+ SAL_DLLPRIVATE void impl_switchActiveControllerListening_Lock(const bool _bListen);
/** add an element
*/
@@ -508,7 +502,7 @@ private:
/** remove an element
*/
- SAL_DLLPRIVATE void impl_RemoveElement_nothrow(const css::uno::Reference< css::uno::XInterface>& Element);
+ SAL_DLLPRIVATE void impl_RemoveElement_nothrow_Lock(const css::uno::Reference< css::uno::XInterface>& Element);
SAL_DLLPRIVATE virtual void ImplCommit() override;
@@ -520,7 +514,7 @@ public:
@param _nSlot
the slot to execute
*/
- SAL_DLLPRIVATE void ExecuteFormSlot( sal_Int32 _nSlot );
+ SAL_DLLPRIVATE void ExecuteFormSlot_Lock(sal_Int32 _nSlot);
/** determines whether the current form slot is currently enabled
*/
@@ -529,11 +523,11 @@ public:
SAL_DLLPRIVATE static OString SlotToIdent(sal_uInt16 nSlot);
protected:
- DECL_DLLPRIVATE_LINK( OnLoadForms, void*, void );
+ DECL_DLLPRIVATE_LINK( OnLoadForms_Lock, void*, void );
};
-inline bool FmXFormShell::IsSelectionUpdatePending()
+inline bool FmXFormShell::IsSelectionUpdatePending_Lock()
{
return m_aMarkTimer.IsActive();
}