Tag: cws_src680_titles02
User: oj      
Date: 2007-12-10 11:39:05+0000
Modified:
   dba/dbaccess/source/inc/stringconstants.hrc
   dba/dbaccess/source/shared/stringconstants.cxx
   dba/dbaccess/source/ui/app/AppController.cxx
   dba/dbaccess/source/ui/app/AppController.hxx
   dba/dbaccess/source/ui/app/AppControllerGen.cxx
   dba/dbaccess/source/ui/browser/genericcontroller.cxx
   dba/dbaccess/source/ui/browser/sbabrw.src
   dba/dbaccess/source/ui/browser/unodatbr.cxx
   dba/dbaccess/source/ui/dlg/localize.sdf
   dba/dbaccess/source/ui/inc/RelationController.hxx
   dba/dbaccess/source/ui/inc/TableController.hxx
   dba/dbaccess/source/ui/inc/dbu_brw.hrc
   dba/dbaccess/source/ui/inc/querycontroller.hxx
   dba/dbaccess/source/ui/inc/unodatbr.hxx
   dba/dbaccess/source/ui/misc/singledoccontroller.cxx
   dba/dbaccess/source/ui/querydesign/querycontroller.cxx
   dba/dbaccess/source/ui/relationdesign/RelationController.cxx
   dba/dbaccess/source/ui/tabledesign/TableController.cxx

Log:
 #i45909# #i45617# #i71469# change title handling

File Changes:

Directory: /dba/dbaccess/source/inc/
====================================

File [changed]: stringconstants.hrc
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/inc/stringconstants.hrc?r1=1.47&r2=1.47.8.1
Delta lines:  +3 -4
-------------------
--- stringconstants.hrc 2007-11-21 15:44:33+0000        1.47
+++ stringconstants.hrc 2007-12-10 11:38:42+0000        1.47.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: stringconstants.hrc,v $
  *
- *  $Revision: 1.47 $
+ *  $Revision: 1.47.8.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/11/21 15:44:33 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:42 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -180,7 +180,6 @@
 //= property names
 //============================================================
 
-DECLARE_CONSTASCII_USTRING(PROPERTY_TITLE);
 DECLARE_CONSTASCII_USTRING(PROPERTY_URL);
 DECLARE_CONSTASCII_USTRING(PROPERTY_INFO);
 DECLARE_CONSTASCII_USTRING(PROPERTY_SETTINGS);

Directory: /dba/dbaccess/source/shared/
=======================================

File [changed]: stringconstants.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/shared/stringconstants.cxx?r1=1.44&r2=1.44.8.1
Delta lines:  +3 -4
-------------------
--- stringconstants.cxx 2007-11-21 15:49:12+0000        1.44
+++ stringconstants.cxx 2007-12-10 11:38:43+0000        1.44.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: stringconstants.cxx,v $
  *
- *  $Revision: 1.44 $
+ *  $Revision: 1.44.8.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/11/21 15:49:12 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:43 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -39,7 +39,6 @@
 //============================================================
 //= property names
 //============================================================
-IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TITLE, "Title");
 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_URL, "URL");
 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_INFO, "Info");
 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SETTINGS, "Settings");

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.50&r2=1.50.8.1
Delta lines:  +4 -4
-------------------
--- AppController.cxx   2007-11-21 16:57:49+0000        1.50
+++ AppController.cxx   2007-12-10 11:38:43+0000        1.50.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.50 $
+ *  $Revision: 1.50.8.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/11/21 16:57:49 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:43 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1155,7 +1155,7 @@
                                                        {
                                                                
xStore->storeAsURL(aURL.GetMainURL( INetURLObject::NO_DECODE 
),Sequence<PropertyValue>());
                                                                m_sDatabaseName 
= ::rtl::OUString();
-                                                               updateTitle();
+                                                               
/*updateTitle();*/
                                                                
m_bCurrentlyModified = sal_False;
                                                                
InvalidateFeature(ID_BROWSER_SAVEDOC);
                                 if ( getContainer()->getElementType() == 
E_NONE )

File [changed]: AppController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.22&r2=1.22.8.1
Delta lines:  +9 -5
-------------------
--- AppController.hxx   2007-11-21 15:49:47+0000        1.22
+++ AppController.hxx   2007-12-10 11:38:43+0000        1.22.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppController.hxx,v $
  *
- *  $Revision: 1.22 $
+ *  $Revision: 1.22.8.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/11/21 15:49:47 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:43 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -453,7 +453,7 @@
         /** select the give entry
         */
         void selectEntry(const ElementType _eType,const ::rtl::OUString& 
_sName);
-       protected:
+
                // 
----------------------------------------------------------------
                // initalizing members
                /** forces usage of a connection which we do not own
@@ -474,10 +474,14 @@
                virtual sal_Int8                executeDrop( const 
ExecuteDropEvent& _rEvt );
 
                // OGenericUnoController
-               virtual void                    updateTitle( );
         virtual void            onLoadedMenu( const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& 
_xLayoutManager );
                virtual void            impl_initialize();
 
+        virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XModel > getPrivateModel() const
+        {
+            return m_xModel;
+        }
+
                virtual ~OApplicationController();
 
     public:

File [changed]: AppControllerGen.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.28&r2=1.28.18.1
Delta lines:  +16 -18
---------------------
--- AppControllerGen.cxx        2007-09-26 14:46:50+0000        1.28
+++ AppControllerGen.cxx        2007-12-10 11:38:43+0000        1.28.18.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppControllerGen.cxx,v $
  *
- *  $Revision: 1.28 $
+ *  $Revision: 1.28.18.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:46:50 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:43 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -456,21 +456,19 @@
        InvalidateFeature(SID_DB_APP_VIEW_DOC_PREVIEW);
 }
 // 
-----------------------------------------------------------------------------
-void OApplicationController::updateTitle()
-{
-       ::rtl::OUString sName = getStrippedDatabaseName();
-
-       String sTitle = String(ModuleRes(STR_APP_TITLE));
-       sName = sName + sTitle;
-#ifndef PRODUCT
-    ::rtl::OUString aDefault;
-       sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ["));
-    sName += utl::Bootstrap::getBuildIdData( aDefault );
-       sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
-#endif
-
-       OGenericUnoController::setTitle(sName);
-}
+//void OApplicationController::updateTitle()
+//{
+//     ::rtl::OUString sName = getStrippedDatabaseName();
+//
+//     String sTitle = String(ModuleRes(STR_APP_TITLE));
+//     sName = sName + sTitle;
+//#ifndef PRODUCT
+//    ::rtl::OUString aDefault;
+//     sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ["));
+//    sName += utl::Bootstrap::getBuildIdData( aDefault );
+//     sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
+//#endif
+//}
 // 
-----------------------------------------------------------------------------
 void OApplicationController::askToReconnect()
 {

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

File [changed]: genericcontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.81&r2=1.81.18.1
Delta lines:  +81 -34
---------------------
--- genericcontroller.cxx       2007-09-26 14:48:32+0000        1.81
+++ genericcontroller.cxx       2007-12-10 11:38:43+0000        1.81.18.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: genericcontroller.cxx,v $
  *
- *  $Revision: 1.81 $
+ *  $Revision: 1.81.18.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:48:32 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:43 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -71,6 +71,7 @@
 #ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
 #include <cppuhelper/typeprovider.hxx>
 #endif
+#include <framework/titlehelper.hxx>
 #ifndef _COMPHELPER_SEQUENCE_HXX_
 #include <comphelper/sequence.hxx>
 #endif
@@ -142,6 +143,7 @@
 using namespace ::com::sun::star::sdb;
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star;
 using namespace ::dbtools;
 using namespace ::dbaui;
 using namespace ::comphelper;
@@ -407,16 +409,10 @@
        if ( startFrameListening( ) )
                m_bFrameUiActive = m_xCurrentFrame->isActive();
        loadMenu(xFrame);
-       if ( m_xCurrentFrame.is() )
-               updateTitle();
        if ( getView() )
                getView()->attachFrame(xFrame);
 }
 // 
-----------------------------------------------------------------------------
-void OGenericUnoController::updateTitle()
-{
-}
-// 
-----------------------------------------------------------------------------
 struct CommandCollector : public ::std::unary_function< 
SupportedFeatures::value_type, void>
 {
        sal_uInt16  m_nFeature;
@@ -615,7 +611,7 @@
 }
 
 // -----------------------------------------------------------------------
-void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const 
Reference< ::com::sun::star::frame::XStatusListener >& _xListener, sal_Bool 
_bForceBroadcast )
+void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const 
Reference< XStatusListener >& _xListener, sal_Bool _bForceBroadcast )
 {
        FeaturePair aPair;
        aPair.nId                               = _nId;
@@ -838,6 +834,17 @@
                m_aFeaturesToInvalidate.clear();
        }
 
+    try
+    {
+        Reference< XUntitledNumbers > xUntitledProvider(getPrivateModel(), 
UNO_QUERY      );
+        if ( xUntitledProvider.is() )
+            
xUntitledProvider->releaseNumberForComponent(static_cast<XWeak*>(this));
+    }
+    catch( const Exception& )
+       {
+        DBG_UNHANDLED_EXCEPTION();
+       }
+
        // check out from all the objects we are listening
        // the frame
        stopFrameListening( );
@@ -1015,10 +1022,10 @@
        ::dbaui::showError(_rInfo,getView(),getORB());
 }
 // 
-----------------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XLayoutManager > 
OGenericUnoController::getLayoutManager(const Reference< XFrame >& _xFrame) 
const
+Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const 
Reference< XFrame >& _xFrame) const
 {
        Reference< XPropertySet > xPropSet( _xFrame, UNO_QUERY );
-    Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
+    Reference< XLayoutManager > xLayoutManager;
        if ( xPropSet.is() )
     {
         try
@@ -1034,7 +1041,7 @@
 // 
-----------------------------------------------------------------------------
 void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame)
 {
-    Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager = 
getLayoutManager(_xFrame);
+    Reference< XLayoutManager > xLayoutManager = getLayoutManager(_xFrame);
     if ( xLayoutManager.is() )
        {
                xLayoutManager->lock();
@@ -1048,7 +1055,7 @@
 }
 
 // 
-----------------------------------------------------------------------------
-void OGenericUnoController::onLoadedMenu(const Reference< 
::com::sun::star::frame::XLayoutManager >& /*_xLayoutManager*/)
+void OGenericUnoController::onLoadedMenu(const Reference< XLayoutManager >& 
/*_xLayoutManager*/)
 {
     // not interested in
 }
