[ooo-build-commit] .: sfx2/inc sfx2/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Oct 5 07:35:00 PDT 2010


 sfx2/inc/sfx2/objsh.hxx      |    7 +++++++
 sfx2/source/appl/appserv.cxx |    8 +++++++-
 sfx2/source/doc/objstor.cxx  |   16 ++++++++++++++++
 sfx2/source/doc/objxtor.cxx  |    1 +
 sfx2/source/inc/objshimp.hxx |    3 ++-
 5 files changed, 33 insertions(+), 2 deletions(-)

New commits:
commit 5039415ee76af364e260492cfc8cde4b66ef35cf
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Oct 5 10:28:46 2010 -0400

    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.

diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 0962a95..6f67106 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -346,6 +346,13 @@ public:
     virtual sal_Bool            SwitchPersistance(
                                     const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
     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
     virtual sal_Bool            QuerySlotExecutable( USHORT nSlotId );
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 623d92d..c06bc06 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -966,11 +966,17 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
             {
                 VclAbstractDialog* pDlg =
                     pFact->CreateFrameDialog( NULL, xFrame, rReq.GetSlot(), sPageURL );
-                  pDlg->Execute();
+                  short nRet = pDlg->Execute();
                   delete pDlg;
                 SfxViewFrame* pView = SfxViewFrame::GetFirst();
                 while ( pView )
                 {
+                    if (nRet == RET_OK)
+                    {
+                        SfxObjectShell* pObjSh = pView->GetObjectShell();
+                        if (pObjSh)
+                            pObjSh->SetConfigOptionsChecked(false);
+                    }
                     pView->GetBindings().InvalidateAll(FALSE);
                     pView = SfxViewFrame::GetNext( *pView );
                 }
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6c36c14..c31ef8c 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -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 )
 {
     if ( !HasBasic() )
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index a9a7583..5728cd5 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -225,6 +225,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
     ,bSaveVersionOnClose( sal_False )
     ,m_bSharedXMLFlag( sal_False )
     ,m_bAllowShareControlFileClean( sal_True )
+    ,m_bConfigOptionsChecked( sal_False )
     ,lErr(ERRCODE_NONE)
     ,nEventId ( 0)
     ,pReloadTimer ( 0)
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index c31a671..c7f5d10 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -108,7 +108,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
                         bUseUserData:1,
                         bSaveVersionOnClose:1,
                         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;
     sal_uInt32               lErr;


More information about the ooo-build-commit mailing list