summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/app/AppControllerGen.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-01-29 13:07:10 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-01-29 13:07:10 +0000
commitf7cedfc739e9a2b8e028d0d0ed1ad9932d74cd82 (patch)
treea7829d81724ad9a65d974d7c159d4d7fdc1d9492 /dbaccess/source/ui/app/AppControllerGen.cxx
parentd22769e13b94b408ee14f1200fbe43ef86527248 (diff)
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
Diffstat (limited to 'dbaccess/source/ui/app/AppControllerGen.cxx')
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx41
1 files changed, 36 insertions, 5 deletions
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index cd275be98..c5e439f86 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: AppControllerGen.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: hr $ $Date: 2007-09-26 14:46:50 $
+ * last change: $Author: rt $ $Date: 2008-01-29 14:07:10 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -356,15 +356,37 @@ void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent&
{
::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,8 +678,17 @@ void OApplicationController::addDocumentListener(const Reference< XComponent >&
{
if ( _xDocument.is() )
{
- m_aDocuments[_xDocument] = _xDefintion;
- _xDocument->addEventListener(static_cast<XFrameActionListener*>(this));
+ 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&)
+ {
+ }
}
}
// -----------------------------------------------------------------------------