21#include <PropertyForward.hxx>
23#include <com/sun/star/beans/PropertyAttribute.hpp>
24#include <com/sun/star/container/XNameContainer.hpp>
25#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
26#include <com/sun/star/sdbcx/XRename.hpp>
39 : m_xSettings( _xSettings )
43 if ( _xSettings.is() && _xContainer.is() )
49 Reference< XContainer > xContainer(_xSettings, UNO_QUERY);
50 if ( xContainer.is() )
51 xContainer->addContainerListener(
this);
76 Reference< XContainer > xContainer(
m_xSettings, UNO_QUERY );
77 if ( xContainer.is() )
78 xContainer->removeContainerListener(
this );
82 if ( xContainer.is() )
83 xContainer->removeContainerListener(
this );
99 OUString sElementName;
100 _rEvent.Accessor >>= sElementName;
101 PropertyForwardList::const_iterator aFind =
m_aForwardList.find(sElementName);
104 Reference< XPropertySet> xDest(_rEvent.Element,UNO_QUERY);
105 aFind->second->setDefinition( xDest );
114 if ( !(_rEvent.Source == xContainer && xContainer.is()) )
117 OUString sElementName;
118 _rEvent.Accessor >>= sElementName;
122 Reference<XNameContainer> xNameContainer(
m_xSettings, UNO_QUERY );
123 if ( xNameContainer.is() &&
m_xSettings->hasByName( sElementName ) )
124 xNameContainer->removeByName( sElementName );
135 if ( !(_rEvent.Source == xContainer && xContainer.is()) )
138 OUString sElementName;
139 _rEvent.ReplacedElement >>= sElementName;
141 PropertyForwardList::const_iterator aFind =
m_aForwardList.find(sElementName);
146 _rEvent.Accessor >>= sNewName;
149 Reference<XNameContainer> xNameContainer(
m_xSettings, UNO_QUERY_THROW );
150 if ( xNameContainer.is() &&
m_xSettings->hasByName( sElementName ) )
152 Reference<XRename> xSource(
m_xSettings->getByName(sElementName),UNO_QUERY_THROW);
153 xSource->rename(sNewName);
161 aFind->second->setName(sNewName);
177 Reference< XPropertySet > xSettings(
m_xSettings->getByName( _rName ), UNO_QUERY_THROW );
178 ::comphelper::copyProperties( xSettings, _rxDestination );
192 PropertyForwardList::const_iterator aFind =
m_aForwardList.find( _sName );
194 && aFind->second->getDefinition().is()
197 OSL_FAIL(
"OContainerMediator::notifyElementCreated: is this really a valid case?" );
201 std::vector< OUString > aPropertyList;
208 Reference< XPropertySetInfo > xPSI( _xDest->getPropertySetInfo(), UNO_SET_THROW );
209 const Sequence< Property >
aProperties( xPSI->getProperties() );
212 if ( (
property.Attributes & PropertyAttribute::READONLY ) != 0 )
214 if ( (
property.Attributes & PropertyAttribute::BOUND ) == 0 )
217 aPropertyList.push_back(
property.Name );
PropertiesInfo aProperties
mutable::osl::Mutex m_aMutex
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
Reference< XNameAccess > m_xContainer