@@ -1081,7 +1088,7 @@
                        }
             else*/
                        {
-                               Reference< ::com::sun::star::util::XCloseable > 
xCloseable(m_xCurrentFrame,UNO_QUERY);
+                               Reference< util::XCloseable > 
xCloseable(m_xCurrentFrame,UNO_QUERY);
                                if(xCloseable.is())
                                        xCloseable->close(sal_False); // false 
- holds the owner ship for this frame inside this object!
                        }
@@ -1110,7 +1117,7 @@
        Execute(_nCommandId, aArgs);
 }
 // 
-----------------------------------------------------------------------------
-void OGenericUnoController::executeUnChecked(const 
::com::sun::star::util::URL& _rCommand, const Sequence< PropertyValue >& aArgs)
+void OGenericUnoController::executeUnChecked(const util::URL& _rCommand, const 
Sequence< PropertyValue >& aArgs)
 {
     if ( m_aSupportedFeatures.empty() )
         fillSupportedFeatures();
@@ -1119,7 +1126,7 @@
                Execute( aIter->second.nFeatureId, aArgs );
 }
 // 
-----------------------------------------------------------------------------
-void OGenericUnoController::executeChecked(const ::com::sun::star::util::URL& 
_rCommand, const Sequence< PropertyValue >& aArgs)
+void OGenericUnoController::executeChecked(const util::URL& _rCommand, const 
Sequence< PropertyValue >& aArgs)
 {
     if ( m_aSupportedFeatures.empty() )
         fillSupportedFeatures();
@@ -1301,9 +1308,9 @@
        }
 }
 // 
