User: kz      
Date: 2008-04-04 14:04:10+0000
Modified:
   dba/dbaccess/source/ui/tabledesign/TableController.cxx

Log:
 INTEGRATION: CWS titles02 (1.114.26); FILE MERGED
 2008/02/12 13:25:53 as 1.114.26.3: RESYNC: (1.114-1.116); FILE MERGED
 2007/12/17 15:29:56 oj 1.114.26.2: #i45617# title feature
 2007/12/10 11:39:02 oj 1.114.26.1: #i45909# #i45617# #i71469# change title 
handling

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.117&r2=1.118
Delta lines:  +10 -17
---------------------
--- TableController.cxx 2008-03-06 18:30:39+0000        1.117
+++ TableController.cxx 2008-04-04 14:04:07+0000        1.118
@@ -427,11 +427,7 @@
                        if (_bSaveAs && !bNew)
                                 aDefaultName = String(m_sName);
                        else
-                       {
-                               String aName = String(ModuleRes(STR_TBL_TITLE));
-                               aName = aName.GetToken(0,' ');
-                               aDefaultName = 
::dbaui::createDefaultName(getConnection()->getMetaData(),xTables,aName);
-                       }
+                aDefaultName = getPrivateTitle();
 
             DynamicTableOrQueryNameCheck aNameChecker( getConnection(), 
CommandType::TABLE );
                        OSaveAsDlg aDlg( getView(), CommandType::TABLE, 
getORB(), getConnection(), aDefaultName, aNameChecker );
@@ -1533,7 +1529,7 @@
                        }
                }               
        }
-       updateTitle();
+       //updateTitle();
 }
 // 
-----------------------------------------------------------------------------
 sal_Bool OTableController::isAddAllowed() const
@@ -1620,11 +1616,11 @@
        return sName;
 }
 // 
-----------------------------------------------------------------------------
-void OTableController::updateTitle()
+::rtl::OUString OTableController::getPrivateTitle() const
 {
+    ::rtl::OUString sTitle;
        try
        {
-               ::rtl::OUString sTitle;
                // get the table
                if ( m_sName.getLength() && getConnection().is() )
                {
@@ -1633,21 +1629,18 @@
                        else
                                sTitle = m_sName;
                }
-               ::rtl::OUString sName = 
String(ModuleRes(STR_TABLEDESIGN_TITLE));
-               if(sTitle.getLength())
-                       sName = sTitle + sName;
-               else
+               if ( !sTitle.getLength() )
                {
-                       ::rtl::OUString sTemp(getDataSourceName());
-                       sName = 
::dbaui::getStrippedDatabaseName(getDataSource(),sTemp) + sName;
+            String aName = String(ModuleRes(STR_TBL_TITLE));
+                       sTitle = aName.GetToken(0,' ');
+            sTitle += ::rtl::OUString::valueOf(getCurrentStartNumber());
                }
-
-               OGenericUnoController::setTitle(sName);
        }
        catch(Exception)
        {
                OSL_ENSURE(0,"Exception catched while setting the title!");
        }
+    return sTitle;
 }
 // 
-----------------------------------------------------------------------------
 void OTableController::reload()




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

Reply via email to