User: rt      
Date: 2008-01-29 14:07:13+0000
Modified:
   dba/dbaccess/source/ui/app/AppControllerGen.cxx

Log:
 INTEGRATION: CWS reportdesign02 (1.28.24); FILE MERGED
 2007/11/07 12:14:21 oj 1.28.24.1: #i78387# new menu entry for saveas for 
reports

File Changes:

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

File [changed]: AppControllerGen.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.28&r2=1.29
Delta lines:  +34 -3
--------------------
--- AppControllerGen.cxx        2007-09-26 14:46:50+0000        1.28
+++ AppControllerGen.cxx        2008-01-29 14:07:10+0000        1.29
@@ -356,15 +356,37 @@
 {
        ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
        ::osl::MutexGuard aGuard(m_aMutex);
-       m_bNeedToReconnect = sal_True;
        if ( evt.PropertyName == PROPERTY_USER )
+    {
+        m_bNeedToReconnect = sal_True;
                InvalidateFeature(SID_DB_APP_STATUS_USERNAME);
+    }
        else if ( evt.PropertyName == PROPERTY_URL )
        {
+        m_bNeedToReconnect = sal_True;
                InvalidateFeature(SID_DB_APP_STATUS_DBNAME);
                InvalidateFeature(SID_DB_APP_STATUS_TYPE);
                InvalidateFeature(SID_DB_APP_STATUS_HOSTNAME);
        }
+    else if ( PROPERTY_NAME == evt.PropertyName )
+    {
+        const ElementType eType = getContainer()->getElementType();
+        if ( eType == E_FORM || eType == E_REPORT )
+               {
+            ::rtl::OUString sOldName,sNewName;
+            evt.OldValue >>= sOldName;
+            evt.NewValue >>= sNewName;
+            Reference<XChild> xChild(evt.Source,UNO_QUERY);
+            if ( xChild.is() )
+            {
+                Reference<XContent> xContent(xChild->getParent(),UNO_QUERY);
+                           if ( xContent.is() )
+                                   sOldName = 
xContent->getIdentifier()->getContentIdentifier() + 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sOldName;
+            }
+            
+            getContainer()->elementReplaced( eType , sOldName, sNewName );
+        }
+    }
 
        EventObject aEvt;
        aEvt.Source = m_xModel;
@@ -656,9 +678,18 @@
 {
        if ( _xDocument.is() )
        {
+        try
+        {
+            Reference<XPropertySet> xProp(_xDefintion,UNO_QUERY_THROW);
+            if ( xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME) 
)
+                
xProp->addPropertyChangeListener(PROPERTY_NAME,static_cast<XPropertyChangeListener*>(this));
                m_aDocuments[_xDocument] = _xDefintion;
                
_xDocument->addEventListener(static_cast<XFrameActionListener*>(this));
        }
+               catch(Exception&)
+               {
+               }
+       }
 }
 // 
-----------------------------------------------------------------------------
 sal_Bool OApplicationController::insertHierachyElement(ElementType 
_eType,const String& _sParentFolder,sal_Bool _bCollection,const 
Reference<XContent>& _xContent,sal_Bool _bMove)




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

Reply via email to