Tag: cws_src680_oj14
User: oj      
Date: 2006/07/04 00:45:34

Modified:
   dba/dbaccess/source/ui/app/AppController.cxx

Log:
 RESYNC: (1.26-1.30); FILE MERGED

File Changes:

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

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.22.4.5&r2=1.22.4.6
Delta lines:  +51 -57
---------------------
--- AppController.cxx   25 Apr 2006 13:00:30 -0000      1.22.4.5
+++ AppController.cxx   4 Jul 2006 07:45:31 -0000       1.22.4.6
@@ -114,6 +114,9 @@
 #ifndef _TOOLS_DEBUG_HXX
 #include <tools/debug.hxx>
 #endif
+#ifndef TOOLS_DIAGNOSE_EX_H
+#include <tools/diagnose_ex.h>
+#endif
 #ifndef SVTOOLS_URIHELPER_HXX
 #include <svtools/urihelper.hxx>
 #endif
@@ -207,9 +210,6 @@
 #ifndef SVX_DBAOBJECTEX_HXX
 #include <svx/dbaobjectex.hxx>
 #endif
-#ifndef _DBAUI_DLGRENAME_HXX
-#include "dlgrename.hxx"
-#endif
 #ifndef DBAUI_TOOLS_HXX
 #include "UITools.hxx"
 #endif
@@ -327,14 +327,14 @@
 //--------------------------------------------------------------------
 OApplicationController::OApplicationController(const Reference< 
XMultiServiceFactory >& _rxORB)
        :OApplicationController_CBASE( _rxORB )
-       ,m_bSuspended( sal_False )
+    ,m_aTableCopyHelper(this)
        ,m_pClipbordNotifier(NULL)
        ,m_nAsyncDrop(0)
        ,m_ePreviewMode(E_PREVIEWNONE)
-       ,m_bNeedToReconnect(sal_False)
-       ,m_bPreviewEnabled(sal_True)
        ,m_eOldType(E_NONE)
-    ,m_aTableCopyHelper(this)
+       ,m_bPreviewEnabled(sal_True)
+       ,m_bNeedToReconnect(sal_False)
+    ,m_bSuspended( sal_False )
 {
     DBG_CTOR(OApplicationController,NULL);
 
@@ -371,16 +371,9 @@
         if ( xFlush.is() && m_xMetaData.is() && !m_xMetaData->isReadOnly() )
             xFlush->flush();
     }
-    catch( const Exception& e )
+    catch( const Exception& )
     {
-    #if OSL_DEBUG_LEVEL > 0
-        ::rtl::OString sMessage( "OApplicationController::disconnect: caught 
an exception!\n" );
-        sMessage += "message:\n";
-        sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), 
osl_getThreadTextEncoding() );
-        OSL_ENSURE( false, sMessage );
-    #else
-        e; // make compiler happy
-    #endif
+        DBG_UNHANDLED_EXCEPTION();
     }
 
     m_xDataSourceConnection.clear();
@@ -539,18 +532,14 @@
                        TDocuments::iterator aFind = 
::std::find_if(m_aDocuments.begin(),m_aDocuments.end(),
                                
::std::compose1(::std::bind2nd(::std::equal_to<Reference<XComponent> 
>(),xComp),::std::select1st<TDocuments::value_type>()));
                        if ( aFind != m_aDocuments.end() )
-                       {
                                m_aDocuments.erase(aFind);
                        }
-               }
                if ( xContainer.is() )
                {
                        TContainerVector::iterator aFind = 
::std::find(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),xContainer);
                        if ( aFind != m_aCurrentContainers.end() )
-                       {
                                m_aCurrentContainers.erase(aFind);
                        }
-               }
                OApplicationController_CBASE::disposing( _rSource );
        }
 }
@@ -559,6 +548,10 @@
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::MutexGuard aGuard(m_aMutex);
+
+    if ( getView() && getView()->IsInModalMode() )
+        return sal_False;
+
     sal_Bool bCanSuspend = sal_True;
 
     if ( m_bSuspended != bSuspend )
@@ -928,17 +921,9 @@
                                aReturn = 
OApplicationController_CBASE::GetState(_nId);
                }
        }
-       catch(Exception& e)
+       catch(const Exception& )
        {
-#if DBG_UTIL
-               String sMessage("OApplicationController::GetState(", 
RTL_TEXTENCODING_ASCII_US);
-               sMessage += String::CreateFromInt32(_nId);
-               sMessage.AppendAscii(") : caught an exception ! message : ");
-               sMessage += (const sal_Unicode*)e.Message;
-               DBG_ERROR(ByteString(sMessage, 
gsl_getSystemTextEncoding()).GetBuffer());
-#else
-               e;      // make compiler happy
-#endif
+        DBG_UNHANDLED_EXCEPTION();
        }
        return aReturn;
 }
@@ -1024,7 +1009,7 @@
                                                {
                                                        if ( 
pIter->Name.equalsAscii("FormatStringId") )
                                                        {
-                                                               
SotFormatStringId nFormatId = -1;
+                                                               
SotFormatStringId nFormatId = 0;
                                                                if ( 
pIter->Value >>= nFormatId )
                                                                        
pasteFormat(nFormatId);
                                                                break;
@@ -1300,9 +1285,9 @@
                                break;
                        case SID_MAIL_SENDDOC:
                                {
-                                       SfxMailModel aSendMail(m_xCurrentFrame);
-                                       if ( 
aSendMail.AttachDocument(SfxMailModel::TYPE_SELF,getModel()) == 
SfxMailModel::SEND_MAIL_OK )
-                                               aSendMail.Send();
+                                       SfxMailModel aSendMail;
+                    if ( aSendMail.AttachDocument(rtl::OUString(),getModel(), 
rtl::OUString()) == SfxMailModel::SEND_MAIL_OK )
+                                               aSendMail.Send(m_xCurrentFrame);
                                }
                                break;
                        case SID_DB_APP_SENDREPORTASMAIL:
@@ -1310,17 +1295,9 @@
                                break;
                }
        }
-       catch(Exception& e)
+       catch( const Exception& )
        {
-#if DBG_UTIL
-               String sMessage("OApplicationController::Execute(", 
RTL_TEXTENCODING_ASCII_US);
-               sMessage += String::CreateFromInt32(_nId);
-               sMessage.AppendAscii(") : caught an exception ! message : ");
-               sMessage += (const sal_Unicode*)e.Message;
-               DBG_ERROR(ByteString(sMessage, 
gsl_getSystemTextEncoding()).GetBuffer());
-#else
-               e;      // make compiler happy
-#endif
+        DBG_UNHANDLED_EXCEPTION();
        }
        InvalidateFeature(_nId);
 }
@@ -1467,6 +1444,8 @@
                                                        
containerFound(xSubContainer);
                                        }
                                        break;
+                default:
+                    break;
                        }
                        
getContainer()->elementAdded(eType,sName,_rEvent.Element,getConnection());
                }
@@ -1500,6 +1479,8 @@
                                        }
                                }
                                break;
+            default:
+                break;
                }
                getContainer()->elementRemoved(eType,sName,getConnection());
        }
@@ -1544,6 +1525,8 @@
                                                }
                                        }
                                        break;
+                default:
+                    break;
                        }
                        //      
getContainer()->elementReplaced(getContainer()->getElementType(),sName,sNewName,xConnection);
                }
@@ -1716,6 +1699,8 @@
                                }
                        }
                        break;
+        default:
+            break;
        }
        return xRet;
 }
@@ -1781,6 +1766,8 @@
                        }
                }
                break;
+        case E_NONE:
+            break;
     }
 }
 
@@ -1831,6 +1818,8 @@
                                }
                        }
                        break;
+        default:
+            break;
        }
 }
 // 
-----------------------------------------------------------------------------
@@ -1930,6 +1919,8 @@
                             m_xMetaData, getConnection(), *aList.begin(), 
SAD_TITLE_RENAME) );
                                        }
                                        break;
+                default:
+                    break;
                        }
 
                        if ( xRename.is() && aDlg.get() )
@@ -2000,7 +1991,7 @@
        }
 }
 // 
-----------------------------------------------------------------------------
-void OApplicationController::onEntryDeSelect(SvTreeListBox* _pTree)
+void OApplicationController::onEntryDeSelect(SvTreeListBox* /*_pTree*/)
 {
        InvalidateAll();
 }
@@ -2041,9 +2032,8 @@
                                                            if ( 
xConnection.is() )
                                                                
pView->showPreview(getDatabaseName(),xConnection,sName,sal_False);
                             }
-                                                       return;
                         }
-                        break;
+                                               return;
                                        case E_TABLE:
                                                {
                             SharedConnection xConnection( ensureConnection() );
@@ -2055,6 +2045,8 @@
                                                        }
                                                }
                                                break;
+                    default:
+                        break;
                                }
                        }
                        catch(SQLException e)
@@ -2084,6 +2076,8 @@
                        case FrameAction_FRAME_UI_DEACTIVATING:
                                m_bFrameUiActive = sal_False;
                                break;
+            default:
+                break;
                }
 }
 
//------------------------------------------------------------------------------
@@ -2101,21 +2095,21 @@
        return 0L;
 }
 // 
-----------------------------------------------------------------------------
-void OApplicationController::onCutEntry(SvLBoxEntry* _pEntry)
+void OApplicationController::onCutEntry(SvLBoxEntry* /*_pEntry*/)
 {
 }
 // 
-----------------------------------------------------------------------------
-void OApplicationController::onCopyEntry(SvLBoxEntry* _pEntry)
+void OApplicationController::onCopyEntry(SvLBoxEntry* /*_pEntry*/)
 {
        Execute(ID_BROWSER_COPY,Sequence<PropertyValue>());
 }
 // 
-----------------------------------------------------------------------------
-void OApplicationController::onPasteEntry(SvLBoxEntry* _pEntry)
+void OApplicationController::onPasteEntry(SvLBoxEntry* /*_pEntry*/)
 {
        Execute(ID_BROWSER_PASTE,Sequence<PropertyValue>());
 }
 // 
-----------------------------------------------------------------------------
-void OApplicationController::onDeleteEntry(SvLBoxEntry* _pEntry)
+void OApplicationController::onDeleteEntry(SvLBoxEntry* /*_pEntry*/)
 {
        ElementType eType = getContainer()->getElementType();
        sal_uInt16 nId = 0;
@@ -2140,19 +2134,19 @@
        executeChecked(nId,Sequence<PropertyValue>());
 }
 // 
-----------------------------------------------------------------------------
-sal_Bool OApplicationController::requestContextMenu( const CommandEvent& 
_rEvent )
+sal_Bool OApplicationController::requestContextMenu( const CommandEvent& 
/*_rEvent*/ )
 {
        return sal_False;
 }
 
 // 
-----------------------------------------------------------------------------
-sal_Bool OApplicationController::requestQuickHelp( const SvLBoxEntry* _pEntry, 
String& _rText ) const
+sal_Bool OApplicationController::requestQuickHelp( const SvLBoxEntry* 
/*_pEntry*/, String& /*_rText*/ ) const
 {
     return sal_False;
 }
 
 // 
-----------------------------------------------------------------------------
-sal_Bool OApplicationController::requestDrag( sal_Int8 _nAction, const Point& 
_rPosPixel )
+sal_Bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const 
Point& /*_rPosPixel*/ )
 {
        TransferableHelper* pTransfer = NULL;
        if ( getContainer() && getContainer()->getSelectionCount() )




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

Reply via email to