fwk154: i114090: adapt listener code to reflect changes in config mgr, notification of change events
(transplanted from 7c0cad639e0b6d74f4be88f5877270f1a8b9fa53)
This commit is contained in:
@@ -647,28 +647,10 @@ void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent&
|
|||||||
sal_Int32 nCount = Event.Changes.getLength();
|
sal_Int32 nCount = Event.Changes.getLength();
|
||||||
if ( nCount )
|
if ( nCount )
|
||||||
{
|
{
|
||||||
|
uno::Reference< container::XHierarchicalNameAccess > xHierNameAccess;
|
||||||
|
Event.Base >>= xHierNameAccess;
|
||||||
|
|
||||||
uno::Reference< lang::XMultiServiceFactory > xConfigProv(
|
OSL_ASSERT( xHierNameAccess.is() );
|
||||||
m_xSMgr->createInstance(
|
|
||||||
rtl::OUString::createFromAscii(
|
|
||||||
"com.sun.star.configuration.ConfigurationProvider" ) ),
|
|
||||||
uno::UNO_QUERY_THROW );
|
|
||||||
|
|
||||||
uno::Sequence< uno::Any > aArguments( 1 );
|
|
||||||
beans::PropertyValue aProperty;
|
|
||||||
aProperty.Name
|
|
||||||
= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
|
|
||||||
aProperty.Value <<= Event.Base;
|
|
||||||
aArguments[ 0 ] <<= aProperty;
|
|
||||||
|
|
||||||
uno::Reference< uno::XInterface > xInterface(
|
|
||||||
xConfigProv->createInstanceWithArguments(
|
|
||||||
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
|
|
||||||
"com.sun.star.configuration.ConfigurationAccess" ) ),
|
|
||||||
aArguments ) );
|
|
||||||
|
|
||||||
uno::Reference< container::XHierarchicalNameAccess >
|
|
||||||
xHierNameAccess( xInterface, uno::UNO_QUERY_THROW );
|
|
||||||
|
|
||||||
const util::ElementChange* pElementChanges
|
const util::ElementChange* pElementChanges
|
||||||
= Event.Changes.getConstArray();
|
= Event.Changes.getConstArray();
|
||||||
|
Reference in New Issue
Block a user