User: obo     
Date: 2006/07/10 08:42:06

Modified:
   dba/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx

Log:
 INTEGRATION: CWS qiq (1.24.124); FILE MERGED
 2006/06/27 12:53:21 fs 1.24.124.2: RESYNC: (1.24-1.25); FILE MERGED
 2006/05/17 11:48:47 fs 1.24.124.1: refactored OSaveAsDlg in preparation of 
#i51143#

File Changes:

Directory: /dba/dbaccess/source/ui/querydesign/
===============================================

File [changed]: QueryViewSwitch.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx?r1=1.25&r2=1.26
Delta lines:  +16 -7
--------------------
--- QueryViewSwitch.cxx 20 Jun 2006 03:27:13 -0000      1.25
+++ QueryViewSwitch.cxx 10 Jul 2006 15:42:03 -0000      1.26
@@ -235,10 +235,13 @@
        sal_Bool bRet = sal_True;
        sal_Bool bGraphicalDesign = 
static_cast<OQueryController*>(m_pDesignView->getController())->isDesignMode();
 
+    OAddTableDlg* pAddTabDialog( getAddTableDialog() );
+
        if ( !bGraphicalDesign ) // we have to hide the add table dialog
        {
-               m_bAddTableDialogWasVisible = getAddTableDialog()->IsVisible();
-               m_pDesignView->getAddTableDialog()->Hide();
+        m_bAddTableDialogWasVisible = pAddTabDialog ? 
pAddTabDialog->IsVisible() : false;
+        if ( m_bAddTableDialogWasVisible )
+            pAddTabDialog->Hide();
        }
 
        OQueryContainerWindow* pContainer = getContainer();
@@ -255,7 +258,9 @@
                ::rtl::OUString sOldStatement = 
static_cast<OQueryController*>(m_pDesignView->getController())->getStatement();
                // we have to stop the sqledit from our textview
                m_pTextView->getSqlEdit()->stopTimer();
-               getAddTableDialog()->Update();
+
+        if ( pAddTabDialog )
+                   pAddTabDialog->Update();
                bRet = m_pDesignView->InitFromParseNode();
 
                // only show the view when the data is inserted
@@ -266,8 +271,8 @@
        {
                m_pTextView->Show       ( !bGraphicalDesign );
                m_pDesignView->Show     ( bGraphicalDesign );
-               if ( bGraphicalDesign && m_bAddTableDialogWasVisible )
-                       getAddTableDialog()->Show();
+               if ( bGraphicalDesign && m_bAddTableDialogWasVisible && 
pAddTabDialog )
+                       pAddTabDialog->Show();
 
                GrabFocus();
        }
@@ -288,7 +293,11 @@
 // 
-----------------------------------------------------------------------------
 OAddTableDlg* OQueryViewSwitch::getAddTableDialog()
 {
-       return m_pDesignView->getAddTableDialog();
+    if ( !m_pDesignView )
+        return NULL;
+    if ( !m_pDesignView->getController() )
+        return NULL;
+    return m_pDesignView->getController()->getAddTableDialog();
 }
 // 
-----------------------------------------------------------------------------
 BOOL OQueryViewSwitch::IsAddAllowed()




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to