-----------------------------------------------------------------------------
-Reference< ::com::sun::star::awt::XWindow> 
OGenericUnoController::getTopMostContainerWindow() const
+Reference< awt::XWindow> OGenericUnoController::getTopMostContainerWindow() 
const
 {
-       Reference< ::com::sun::star::awt::XWindow> xWindow;
+       Reference< awt::XWindow> xWindow;
        // get the top most window
        if ( m_xCurrentFrame.is() )
        {
@@ -1319,20 +1326,60 @@
        return xWindow;
 }
 // 
-----------------------------------------------------------------------------
-void OGenericUnoController::setTitle(const ::rtl::OUString& _sName)
+Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw()
 {
-       try
-       {
-               Reference<XPropertySet> xProp(m_xCurrentFrame,UNO_QUERY);
-               if ( xProp.is() && 
xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_TITLE) )
-               {
-                       xProp->setPropertyValue(PROPERTY_TITLE,makeAny(_sName));
-               }
-       }
-       catch(Exception)
+    ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+    ::osl::MutexGuard aGuard(m_aMutex);
+
+    if ( ! m_xTitleHelper.is ())
        {
-               OSL_ENSURE(0,"Exception catched while setting the title!");
+        Reference< XUntitledNumbers > xUntitledProvider(getPrivateModel(), 
UNO_QUERY      );
+        Reference< XController >      xThis(static_cast< XController* >(this), 
UNO_QUERY_THROW);
+    
+        ::framework::TitleHelper* pHelper = new 
::framework::TitleHelper(m_xServiceFactory);
+        m_xTitleHelper.set( static_cast< ::cppu::OWeakObject* >(pHelper), 
UNO_QUERY_THROW);
+    
+        pHelper->setOwner                   (xThis            );
+        pHelper->connectWithUntitledNumbers (xUntitledProvider);
        }
+
+    return m_xTitleHelper;
+}
+
+//=============================================================================
+// XTitle
+::rtl::OUString SAL_CALL OGenericUnoController::getTitle()
+    throw (RuntimeException)
+{
+    return getPrivateTitle() + impl_getTitleHelper_throw()->getTitle ();
+}
+
+//=============================================================================
+// XTitle
+void SAL_CALL OGenericUnoController::setTitle(const ::rtl::OUString& sTitle)
+    throw (RuntimeException)
+{
+    impl_getTitleHelper_throw()->setTitle (sTitle);
+}
+    
+//=============================================================================
+// XTitleChangeBroadcaster
+void SAL_CALL OGenericUnoController::addTitleChangeListener(const Reference< 
XTitleChangeListener >& xListener)
+    throw (RuntimeException)
+{
+    Reference< XTitleChangeBroadcaster > 
xBroadcaster(impl_getTitleHelper_throw(), UNO_QUERY);
+    if (xBroadcaster.is ())
+        xBroadcaster->addTitleChangeListener (xListener);
+}
+
+//=============================================================================
+// XTitleChangeBroadcaster
+void SAL_CALL OGenericUnoController::removeTitleChangeListener(const 
Reference< XTitleChangeListener >& xListener)
+    throw (RuntimeException)
+{
+    Reference< XTitleChangeBroadcaster > 
xBroadcaster(impl_getTitleHelper_throw(), UNO_QUERY);
+    if (xBroadcaster.is ())
+        xBroadcaster->removeTitleChangeListener (xListener);
 }
 // 
-----------------------------------------------------------------------------
 void OGenericUnoController::executeChecked(sal_uInt16 _nCommandId, const 
Sequence< PropertyValue >& aArgs)
@@ -1436,12 +1483,12 @@
     return Any();
 }
 // 
-----------------------------------------------------------------------------
-void SAL_CALL OGenericUnoController::addSelectionChangeListener( const 
Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) 
throw (RuntimeException)
+void SAL_CALL OGenericUnoController::addSelectionChangeListener( const 
Reference< view::XSelectionChangeListener >& xListener ) throw 
(RuntimeException)
 {
     m_aSelectionListeners.addInterface(xListener);
 }
 // 
