loplugin:flatten in comphelper
Change-Id: I1a8db4dbd744b87406d1db5609585495f01f4403 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92478 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -98,8 +98,9 @@ namespace comphelper
|
||||
|
||||
void OContainerListenerAdapter::dispose()
|
||||
{
|
||||
if (m_xContainer.is())
|
||||
{
|
||||
if (!m_xContainer.is())
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
Reference< XContainerListener > xPreventDelete(this);
|
||||
@@ -113,7 +114,6 @@ namespace comphelper
|
||||
m_xContainer = nullptr;
|
||||
m_pListener = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL OContainerListenerAdapter::disposing( const EventObject& _rSource)
|
||||
|
@@ -423,13 +423,15 @@ void EmbeddedObjectContainer::AddEmbeddedObject( const css::uno::Reference < css
|
||||
xChild->setParent( pImpl->m_xModel.get() );
|
||||
|
||||
// look for object in temporary container
|
||||
if ( pImpl->mpTempObjectContainer )
|
||||
{
|
||||
if ( !pImpl->mpTempObjectContainer )
|
||||
return;
|
||||
|
||||
auto& rObjectContainer = pImpl->mpTempObjectContainer->pImpl->maNameToObjectMap;
|
||||
auto aIter = std::find_if(rObjectContainer.begin(), rObjectContainer.end(),
|
||||
[&xObj](const EmbeddedObjectContainerNameMap::value_type& rEntry) { return rEntry.second == xObj; });
|
||||
if (aIter != rObjectContainer.end())
|
||||
{
|
||||
if (aIter == rObjectContainer.end())
|
||||
return;
|
||||
|
||||
// copy replacement image from temporary container (if there is any)
|
||||
OUString aTempName = aIter->first;
|
||||
OUString aMediaType;
|
||||
@@ -458,8 +460,6 @@ void EmbeddedObjectContainer::AddEmbeddedObject( const css::uno::Reference < css
|
||||
pImpl->mpTempObjectContainer->pImpl->maObjectToNameMap.erase( aIter->second );
|
||||
pImpl->mpTempObjectContainer->pImpl->maNameToObjectMap.erase( aIter );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool EmbeddedObjectContainer::StoreEmbeddedObject(
|
||||
const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName, bool bCopy,
|
||||
@@ -993,8 +993,9 @@ void EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed:
|
||||
|
||||
auto aIter = std::find_if(pImpl->maNameToObjectMap.begin(), pImpl->maNameToObjectMap.end(),
|
||||
[&xObj](const EmbeddedObjectContainerNameMap::value_type& rEntry) { return rEntry.second == xObj; });
|
||||
if (aIter != pImpl->maNameToObjectMap.end())
|
||||
{
|
||||
if (aIter == pImpl->maNameToObjectMap.end())
|
||||
return;
|
||||
|
||||
pImpl->maObjectToNameMap.erase( aIter->second );
|
||||
pImpl->maNameToObjectMap.erase( aIter );
|
||||
|
||||
@@ -1008,7 +1009,6 @@ void EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed:
|
||||
// TODO/LATER: what if the object can not be closed?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( const OUString& aName, OUString* pMediaType )
|
||||
{
|
||||
|
@@ -594,8 +594,9 @@ void SAL_CALL ImplEventAttacherManager::detach(sal_Int32 nIndex, const Reference
|
||||
std::deque< AttacherIndex_Impl >::iterator aCurrentPosition = aIndex.begin() + nIndex;
|
||||
auto aObjIt = std::find_if(aCurrentPosition->aObjList.begin(), aCurrentPosition->aObjList.end(),
|
||||
[&xObject](const AttachedObject_Impl& rObj) { return rObj.xTarget == xObject; });
|
||||
if (aObjIt != aCurrentPosition->aObjList.end())
|
||||
{
|
||||
if (aObjIt == aCurrentPosition->aObjList.end())
|
||||
return;
|
||||
|
||||
sal_Int32 i = 0;
|
||||
for( const auto& rEvt : aCurrentPosition->aEventList )
|
||||
{
|
||||
@@ -614,7 +615,6 @@ void SAL_CALL ImplEventAttacherManager::detach(sal_Int32 nIndex, const Reference
|
||||
}
|
||||
aCurrentPosition->aObjList.erase( aObjIt );
|
||||
}
|
||||
}
|
||||
|
||||
void SAL_CALL ImplEventAttacherManager::addScriptListener(const Reference< XScriptListener >& aListener)
|
||||
{
|
||||
|
@@ -69,12 +69,14 @@ bool DirectoryHelper::dirExists(const OUString& rDirURL)
|
||||
void DirectoryHelper::scanDirsAndFiles(const OUString& rDirURL, std::set<OUString>& rDirs,
|
||||
std::set<std::pair<OUString, OUString>>& rFiles)
|
||||
{
|
||||
if (!rDirURL.isEmpty())
|
||||
{
|
||||
if (rDirURL.isEmpty())
|
||||
return;
|
||||
|
||||
osl::Directory aDirectory(rDirURL);
|
||||
|
||||
if (osl::FileBase::E_None == aDirectory.open())
|
||||
{
|
||||
if (osl::FileBase::E_None != aDirectory.open())
|
||||
return;
|
||||
|
||||
osl::DirectoryItem aDirectoryItem;
|
||||
|
||||
while (osl::FileBase::E_None == aDirectory.getNextItem(aDirectoryItem))
|
||||
@@ -107,8 +109,6 @@ void DirectoryHelper::scanDirsAndFiles(const OUString& rDirURL, std::set<OUStrin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool DirectoryHelper::deleteDirRecursively(const OUString& rDirURL)
|
||||
{
|
||||
|
@@ -124,8 +124,9 @@ namespace comphelper
|
||||
if ( !isAlive() )
|
||||
return;
|
||||
|
||||
if ( _rxListener.is() && m_pImpl->getClientId() )
|
||||
{
|
||||
if ( !(_rxListener.is() && m_pImpl->getClientId()) )
|
||||
return;
|
||||
|
||||
sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( m_pImpl->getClientId( ), _rxListener );
|
||||
if ( !nListenerCount )
|
||||
{
|
||||
@@ -137,7 +138,6 @@ namespace comphelper
|
||||
m_pImpl->setClientId( 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OAccessibleContextHelper::NotifyAccessibleEvent( const sal_Int16 _nEventId,
|
||||
|
@@ -436,8 +436,9 @@ namespace
|
||||
private:
|
||||
void visitNodesXMLRead(const uno::Reference< xml::dom::XElement >& rElement)
|
||||
{
|
||||
if (rElement.is())
|
||||
{
|
||||
if (!rElement.is())
|
||||
return;
|
||||
|
||||
const OUString aTagName(rElement->getTagName());
|
||||
|
||||
if (aTagName == "extension")
|
||||
@@ -480,7 +481,6 @@ namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
void createUserExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
|
||||
@@ -605,25 +605,29 @@ namespace
|
||||
const ExtensionInfoEntryVector& rToBeEnabled,
|
||||
const ExtensionInfoEntryVector& rToBeDisabled)
|
||||
{
|
||||
if (DirectoryHelper::fileExists(rUnoPackagReg))
|
||||
{
|
||||
if (!DirectoryHelper::fileExists(rUnoPackagReg))
|
||||
return;
|
||||
|
||||
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
uno::Reference< xml::dom::XDocumentBuilder > xBuilder = xml::dom::DocumentBuilder::create(xContext);
|
||||
uno::Reference< xml::dom::XDocument > aDocument = xBuilder->parseURI(rUnoPackagReg);
|
||||
|
||||
if (aDocument.is())
|
||||
{
|
||||
if (visitNodesXMLChange(
|
||||
if (!aDocument.is())
|
||||
return;
|
||||
|
||||
if (!visitNodesXMLChange(
|
||||
rTagToSearch,
|
||||
aDocument->getDocumentElement(),
|
||||
rToBeEnabled,
|
||||
rToBeDisabled))
|
||||
{
|
||||
return;
|
||||
|
||||
// did change - write back
|
||||
uno::Reference< xml::sax::XSAXSerializable > xSerializer(aDocument, uno::UNO_QUERY);
|
||||
|
||||
if (xSerializer.is())
|
||||
{
|
||||
if (!xSerializer.is())
|
||||
return;
|
||||
|
||||
// create a SAXWriter
|
||||
uno::Reference< xml::sax::XWriter > const xSaxWriter = xml::sax::Writer::create(xContext);
|
||||
uno::Reference< io::XStream > xTempFile = io::TempFile::create(xContext);
|
||||
@@ -640,8 +644,9 @@ namespace
|
||||
aUrl >>= aTempURL;
|
||||
|
||||
// copy back file
|
||||
if (!aTempURL.isEmpty() && DirectoryHelper::fileExists(aTempURL))
|
||||
{
|
||||
if (!(!aTempURL.isEmpty() && DirectoryHelper::fileExists(aTempURL)))
|
||||
return;
|
||||
|
||||
if (DirectoryHelper::fileExists(rUnoPackagReg))
|
||||
{
|
||||
osl::File::remove(rUnoPackagReg);
|
||||
@@ -653,11 +658,6 @@ namespace
|
||||
osl::File::move(aTempURL, rUnoPackagReg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
static void changeEnableDisableStateInXML(
|
||||
@@ -1602,8 +1602,9 @@ namespace comphelper
|
||||
// ensure existence of needed paths
|
||||
getInitialBaseURL();
|
||||
|
||||
if (!maUserConfigBaseURL.isEmpty())
|
||||
{
|
||||
if (maUserConfigBaseURL.isEmpty())
|
||||
return;
|
||||
|
||||
if (bSafeMode)
|
||||
{
|
||||
if (!mbSafeModeDirExists)
|
||||
@@ -1643,15 +1644,15 @@ namespace comphelper
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BackupFileHelper::tryPush()
|
||||
{
|
||||
// no push when SafeModeDir exists, it may be Office's exit after SafeMode
|
||||
// where SafeMode flag is already deleted, but SafeModeDir cleanup is not
|
||||
// done yet (is done at next startup)
|
||||
if (mbActive && !mbSafeModeDirExists)
|
||||
{
|
||||
if (!(mbActive && !mbSafeModeDirExists))
|
||||
return;
|
||||
|
||||
const OUString aPackURL(getPackURL());
|
||||
|
||||
// ensure dir and file vectors
|
||||
@@ -1667,7 +1668,6 @@ namespace comphelper
|
||||
aPackURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BackupFileHelper::tryPushExtensionInfo()
|
||||
{
|
||||
@@ -1709,8 +1709,9 @@ namespace comphelper
|
||||
|
||||
void BackupFileHelper::tryPop()
|
||||
{
|
||||
if (mbActive)
|
||||
{
|
||||
if (!mbActive)
|
||||
return;
|
||||
|
||||
bool bDidPop(false);
|
||||
const OUString aPackURL(getPackURL());
|
||||
|
||||
@@ -1733,7 +1734,6 @@ namespace comphelper
|
||||
osl::Directory::remove(aPackURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BackupFileHelper::isPopPossibleExtensionInfo() const
|
||||
{
|
||||
@@ -1751,8 +1751,9 @@ namespace comphelper
|
||||
|
||||
void BackupFileHelper::tryPopExtensionInfo()
|
||||
{
|
||||
if (mbActive && mbExtensions)
|
||||
{
|
||||
if (!(mbActive && mbExtensions))
|
||||
return;
|
||||
|
||||
bool bDidPop(false);
|
||||
const OUString aPackURL(getPackURL());
|
||||
|
||||
@@ -1764,7 +1765,6 @@ namespace comphelper
|
||||
osl::Directory::remove(aPackURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BackupFileHelper::isTryDisableAllExtensionsPossible()
|
||||
{
|
||||
|
@@ -256,8 +256,9 @@ void SAL_CALL OLockListener::disposing( const lang::EventObject& aEvent )
|
||||
osl::ClearableMutexGuard aGuard( m_aMutex );
|
||||
|
||||
// object is disposed
|
||||
if ( aEvent.Source == m_xInstance )
|
||||
{
|
||||
if ( aEvent.Source != m_xInstance )
|
||||
return;
|
||||
|
||||
// the object does not listen for anything any more
|
||||
m_nMode = 0;
|
||||
|
||||
@@ -270,7 +271,6 @@ void SAL_CALL OLockListener::disposing( const lang::EventObject& aEvent )
|
||||
catch( uno::Exception& ){}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// XCloseListener
|
||||
@@ -279,8 +279,9 @@ void SAL_CALL OLockListener::queryClosing( const lang::EventObject& aEvent, sal_
|
||||
{
|
||||
// GetsOwnership parameter is always ignored, the user of the service must close the object always
|
||||
osl::ClearableMutexGuard aGuard( m_aMutex );
|
||||
if ( !m_bDisposed && aEvent.Source == m_xInstance && ( m_nMode & embed::Actions::PREVENT_CLOSE ) )
|
||||
{
|
||||
if ( !(!m_bDisposed && aEvent.Source == m_xInstance && ( m_nMode & embed::Actions::PREVENT_CLOSE )) )
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
uno::Reference< embed::XActionsApproval > xApprove = m_xApproval;
|
||||
@@ -301,7 +302,6 @@ void SAL_CALL OLockListener::queryClosing( const lang::EventObject& aEvent, sal_
|
||||
// no action should be done
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL OLockListener::notifyClosing( const lang::EventObject& aEvent )
|
||||
@@ -309,11 +309,13 @@ void SAL_CALL OLockListener::notifyClosing( const lang::EventObject& aEvent )
|
||||
osl::ClearableMutexGuard aGuard( m_aMutex );
|
||||
|
||||
// object is closed, no reason to listen
|
||||
if ( aEvent.Source == m_xInstance )
|
||||
{
|
||||
if ( aEvent.Source != m_xInstance )
|
||||
return;
|
||||
|
||||
uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( aEvent.Source, uno::UNO_QUERY );
|
||||
if ( xCloseBroadcaster.is() )
|
||||
{
|
||||
if ( !xCloseBroadcaster.is() )
|
||||
return;
|
||||
|
||||
xCloseBroadcaster->removeCloseListener( static_cast< util::XCloseListener* >( this ) );
|
||||
m_nMode &= ~embed::Actions::PREVENT_CLOSE;
|
||||
if ( !m_nMode )
|
||||
@@ -328,8 +330,6 @@ void SAL_CALL OLockListener::notifyClosing( const lang::EventObject& aEvent )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// XTerminateListener
|
||||
@@ -337,8 +337,9 @@ void SAL_CALL OLockListener::notifyClosing( const lang::EventObject& aEvent )
|
||||
void SAL_CALL OLockListener::queryTermination( const lang::EventObject& aEvent )
|
||||
{
|
||||
osl::ClearableMutexGuard aGuard( m_aMutex );
|
||||
if ( aEvent.Source == m_xInstance && ( m_nMode & embed::Actions::PREVENT_TERMINATION ) )
|
||||
{
|
||||
if ( !(aEvent.Source == m_xInstance && ( m_nMode & embed::Actions::PREVENT_TERMINATION )) )
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
uno::Reference< embed::XActionsApproval > xApprove = m_xApproval;
|
||||
@@ -359,7 +360,6 @@ void SAL_CALL OLockListener::queryTermination( const lang::EventObject& aEvent )
|
||||
// no action should be done
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL OLockListener::notifyTermination( const lang::EventObject& aEvent )
|
||||
@@ -367,11 +367,13 @@ void SAL_CALL OLockListener::notifyTermination( const lang::EventObject& aEvent
|
||||
osl::ClearableMutexGuard aGuard( m_aMutex );
|
||||
|
||||
// object is terminated, no reason to listen
|
||||
if ( aEvent.Source == m_xInstance )
|
||||
{
|
||||
if ( aEvent.Source != m_xInstance )
|
||||
return;
|
||||
|
||||
uno::Reference< frame::XDesktop > xDesktop( aEvent.Source, uno::UNO_QUERY );
|
||||
if ( xDesktop.is() )
|
||||
{
|
||||
if ( !xDesktop.is() )
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
xDesktop->removeTerminateListener( static_cast< frame::XTerminateListener* >( this ) );
|
||||
@@ -391,8 +393,6 @@ void SAL_CALL OLockListener::notifyTermination( const lang::EventObject& aEvent
|
||||
catch( uno::Exception& )
|
||||
{}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// XInitialization
|
||||
|
@@ -208,11 +208,13 @@ OfficeInstallationDirectories::getSupportedServiceNames()
|
||||
|
||||
void OfficeInstallationDirectories::initDirs()
|
||||
{
|
||||
if ( !m_xOfficeBrandDir)
|
||||
{
|
||||
if ( m_xOfficeBrandDir)
|
||||
return;
|
||||
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
if ( !m_xOfficeBrandDir )
|
||||
{
|
||||
if ( m_xOfficeBrandDir )
|
||||
return;
|
||||
|
||||
uno::Reference< util::XMacroExpander > xExpander = util::theMacroExpander::get(m_xCtx);
|
||||
|
||||
m_xOfficeBrandDir = xExpander->expandMacros( "$BRAND_BASE_DIR" );
|
||||
@@ -231,8 +233,6 @@ void OfficeInstallationDirectories::initDirs()
|
||||
|
||||
makeCanonicalFileURL( *m_xUserDir );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -118,8 +118,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValues(const Sequence< OUString >
|
||||
if( nCount != rValues.getLength() )
|
||||
throw IllegalArgumentException();
|
||||
|
||||
if( nCount )
|
||||
{
|
||||
if( !nCount )
|
||||
return;
|
||||
|
||||
_preSetValues();
|
||||
|
||||
const Any * pAny = rValues.getConstArray();
|
||||
@@ -137,7 +138,6 @@ void SAL_CALL ChainablePropertySet::setPropertyValues(const Sequence< OUString >
|
||||
|
||||
_postSetValues();
|
||||
}
|
||||
}
|
||||
|
||||
Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues(const Sequence< OUString >& rPropertyNames)
|
||||
{
|
||||
|
@@ -189,8 +189,9 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >&
|
||||
if( nCount != aValues.getLength() )
|
||||
throw IllegalArgumentException();
|
||||
|
||||
if( nCount )
|
||||
{
|
||||
if( !nCount )
|
||||
return;
|
||||
|
||||
_preSetValues();
|
||||
|
||||
const Any * pAny = aValues.getConstArray();
|
||||
@@ -238,7 +239,6 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >&
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< OUString >& aPropertyNames )
|
||||
{
|
||||
|
@@ -99,8 +99,9 @@ GenericPropertySet::GenericPropertySet( PropertySetInfo* pInfo ) throw()
|
||||
void SAL_CALL GenericPropertySet::addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener )
|
||||
{
|
||||
Reference < XPropertySetInfo > xInfo = getPropertySetInfo( );
|
||||
if ( xInfo.is() )
|
||||
{
|
||||
if ( !xInfo.is() )
|
||||
return;
|
||||
|
||||
if ( aPropertyName.isEmpty() )
|
||||
{
|
||||
Sequence< Property> aSeq = xInfo->getProperties();
|
||||
@@ -116,15 +117,15 @@ void SAL_CALL GenericPropertySet::addPropertyChangeListener( const OUString& aPr
|
||||
else
|
||||
throw UnknownPropertyException( aPropertyName, *this );
|
||||
}
|
||||
}
|
||||
|
||||
void SAL_CALL GenericPropertySet::removePropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener )
|
||||
{
|
||||
ClearableMutexGuard aGuard( maMutex );
|
||||
Reference < XPropertySetInfo > xInfo = getPropertySetInfo( );
|
||||
aGuard.clear();
|
||||
if ( xInfo.is() )
|
||||
{
|
||||
if ( !xInfo.is() )
|
||||
return;
|
||||
|
||||
if ( aPropertyName.isEmpty() )
|
||||
{
|
||||
Sequence< Property> aSeq = xInfo->getProperties();
|
||||
@@ -140,7 +141,6 @@ void SAL_CALL GenericPropertySet::removePropertyChangeListener( const OUString&
|
||||
else
|
||||
throw UnknownPropertyException( aPropertyName, *this );
|
||||
}
|
||||
}
|
||||
|
||||
void GenericPropertySet::_setPropertyValues( const PropertyMapEntry** ppEntries, const Any* pValues )
|
||||
{
|
||||
|
@@ -144,7 +144,9 @@ namespace comphelper
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
m_isModified = bModified;
|
||||
}
|
||||
if (bModified) {
|
||||
if (!bModified)
|
||||
return;
|
||||
|
||||
try {
|
||||
Reference<XInterface> xThis(*this);
|
||||
EventObject event(xThis);
|
||||
@@ -158,7 +160,6 @@ namespace comphelper
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL OPropertyBag::isModified()
|
||||
|
@@ -298,8 +298,9 @@ namespace internal
|
||||
void PropertyForwarder::doForward( sal_Int32 _nHandle, const Any& _rValue )
|
||||
{
|
||||
OSL_ENSURE( m_rAggregationHelper.m_xAggregateSet.is(), "PropertyForwarder::doForward: no property set!" );
|
||||
if ( m_rAggregationHelper.m_xAggregateSet.is() )
|
||||
{
|
||||
if ( !m_rAggregationHelper.m_xAggregateSet.is() )
|
||||
return;
|
||||
|
||||
m_rAggregationHelper.forwardingPropertyValue( _nHandle );
|
||||
|
||||
OSL_ENSURE( m_nCurrentlyForwarding == -1, "PropertyForwarder::doForward: reentrance?" );
|
||||
@@ -321,7 +322,6 @@ namespace internal
|
||||
m_rAggregationHelper.forwardedPropertyValue( _nHandle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OPropertySetAggregationHelper::OPropertySetAggregationHelper( ::cppu::OBroadcastHelper& rBHlp )
|
||||
:OPropertyStateHelper( rBHlp )
|
||||
|
@@ -129,8 +129,9 @@ void SAL_CALL PropertySetHelper::setPropertyValues( const Sequence< OUString >&
|
||||
if( nCount != rValues.getLength() )
|
||||
throw IllegalArgumentException();
|
||||
|
||||
if( nCount )
|
||||
{
|
||||
if( !nCount )
|
||||
return;
|
||||
|
||||
std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
|
||||
pEntries[nCount] = nullptr;
|
||||
const OUString* pNames = rPropertyNames.getConstArray();
|
||||
@@ -149,7 +150,6 @@ void SAL_CALL PropertySetHelper::setPropertyValues( const Sequence< OUString >&
|
||||
if( bUnknown )
|
||||
throw RuntimeException( *pNames, static_cast< XPropertySet* >( this ) );
|
||||
}
|
||||
}
|
||||
|
||||
Sequence< Any > SAL_CALL PropertySetHelper::getPropertyValues(const Sequence< OUString >& rPropertyNames)
|
||||
{
|
||||
|
@@ -89,8 +89,9 @@ void OPropertyChangeMultiplexer::unlock()
|
||||
|
||||
void OPropertyChangeMultiplexer::dispose()
|
||||
{
|
||||
if (m_bListening)
|
||||
{
|
||||
if (!m_bListening)
|
||||
return;
|
||||
|
||||
Reference< XPropertyChangeListener> xPreventDelete(this);
|
||||
|
||||
for (const OUString& rProp : m_aProperties)
|
||||
@@ -104,7 +105,6 @@ void OPropertyChangeMultiplexer::dispose()
|
||||
if (m_bAutoSetRelease)
|
||||
m_xSet = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// XEventListener
|
||||
|
||||
|
@@ -191,8 +191,9 @@ sal_Int64 SAL_CALL UNOMemoryStream::getLength()
|
||||
void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData )
|
||||
{
|
||||
const sal_Int32 nBytesToWrite( aData.getLength() );
|
||||
if( nBytesToWrite )
|
||||
{
|
||||
if( !nBytesToWrite )
|
||||
return;
|
||||
|
||||
sal_Int64 nNewSize = static_cast<sal_Int64>(mnCursor) + nBytesToWrite;
|
||||
if( nNewSize > SAL_MAX_INT32 )
|
||||
{
|
||||
@@ -209,7 +210,6 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData )
|
||||
|
||||
mnCursor += nBytesToWrite;
|
||||
}
|
||||
}
|
||||
|
||||
void SAL_CALL UNOMemoryStream::flush()
|
||||
{
|
||||
|
Reference in New Issue
Block a user