User: hr      
Date: 2006/08/15 03:57:28

Modified:
   dba/dbaccess/source/ui/tabledesign/TableController.cxx

Log:
 INTEGRATION: CWS dba30 (1.99.16); FILE MERGED
 2006/07/19 13:18:26 fs 1.99.16.7: RESYNC: (1.103-1.105); FILE MERGED
 2006/05/08 11:28:53 fs 1.99.16.6: RESYNC: (1.101-1.103); FILE MERGED
 2006/04/20 06:53:35 oj 1.99.16.5: RESYNC: (1.100-1.101); FILE MERGED
 2006/03/21 18:43:33 fs 1.99.16.4: RESYNC: (1.99-1.100); FILE MERGED
 2006/01/02 09:17:19 oj 1.99.16.3: #i44200# use 
supportsMixedCaseQuotedIdentifiers where storesMixedCaseQuotedIdentifiers was 
used
 2005/12/22 09:19:29 fs 1.99.16.2: tweaking some table-design related error 
messages
 2005/12/12 08:03:16 oj 1.99.16.1: #i18609# check type on target source

File Changes:

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

File [changed]: TableController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/tabledesign/TableController.cxx?r1=1.106&r2=1.107
Delta lines:  +28 -6
--------------------
--- TableController.cxx 19 Jul 2006 16:08:00 -0000      1.106
+++ TableController.cxx 15 Aug 2006 10:57:26 -0000      1.107
@@ -161,6 +161,10 @@
 #endif
 #include <boost/mem_fn.hpp>
 
+#ifndef _CPPUHELPER_EXC_HLP_HXX_
+#include <cppuhelper/exc_hlp.hxx>
+#endif
+
 extern "C" void SAL_CALL createRegistryInfo_OTableControl()
 {
        static ::dbaui::OMultiInstanceAutoRegistration< 
::dbaui::OTableController > aAutoRegistration;
@@ -528,7 +532,10 @@
                OSL_ENSURE(sal_False, "OTableController::doSaveDoc: table could 
not be inserted (caught a generic exception)!");
        }
 
+    if ( aInfo.isValid() )
+        aInfo.prepend( String( ModuleRes( STR_TABLEDESIGN_SAVE_ERROR ) ) );
        showError(aInfo);
+
        if (aInfo.isValid() || bError)
        {
                if(!bAlter || bNew)
@@ -867,7 +874,7 @@
                                {
                                        xColumns->getByName(pField->GetName()) 
>>= xColumn;
                                        if(xColumn.is())
-                                               
dbaui::setColumnUiProperties(xColumn,pField);
+                                               
pField->copyColumnSettingsTo(xColumn);
                                }
                                else
                                {
@@ -1323,7 +1330,7 @@
                                        aColumns[pField->GetName()] = sal_True;
                                        xColumns->getByName(pField->GetName()) 
>>= xColumn;
                                        if(xColumn.is())
-                                               
dbaui::setColumnUiProperties(xColumn,pField);
+                                               
pField->copyColumnSettingsTo(xColumn);
                                }
                                else
                                {
@@ -1380,8 +1387,23 @@
                                                continue;
                                        }
                                }
+                try
+                {
                                xDrop->dropByName(*pIter);
                        }
+                catch (const SQLException&)
+                {
+                    String sError( ModuleRes( 
STR_TABLEDESIGN_COULD_NOT_DROP_COL ) );
+                    sError.SearchAndReplaceAscii( "$column$", *pIter );
+
+                    SQLException aNewException;
+                    aNewException.Message = sError;
+                    aNewException.SQLState = ::rtl::OUString::createFromAscii( 
"S1000" );
+                    aNewException.NextException = ::cppu::getCaughtException();
+
+                    throw aNewException;
+                }
+            }
                }
        }
 
@@ -1408,7 +1430,7 @@
                                        aColumns[pField->GetName()] = sal_True;
                                        xColumns->getByName(pField->GetName()) 
>>= xColumn;
                                        if(xColumn.is())
-                                               
dbaui::setColumnUiProperties(xColumn,pField);
+                                               
pField->copyColumnSettingsTo(xColumn);
                                }
                                else
                                {




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

Reply via email to