-----------------------------------------------------------------------------
-void SAL_CALL OGenericUnoController::removeSelectionChangeListener( const 
Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) 
throw (RuntimeException)
+void SAL_CALL OGenericUnoController::removeSelectionChangeListener( const 
Reference< view::XSelectionChangeListener >& xListener ) throw 
(RuntimeException)
 {
     m_aSelectionListeners.removeInterface(xListener);
 }

File [changed]: sbabrw.src
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/sbabrw.src?r1=1.106&r2=1.106.80.1
Delta lines:  +3 -8
-------------------
--- sbabrw.src  2007-04-19 14:54:50+0000        1.106
+++ sbabrw.src  2007-12-10 11:38:44+0000        1.106.80.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sbabrw.src,v $
  *
- *  $Revision: 1.106 $
+ *  $Revision: 1.106.80.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/04/19 14:54:50 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:44 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -190,11 +190,6 @@
        Text [ en-US ] = "Loading table $name$ ...";
        };
 
-String STR_DSBROWSER_TITLE
-{
-       Text [ en-US ] = "Data sources view" ;
-       };
-
 String STR_NO_TABLE_FORMAT_INSIDE
 {
        Text [ en-US ] = "No table format could be found." ;

File [changed]: unodatbr.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.192&r2=1.192.8.1
Delta lines:  +10 -22
---------------------
--- unodatbr.cxx        2007-11-21 15:50:54+0000        1.192
+++ unodatbr.cxx        2007-12-10 11:38:44+0000        1.192.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: unodatbr.cxx,v $
  *
- *  $Revision: 1.192 $
+ *  $Revision: 1.192.8.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/11/21 15:50:54 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:38:44 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -2563,7 +2563,7 @@
                        String sDataSourceName( getDataSourceAcessor( 
pConnection ) );
                        if ( implLoadAnything( sDataSourceName, aName, 
nCommandType, sal_True, pConData->xConnection ) )
                                // set the title of the beamer
-                               updateTitle();
+                               ;/*updateTitle();*/
                        else
                        {       // clean up
                                criticalFail();
@@ -2999,9 +2999,6 @@
        {
                OSL_ENSURE(sal_False, "SbaTableQueryBrowser::unloadAndCleanup: 
could not reset the form");
        }
-
-       // set a default title
-       setDefaultTitle();
 }
 
 // -------------------------------------------------------------------------
@@ -3154,11 +3151,6 @@
                        OSL_ENSURE(sal_False, 
"SbaTableQueryBrowser::initialize: could not set the update related names!");
                }
        }
-       else
-       {
-               // set a default title
-               setDefaultTitle();
-       }
 
        InvalidateAll();
 }
@@ -3576,12 +3568,6 @@
        return sal_True;        // handled
 }
 // 
-----------------------------------------------------------------------------
-void SbaTableQueryBrowser::setDefaultTitle()
-{
-       ::rtl::OUString sTitle = String(ModuleRes(STR_DSBROWSER_TITLE));
-       setTitle(sTitle);
-}
-// 
-----------------------------------------------------------------------------
 sal_Bool SbaTableQueryBrowser::implGetQuerySignature( ::rtl::OUString& 
_rCommand, sal_Bool& _bEscapeProcessing )
 {
        _rCommand = ::rtl::OUString();
@@ -3688,15 +3674,16 @@
        }
 }
 // 
-----------------------------------------------------------------------------
-void SbaTableQueryBrowser::updateTitle()
+::rtl::OUString SbaTableQueryBrowser::getPrivateTitle() const
 {
+    ::rtl::OUString sTitle;
        if ( m_pCurrentlyDisplayed )
        {
                SvLBoxEntry* pContainer = 
m_pTreeModel->GetParent(m_pCurrentlyDisplayed);
                // get the entry for the datasource
                SvLBoxEntry* pConnection = m_pTreeModel->GetParent(pContainer);
                ::rtl::OUString sName = 
m_pTreeView->getListBox()->GetEntryText(m_pCurrentlyDisplayed);
-               ::rtl::OUString sTitle = GetEntryText( pConnection );
+               sTitle = GetEntryText( pConnection );
                INetURLObject aURL(sTitle);
                if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
                        sTitle = 
aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
@@ -3705,8 +3692,9 @@
                        sTitle += ::rtl::OUString::createFromAscii(": ");
                        sTitle += sName;
                }
-               setTitle(sTitle);
        }
+
+    return sTitle;
 }
 // 
-----------------------------------------------------------------------------
 sal_Bool SbaTableQueryBrowser::preReloadForm()
@@ -3740,7 +3728,7 @@
 {
        InitializeGridModel(getFormComponent());
        LoadFinished(sal_True);
-       updateTitle();
+       //updateTitle();
 }
 // .........................................................................
 }      // namespace dbaui

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

File [changed]: localize.sdf
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/localize.sdf?r1=1.37&r2=1.37.10.1
Delta lines:  +9 -9
-------------------
--- localize.sdf        2007-11-12 13:22:41+0000        1.37
+++ localize.sdf        2007-12-10 11:38:44+0000        1.37.10.1
@@ -13,9 +13,9 @@
 #
 #   $RCSfile: localize.sdf,v $
 #
-#   $Revision: 1.37 $
+#   $Revision: 1.37.10.1 $
 #
-#   last change: $Author: rt $ $Date: 2007/11/12 13:22:41 $
+#   last change: $Author: oj $ $Date: 2007/12/10 11:38:44 $
 #
 #   The Contents of this file are made available subject to
 #   the terms of GNU Lesser General Public License Version 2.1.

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

File [changed]: RelationController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/RelationController.hxx?r1=1.17&r2=1.17.26.1
Delta lines:  +5 -5
-------------------
--- RelationController.hxx      2007-11-01 15:17:45+0000        1.17
+++ RelationController.hxx      2007-12-10 11:39:01+0000        1.17.26.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RelationController.hxx,v $
  *
- *  $Revision: 1.17 $
+ *  $Revision: 1.17.26.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/11/01 15:17:45 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -91,12 +91,12 @@
         virtual bool allowViews() const;
         virtual bool allowQueries() const;
 
-       protected:
+       private:
                // ask the user if the design should be saved when it is 
modified
                virtual short saveModified();
                virtual void reset();
                virtual void impl_initialize();
-               virtual void updateTitle();
+               virtual ::rtl::OUString getPrivateTitle( ) const;
        };
 }
 #endif // DBAUI_RELATIONCONTROLLER_HXX

File [changed]: TableController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/TableController.hxx?r1=1.38&r2=1.38.58.1
Delta lines:  +4 -5
-------------------
--- TableController.hxx 2007-07-06 08:24:41+0000        1.38
+++ TableController.hxx 2007-12-10 11:39:01+0000        1.38.58.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableController.hxx,v $
  *
- *  $Revision: 1.38 $
+ *  $Revision: 1.38.58.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 08:24:41 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -107,7 +107,6 @@
                
                void reload();
                
-       protected:
                // all the features which should be handled by this class
                virtual void                    describeSupportedFeatures();
                // state of a feature. 'feature' may be the handle of a 
::com::sun::star::util::URL somebody requested a dispatch interface for OR a 
toolbar slot.
@@ -117,7 +116,7 @@
 
                virtual void losingConnection( );
 
-               virtual void updateTitle();
+               virtual ::rtl::OUString getPrivateTitle( ) const;
                
                void            doEditIndexes();
                sal_Bool        doSaveDoc(sal_Bool _bSaveAs);

File [changed]: dbu_brw.hrc
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/dbu_brw.hrc?r1=1.4&r2=1.4.242.1
Delta lines:  +4 -6
-------------------
--- dbu_brw.hrc 2006-03-31 12:15:10+0000        1.4
+++ dbu_brw.hrc 2007-12-10 11:39:01+0000        1.4.242.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbu_brw.hrc,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.242.1 $
  *
- *  last change: $Author: vg $ $Date: 2006/03/31 12:15:10 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -53,12 +53,10 @@
 #define STR_CONNECTING_DATASOURCE                      RID_STR_BRW_START + 11
 #define STR_LOADING_QUERY                                      
RID_STR_BRW_START + 12
 #define STR_LOADING_TABLE                                      
RID_STR_BRW_START + 13
-#define STR_DSBROWSER_TITLE                                    
RID_STR_BRW_START + 14
-
                                                                                
                                        
 // please adjust checking before insert new strings                    
                                                                                
                   
-#if STR_DSBROWSER_TITLE > RID_STR_BRW_END   
+#if STR_LOADING_TABLE > RID_STR_BRW_END   
 #error Resource-Id Ueberlauf in #file, #line      
 #endif                                                                         
           
                                                                                
                   

File [changed]: querycontroller.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/querycontroller.hxx?r1=1.38&r2=1.38.10.1
Delta lines:  +4 -4
-------------------
--- querycontroller.hxx 2007-11-21 16:05:27+0000        1.38
+++ querycontroller.hxx 2007-12-10 11:39:01+0000        1.38.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: querycontroller.hxx,v $
  *
- *  $Revision: 1.38 $
+ *  $Revision: 1.38.10.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/11/21 16:05:27 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -142,7 +142,7 @@
                virtual void                    Execute(sal_uInt16 nId, const 
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& 
aArgs);
 
                virtual void                    reconnect( sal_Bool _bUI );
-               virtual void                    updateTitle( );
+               virtual ::rtl::OUString getPrivateTitle( ) const;
 
                OQueryContainerWindow*  getContainer() const { return 
static_cast< OQueryContainerWindow* >( getView() ); }
 

File [changed]: unodatbr.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/unodatbr.hxx?r1=1.69&r2=1.69.42.1
Delta lines:  +4 -9
-------------------
--- unodatbr.hxx        2007-07-24 12:09:55+0000        1.69
+++ unodatbr.hxx        2007-12-10 11:39:01+0000        1.69.42.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: unodatbr.hxx,v $
  *
- *  $Revision: 1.69 $
+ *  $Revision: 1.69.42.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/24 12:09:55 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -164,9 +164,7 @@
                sal_Bool                                m_bEnableBrowser;
 
 
-               /** updateTitle will be called when a new frame is attached
-               */
-               virtual void updateTitle( );
+               virtual ::rtl::OUString getPrivateTitle( ) const;
        // attribute access
        public:
                SbaTableQueryBrowser(const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rM);
@@ -457,9 +455,6 @@
                        void* _pTreeListUserData        // in rela a 
DBTreeListModel::DBTreeListUserData*, but we do not know this class here ....
                );
 
-               // sets a frame title
-               void setDefaultTitle();
-
 #ifdef DBG_UTIL
         // checks whether the given tree entry denotes a data source
         bool impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const;

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

File [changed]: singledoccontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/singledoccontroller.cxx?r1=1.22&r2=1.22.58.1
Delta lines:  +11 -3
--------------------
--- singledoccontroller.cxx     2007-07-06 08:38:03+0000        1.22
+++ singledoccontroller.cxx     2007-12-10 11:39:01+0000        1.22.58.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: singledoccontroller.cxx,v $
  *
- *  $Revision: 1.22 $
+ *  $Revision: 1.22.58.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 08:38:03 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -78,6 +78,7 @@
 #ifndef DBAUI_DATAVIEW_HXX
 #include "dataview.hxx"
 #endif
+#include "UITools.hxx"
 #ifndef _CPPUHELPER_TYPEPROVIDER_HXX_ 
 #include <cppuhelper/typeprovider.hxx>
 #endif
@@ -514,6 +515,13 @@
                                        
OSingleDocumentController::getDataSource() const { return 
m_pImpl->m_xDataSource; }
     sal_Bool   OSingleDocumentController::haveDataSource() const { return 
m_pImpl->m_xDataSource.is(); }
     uno::Reference< util::XNumberFormatter >   
OSingleDocumentController::getNumberFormatter() const   { return 
m_pImpl->m_xFormatter; }
+
+    // 
-----------------------------------------------------------------------------
+    uno::Reference< frame::XModel > 
OSingleDocumentController::getPrivateModel() const
+    {
+        return uno::Reference< frame::XModel 
>(dbaui::getDataSourceOrModel(m_pImpl->m_xDataSource),uno::UNO_QUERY);
+    }
+    // 
-----------------------------------------------------------------------------
 //........................................................................
 }      // namespace dbaui
 //........................................................................

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

File [changed]: querycontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/querycontroller.cxx?r1=1.112&r2=1.112.8.1
Delta lines:  +7 -11
--------------------
--- querycontroller.cxx 2007-11-21 17:12:55+0000        1.112
+++ querycontroller.cxx 2007-12-10 11:39:02+0000        1.112.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: querycontroller.cxx,v $
  *
- *  $Revision: 1.112 $
+ *  $Revision: 1.112.8.1 $
  *
- *  last change: $Author: ihi $ $Date: 2007/11/21 17:12:55 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -890,7 +890,7 @@
 }
 
 // 
-----------------------------------------------------------------------------
-void OQueryController::updateTitle()
+::rtl::OUString OQueryController::getPrivateTitle( ) const
 {
        ::rtl::OUString sName = m_sName;
        if ( !sName.getLength() )
@@ -902,15 +902,11 @@
                    if ( !sName.getLength() )
                    {                           
                            String aDefaultName = String( ModuleRes( 
editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) );
-                           aDefaultName = aDefaultName.GetToken( 0, ' ' );
-                           sName = ::dbtools::createUniqueName( 
getObjectContainer(),aDefaultName );
+                           sName = aDefaultName.GetToken( 0, ' ' );
                    }
-                   String sTitlePrefix = String( ModuleRes( editingView() ? 
STR_VIEWDESIGN : STR_QUERYDESIGN ) );
-                   sName += sTitlePrefix;
         }
-
        }
-       OGenericUnoController::setTitle(sName);
+    return sName;
 }
 // 
-----------------------------------------------------------------------------
 void OQueryController::setQueryComposer()
@@ -1440,7 +1436,7 @@
        showError( aInfo );
 
     // update the title of our window
-       updateTitle();
+       //updateTitle();
 
     // if we successfully saved a view we were creating, then close the 
designer
     if ( bSuccess && editingView() && !m_xAlterView.is() )

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

File [changed]: RelationController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/relationdesign/RelationController.cxx?r1=1.49&r2=1.49.26.1
Delta lines:  +6 -10
--------------------
--- RelationController.cxx      2007-11-01 15:37:35+0000        1.49
+++ RelationController.cxx      2007-12-10 11:39:02+0000        1.49.26.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RelationController.cxx,v $
  *
- *  $Revision: 1.49 $
+ *  $Revision: 1.49.26.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/11/01 15:37:35 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -354,14 +354,10 @@
        
 }
 // 
-----------------------------------------------------------------------------
-void ORelationController::updateTitle()
+::rtl::OUString ORelationController::getPrivateTitle( ) const
 {
-       ::rtl::OUString sName;
-       sName = String(ModuleRes(STR_RELATIONDESIGN));
-       ::rtl::OUString sDataSourceName = getDataSourceName();
-       sDataSourceName = 
::dbaui::getStrippedDatabaseName(getDataSource(),sDataSourceName) ;;
-       sDataSourceName += sName;
-       OGenericUnoController::setTitle(sDataSourceName);
+    ::rtl::OUString sName = getDataSourceName();
+       return ::dbaui::getStrippedDatabaseName(getDataSource(),sName);
 }
 // 
-----------------------------------------------------------------------------
 sal_Bool ORelationController::Construct(Window* pParent)

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.114&r2=1.114.26.1
Delta lines:  +11 -15
---------------------
--- TableController.cxx 2007-11-02 11:28:34+0000        1.114
+++ TableController.cxx 2007-12-10 11:39:02+0000        1.114.26.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableController.cxx,v $
  *
- *  $Revision: 1.114 $
+ *  $Revision: 1.114.26.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/11/02 11:28:34 $
+ *  last change: $Author: oj $ $Date: 2007/12/10 11:39:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1550,7 +1550,7 @@
                        }
                }               
        }
-       updateTitle();
+       //updateTitle();
 }
 // 
-----------------------------------------------------------------------------
 sal_Bool OTableController::isAddAllowed() const
@@ -1629,11 +1629,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() )
                {
@@ -1642,21 +1642,17 @@
                        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,' ');
                }
-
-               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