Kaydet (Commit) e0185db4 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Ported calc-formula-variable-sep-config-check-sfx2.diff from ooo-build.

This adds a method that gets called when the user clicks OK to dismiss
the Options dialog.  This is used in order to handle conflicting argument
separator settings wrt locale-specific decimal separators.
üst 2a154fcf
...@@ -346,6 +346,13 @@ public: ...@@ -346,6 +346,13 @@ public:
virtual sal_Bool SwitchPersistance( virtual sal_Bool SwitchPersistance(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
virtual void UpdateLinks(); virtual void UpdateLinks();
/**
* Called when the Options dialog is dismissed with the OK button, to
* handle potentially conflicting option settings.
*/
virtual void CheckConfigOptions();
sal_Bool IsConfigOptionsChecked() const;
void SetConfigOptionsChecked( sal_Bool bChecked );
// called for a few slots like SID_SAVE[AS]DOC, SID_PRINTDOC[DIRECT], derived classes may abort the action // called for a few slots like SID_SAVE[AS]DOC, SID_PRINTDOC[DIRECT], derived classes may abort the action
virtual sal_Bool QuerySlotExecutable( USHORT nSlotId ); virtual sal_Bool QuerySlotExecutable( USHORT nSlotId );
......
...@@ -966,11 +966,17 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) ...@@ -966,11 +966,17 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{ {
VclAbstractDialog* pDlg = VclAbstractDialog* pDlg =
pFact->CreateFrameDialog( NULL, xFrame, rReq.GetSlot(), sPageURL ); pFact->CreateFrameDialog( NULL, xFrame, rReq.GetSlot(), sPageURL );
pDlg->Execute(); short nRet = pDlg->Execute();
delete pDlg; delete pDlg;
SfxViewFrame* pView = SfxViewFrame::GetFirst(); SfxViewFrame* pView = SfxViewFrame::GetFirst();
while ( pView ) while ( pView )
{ {
if (nRet == RET_OK)
{
SfxObjectShell* pObjSh = pView->GetObjectShell();
if (pObjSh)
pObjSh->SetConfigOptionsChecked(false);
}
pView->GetBindings().InvalidateAll(FALSE); pView->GetBindings().InvalidateAll(FALSE);
pView = SfxViewFrame::GetNext( *pView ); pView = SfxViewFrame::GetNext( *pView );
} }
......
...@@ -3714,6 +3714,22 @@ void SfxObjectShell::UpdateLinks() ...@@ -3714,6 +3714,22 @@ void SfxObjectShell::UpdateLinks()
{ {
} }
void SfxObjectShell::CheckConfigOptions()
{
// not handled. Each app's shell needs to overwrite this method to add handler.
SetConfigOptionsChecked(true);
}
sal_Bool SfxObjectShell::IsConfigOptionsChecked() const
{
return pImp->m_bConfigOptionsChecked;
}
void SfxObjectShell::SetConfigOptionsChecked( sal_Bool bChecked )
{
pImp->m_bConfigOptionsChecked = bChecked;
}
sal_Bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) sal_Bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler )
{ {
if ( !HasBasic() ) if ( !HasBasic() )
......
...@@ -225,6 +225,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell ) ...@@ -225,6 +225,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,bSaveVersionOnClose( sal_False ) ,bSaveVersionOnClose( sal_False )
,m_bSharedXMLFlag( sal_False ) ,m_bSharedXMLFlag( sal_False )
,m_bAllowShareControlFileClean( sal_True ) ,m_bAllowShareControlFileClean( sal_True )
,m_bConfigOptionsChecked( sal_False )
,lErr(ERRCODE_NONE) ,lErr(ERRCODE_NONE)
,nEventId ( 0) ,nEventId ( 0)
,pReloadTimer ( 0) ,pReloadTimer ( 0)
......
...@@ -108,7 +108,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess ...@@ -108,7 +108,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
bUseUserData:1, bUseUserData:1,
bSaveVersionOnClose:1, bSaveVersionOnClose:1,
m_bSharedXMLFlag:1, // whether the flag should be stored in xml file m_bSharedXMLFlag:1, // whether the flag should be stored in xml file
m_bAllowShareControlFileClean:1; // whether the flag should be stored in xml file m_bAllowShareControlFileClean:1, // whether the flag should be stored in xml file
m_bConfigOptionsChecked:1; // whether or not the user options are checked after the Options dialog is closed.
IndexBitSet aBitSet; IndexBitSet aBitSet;
sal_uInt32 lErr; sal_uInt32 lErr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment