summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-16 15:23:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-17 08:25:47 +0200
commitccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch)
tree2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /extensions
parentda5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff)
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/bibconfig.cxx2
-rw-r--r--extensions/source/logging/filehandler.cxx4
-rw-r--r--extensions/source/propctrlr/cellbindinghandler.cxx25
-rw-r--r--extensions/source/propctrlr/eformspropertyhandler.cxx46
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx3
-rw-r--r--extensions/source/propctrlr/inspectormodelbase.cxx2
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx2
-rw-r--r--extensions/source/propctrlr/propertycomposer.cxx10
-rw-r--r--extensions/source/propctrlr/submissionhandler.cxx35
-rw-r--r--extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx45
-rw-r--r--extensions/source/scanner/sanedlg.cxx2
-rw-r--r--extensions/source/update/check/updatecheckjob.cxx2
12 files changed, 104 insertions, 74 deletions
diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx
index bf3ea97bdd58..e18d60a13aaa 100644
--- a/extensions/source/bibliography/bibconfig.cxx
+++ b/extensions/source/bibliography/bibconfig.cxx
@@ -270,7 +270,7 @@ const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const
{
for(std::unique_ptr<Mapping> const & i : mvMappings)
{
- Mapping& rMapping = *i.get();
+ Mapping& rMapping = *i;
bool bURLEqual = rDesc.sDataSource == rMapping.sURL;
if(rDesc.sTableOrQuery == rMapping.sTableName && bURLEqual)
return &rMapping;
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index 94e5898d8b08..d93753dd2a44 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -206,7 +206,7 @@ namespace logging
void FileHandler::impl_writeString_nothrow( const OString& _rEntry )
{
- OSL_PRECOND( m_pFile.get(), "FileHandler::impl_writeString_nothrow: no file!" );
+ OSL_PRECOND(m_pFile, "FileHandler::impl_writeString_nothrow: no file!");
sal_uInt64 nBytesToWrite( _rEntry.getLength() );
sal_uInt64 nBytesWritten( 0 );
@@ -304,7 +304,7 @@ namespace logging
void SAL_CALL FileHandler::flush( )
{
MethodGuard aGuard( *this );
- if(!m_pFile.get())
+ if (!m_pFile)
{
OSL_PRECOND(false, "FileHandler::flush: no file!");
return;
diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx
index bd7cbe3ed117..ea8f9924e1bc 100644
--- a/extensions/source/propctrlr/cellbindinghandler.cxx
+++ b/extensions/source/propctrlr/cellbindinghandler.cxx
@@ -100,8 +100,9 @@ namespace pcr
{
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
- OSL_PRECOND( m_pHelper.get(), "CellBindingPropertyHandler::actuatingPropertyChanged: inconsistentcy!" );
- // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
+ OSL_PRECOND(m_pHelper,
+ "CellBindingPropertyHandler::actuatingPropertyChanged: inconsistentcy!");
+ // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
OSL_PRECOND( _rxInspectorUI.is(), "FormComponentPropertyHandler::actuatingPropertyChanged: no access to the UI!" );
if ( !_rxInspectorUI.is() )
@@ -229,8 +230,8 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "CellBindingPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(m_pHelper, "CellBindingPropertyHandler::getPropertyValue: inconsistency!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
switch ( nPropId )
@@ -275,8 +276,8 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "CellBindingPropertyHandler::setPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(m_pHelper, "CellBindingPropertyHandler::setPropertyValue: inconsistency!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
try
{
@@ -347,8 +348,10 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
Any aPropertyValue;
- OSL_ENSURE( m_pHelper.get(), "CellBindingPropertyHandler::convertToPropertyValue: we have no SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(
+ m_pHelper,
+ "CellBindingPropertyHandler::convertToPropertyValue: we have no SupportedProperties!");
+ if (!m_pHelper)
return aPropertyValue;
PropertyId nPropId( m_pInfoService->getPropertyId( _rPropertyName ) );
@@ -396,8 +399,10 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
Any aControlValue;
- OSL_ENSURE( m_pHelper.get(), "CellBindingPropertyHandler::convertToControlValue: we have no SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(
+ m_pHelper,
+ "CellBindingPropertyHandler::convertToControlValue: we have no SupportedProperties!");
+ if (!m_pHelper)
return aControlValue;
PropertyId nPropId( m_pInfoService->getPropertyId( _rPropertyName ) );
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index 60ae7318cf09..b099b3250822 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -99,8 +99,10 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "EFormsPropertyHandler::getPropertyValue: we don't have any SupportedProperties!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(
+ m_pHelper,
+ "EFormsPropertyHandler::getPropertyValue: we don't have any SupportedProperties!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
try
@@ -157,8 +159,10 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "EFormsPropertyHandler::setPropertyValue: we don't have any SupportedProperties!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(
+ m_pHelper,
+ "EFormsPropertyHandler::setPropertyValue: we don't have any SupportedProperties!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
try
{
@@ -283,7 +287,7 @@ namespace pcr
{
std::vector< Property > aProperties;
- if ( m_pHelper.get() )
+ if (m_pHelper)
{
if ( m_pHelper->canBindToAnyDataType() )
{
@@ -315,8 +319,10 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
Any aReturn;
- OSL_ENSURE( m_pHelper.get(), "EFormsPropertyHandler::convertToPropertyValue: we have no SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(
+ m_pHelper,
+ "EFormsPropertyHandler::convertToPropertyValue: we have no SupportedProperties!");
+ if (!m_pHelper)
return aReturn;
PropertyId nPropId( m_pInfoService->getPropertyId( _rPropertyName ) );
@@ -348,8 +354,9 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
Any aReturn;
- OSL_ENSURE( m_pHelper.get(), "EFormsPropertyHandler::convertToControlValue: we have no SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(m_pHelper,
+ "EFormsPropertyHandler::convertToControlValue: we have no SupportedProperties!");
+ if (!m_pHelper)
return aReturn;
PropertyId nPropId( m_pInfoService->getPropertyId( _rPropertyName ) );
@@ -379,7 +386,7 @@ namespace pcr
Sequence< OUString > SAL_CALL EFormsPropertyHandler::getActuatingProperties( )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
return Sequence< OUString >();
std::vector< OUString > aInterestedInActuations( 2 );
@@ -392,7 +399,7 @@ namespace pcr
Sequence< OUString > SAL_CALL EFormsPropertyHandler::getSupersededProperties( )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
return Sequence< OUString >();
Sequence<OUString> aReturn { PROPERTY_INPUT_REQUIRED };
@@ -406,7 +413,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
if ( !_rxControlFactory.is() )
throw NullPointerException();
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
throw RuntimeException();
LineDescriptor aDescriptor;
@@ -417,7 +424,7 @@ namespace pcr
{
case PROPERTY_ID_LIST_BINDING:
nControlType = PropertyControlType::ListBox;
- m_pHelper.get()->getAllElementUINames( EFormsHelper::Binding, aListEntries, true );
+ m_pHelper->getAllElementUINames(EFormsHelper::Binding, aListEntries, true);
break;
case PROPERTY_ID_XML_DATA_MODEL:
@@ -472,8 +479,9 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( m_pHelper.get(), "EFormsPropertyHandler::onInteractivePropertySelection: we do not have any SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(m_pHelper, "EFormsPropertyHandler::onInteractivePropertySelection: we do not "
+ "have any SupportedProperties!");
+ if (!m_pHelper)
return InteractiveSelectionResult_Cancelled;
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
@@ -528,7 +536,7 @@ namespace pcr
{
::osl::MutexGuard aGuard( m_aMutex );
EFormsPropertyHandler_Base::addPropertyChangeListener( _rxListener );
- if ( m_pHelper.get() )
+ if (m_pHelper)
m_pHelper->registerBindingListener( _rxListener );
}
@@ -536,7 +544,7 @@ namespace pcr
void SAL_CALL EFormsPropertyHandler::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( m_pHelper.get() )
+ if (m_pHelper)
m_pHelper->revokeBindingListener( _rxListener );
EFormsPropertyHandler_Base::removePropertyChangeListener( _rxListener );
}
@@ -549,8 +557,8 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
- OSL_PRECOND( m_pHelper.get(), "EFormsPropertyHandler::actuatingPropertyChanged: inconsistentcy!" );
- // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
+ OSL_PRECOND(m_pHelper, "EFormsPropertyHandler::actuatingPropertyChanged: inconsistentcy!");
+ // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
DBG_ASSERT( _rxInspectorUI.is(), "EFormsPropertyHandler::actuatingPropertyChanged: invalid callback!" );
if ( !_rxInspectorUI.is() )
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 24c2531a2953..6aeaffd78d88 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2523,7 +2523,8 @@ namespace pcr
bool FormComponentPropertyHandler::impl_dialogListSelection_nothrow( const OUString& _rProperty, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
- OSL_PRECOND( m_pInfoService.get(), "FormComponentPropertyHandler::impl_dialogListSelection_nothrow: no property meta data!" );
+ OSL_PRECOND(m_pInfoService, "FormComponentPropertyHandler::impl_dialogListSelection_"
+ "nothrow: no property meta data!");
OUString sPropertyUIName( m_pInfoService->getPropertyTranslation( m_pInfoService->getPropertyId( _rProperty ) ) );
ListSelectionDialog aDialog(impl_getDefaultDialogFrame_nothrow(), m_xComponent, _rProperty, sPropertyUIName);
diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx
index 3da1c29f5650..5c319fc119ff 100644
--- a/extensions/source/propctrlr/inspectormodelbase.cxx
+++ b/extensions/source/propctrlr/inspectormodelbase.cxx
@@ -137,7 +137,7 @@ namespace pcr
::cppu::IPropertyArrayHelper& InspectorModelProperties::getInfoHelper()
{
::osl::MutexGuard aGuard( m_rMutex );
- if ( m_pPropertyInfo.get() == nullptr )
+ if (m_pPropertyInfo == nullptr)
{
Sequence< Property > aProperties;
describeProperties( aProperties );
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 29a12cf9a249..2ae98b20f8dd 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -861,7 +861,7 @@ namespace pcr
impl_toggleInspecteeListening_nothrow( false );
// handlers are obsolete, so is our "composer" for their UI requests
- if ( m_pUIRequestComposer.get() )
+ if (m_pUIRequestComposer)
m_pUIRequestComposer->dispose();
m_pUIRequestComposer.reset();
diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx
index 19d5230ee274..e37313db1f6e 100644
--- a/extensions/source/propctrlr/propertycomposer.cxx
+++ b/extensions/source/propctrlr/propertycomposer.cxx
@@ -356,10 +356,12 @@ namespace pcr
void PropertyComposer::impl_ensureUIRequestComposer( const Reference< XObjectInspectorUI >& _rxInspectorUI )
{
- OSL_ENSURE( !m_pUIRequestComposer.get() || m_pUIRequestComposer->getDelegatorUI().get() == _rxInspectorUI.get(),
- "PropertyComposer::impl_ensureUIRequestComposer: somebody's changing the horse in the mid of the race!" );
+ OSL_ENSURE(!m_pUIRequestComposer
+ || m_pUIRequestComposer->getDelegatorUI().get() == _rxInspectorUI.get(),
+ "PropertyComposer::impl_ensureUIRequestComposer: somebody's changing the horse "
+ "in the mid of the race!");
- if ( !m_pUIRequestComposer.get() )
+ if (!m_pUIRequestComposer)
m_pUIRequestComposer.reset( new ComposedPropertyUIUpdate( _rxInspectorUI, this ) );
}
@@ -410,7 +412,7 @@ namespace pcr
clearContainer( m_aSlaveHandlers );
- if ( m_pUIRequestComposer.get() )
+ if (m_pUIRequestComposer)
m_pUIRequestComposer->dispose();
m_pUIRequestComposer.reset();
}
diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx
index 164815bbf554..191c17451dbd 100644
--- a/extensions/source/propctrlr/submissionhandler.cxx
+++ b/extensions/source/propctrlr/submissionhandler.cxx
@@ -122,8 +122,8 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "SubmissionPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(m_pHelper, "SubmissionPropertyHandler::getPropertyValue: inconsistency!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
try
@@ -171,8 +171,8 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "SubmissionPropertyHandler::setPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(m_pHelper, "SubmissionPropertyHandler::setPropertyValue: inconsistency!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
try
{
@@ -212,7 +212,7 @@ namespace pcr
Sequence< OUString > SAL_CALL SubmissionPropertyHandler::getActuatingProperties( )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
return Sequence< OUString >();
Sequence<OUString> aReturn { PROPERTY_XFORMS_BUTTONTYPE };
@@ -223,7 +223,7 @@ namespace pcr
Sequence< OUString > SAL_CALL SubmissionPropertyHandler::getSupersededProperties( )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
return Sequence< OUString >();
Sequence< OUString > aReturn( 3 );
@@ -262,7 +262,7 @@ namespace pcr
Sequence< Property > SubmissionPropertyHandler::doDescribeSupportedProperties() const
{
std::vector< Property > aProperties;
- if ( m_pHelper.get() )
+ if (m_pHelper)
{
implAddPropertyDescription( aProperties, PROPERTY_SUBMISSION_ID, cppu::UnoType<submission::XSubmission>::get() );
implAddPropertyDescription( aProperties, PROPERTY_XFORMS_BUTTONTYPE, ::cppu::UnoType<FormButtonType>::get() );
@@ -279,7 +279,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
if ( !_rxControlFactory.is() )
throw NullPointerException();
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
throw RuntimeException();
std::vector< OUString > aListEntries;
@@ -287,7 +287,7 @@ namespace pcr
switch ( nPropId )
{
case PROPERTY_ID_SUBMISSION_ID:
- m_pHelper.get()->getAllElementUINames( EFormsHelper::Submission, aListEntries, false );
+ m_pHelper->getAllElementUINames(EFormsHelper::Submission, aListEntries, false);
break;
case PROPERTY_ID_XFORMS_BUTTONTYPE:
@@ -320,8 +320,9 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
- OSL_PRECOND( m_pHelper.get(), "SubmissionPropertyHandler::actuatingPropertyChanged: inconsistentcy!" );
- // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
+ OSL_PRECOND(m_pHelper,
+ "SubmissionPropertyHandler::actuatingPropertyChanged: inconsistentcy!");
+ // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
switch ( nActuatingPropId )
{
@@ -344,8 +345,10 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
Any aPropertyValue;
- OSL_ENSURE( m_pHelper.get(), "SubmissionPropertyHandler::convertToPropertyValue: we have no SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(
+ m_pHelper,
+ "SubmissionPropertyHandler::convertToPropertyValue: we have no SupportedProperties!");
+ if (!m_pHelper)
return aPropertyValue;
OUString sControlValue;
@@ -383,8 +386,10 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
Any aControlValue;
- OSL_ENSURE( m_pHelper.get(), "SubmissionPropertyHandler::convertToControlValue: we have no SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(
+ m_pHelper,
+ "SubmissionPropertyHandler::convertToControlValue: we have no SupportedProperties!");
+ if (!m_pHelper)
return aControlValue;
OSL_ENSURE( _rControlValueType.getTypeClass() == TypeClass_STRING,
diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
index ec4d6c9f914a..ae2b5a0f9c2d 100644
--- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
+++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
@@ -103,8 +103,8 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "XSDValidationPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(m_pHelper, "XSDValidationPropertyHandler::getPropertyValue: inconsistency!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType();
@@ -133,8 +133,8 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
- OSL_ENSURE( m_pHelper.get(), "XSDValidationPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
+ OSL_ENSURE(m_pHelper, "XSDValidationPropertyHandler::getPropertyValue: inconsistency!");
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
if ( PROPERTY_ID_XSD_DATA_TYPE == nPropId )
{
@@ -174,7 +174,7 @@ namespace pcr
{
std::vector< Property > aProperties;
- if ( m_pHelper.get() )
+ if (m_pHelper)
{
bool bAllowBinding = m_pHelper->canBindToAnyDataType();
@@ -228,7 +228,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
std::vector< OUString > aSuperfluous;
- if ( m_pHelper.get() )
+ if (m_pHelper)
{
aSuperfluous.push_back( OUString(PROPERTY_CONTROLSOURCE) );
aSuperfluous.push_back( OUString(PROPERTY_EMPTY_IS_NULL) );
@@ -262,7 +262,7 @@ namespace pcr
{
::osl::MutexGuard aGuard( m_aMutex );
std::vector< OUString > aInterestedInActuations;
- if ( m_pHelper.get() )
+ if (m_pHelper)
{
aInterestedInActuations.push_back( OUString(PROPERTY_XSD_DATA_TYPE) );
aInterestedInActuations.push_back( OUString(PROPERTY_XML_DATA_MODEL) );
@@ -289,7 +289,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
if ( !_rxControlFactory.is() )
throw NullPointerException();
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
throw RuntimeException();
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
@@ -424,8 +424,9 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( m_pHelper.get(), "XSDValidationPropertyHandler::onInteractivePropertySelection: we don't have any SupportedProperties!" );
- if ( !m_pHelper.get() )
+ OSL_ENSURE(m_pHelper, "XSDValidationPropertyHandler::onInteractivePropertySelection: we "
+ "don't have any SupportedProperties!");
+ if (!m_pHelper)
return InteractiveSelectionResult_Cancelled;
PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
@@ -460,7 +461,7 @@ namespace pcr
{
::osl::MutexGuard aGuard( m_aMutex );
XSDValidationPropertyHandler_Base::addPropertyChangeListener( _rxListener );
- if ( m_pHelper.get() )
+ if (m_pHelper)
m_pHelper->registerBindingListener( _rxListener );
}
@@ -468,7 +469,7 @@ namespace pcr
void SAL_CALL XSDValidationPropertyHandler::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( m_pHelper.get() )
+ if (m_pHelper)
m_pHelper->revokeBindingListener( _rxListener );
XSDValidationPropertyHandler_Base::removePropertyChangeListener( _rxListener );
}
@@ -476,7 +477,9 @@ namespace pcr
bool XSDValidationPropertyHandler::implPrepareCloneDataCurrentType( OUString& _rNewName )
{
- OSL_PRECOND( m_pHelper.get(), "XSDValidationPropertyHandler::implPrepareCloneDataCurrentType: this will crash!" );
+ OSL_PRECOND(
+ m_pHelper,
+ "XSDValidationPropertyHandler::implPrepareCloneDataCurrentType: this will crash!");
::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType();
if ( !pType.is() )
@@ -499,7 +502,8 @@ namespace pcr
void XSDValidationPropertyHandler::implDoCloneCurrentDataType( const OUString& _rNewName )
{
- OSL_PRECOND( m_pHelper.get(), "XSDValidationPropertyHandler::implDoCloneCurrentDataType: this will crash!" );
+ OSL_PRECOND(m_pHelper,
+ "XSDValidationPropertyHandler::implDoCloneCurrentDataType: this will crash!");
::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType();
if ( !pType.is() )
@@ -513,7 +517,9 @@ namespace pcr
bool XSDValidationPropertyHandler::implPrepareRemoveCurrentDataType()
{
- OSL_PRECOND( m_pHelper.get(), "XSDValidationPropertyHandler::implPrepareRemoveCurrentDataType: this will crash!" );
+ OSL_PRECOND(
+ m_pHelper,
+ "XSDValidationPropertyHandler::implPrepareRemoveCurrentDataType: this will crash!");
::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType();
if ( !pType.is() )
@@ -537,7 +543,8 @@ namespace pcr
bool XSDValidationPropertyHandler::implDoRemoveCurrentDataType()
{
- OSL_PRECOND( m_pHelper.get(), "XSDValidationPropertyHandler::implDoRemoveCurrentDataType: this will crash!" );
+ OSL_PRECOND(m_pHelper,
+ "XSDValidationPropertyHandler::implDoRemoveCurrentDataType: this will crash!");
::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType();
if ( !pType.is() )
@@ -562,7 +569,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
- if ( !m_pHelper.get() )
+ if (!m_pHelper)
throw RuntimeException();
// if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
@@ -647,7 +654,9 @@ namespace pcr
void XSDValidationPropertyHandler::implGetAvailableDataTypeNames( std::vector< OUString >& /* [out] */ _rNames ) const
{
- OSL_PRECOND( m_pHelper.get(), "XSDValidationPropertyHandler::implGetAvailableDataTypeNames: this will crash!" );
+ OSL_PRECOND(
+ m_pHelper,
+ "XSDValidationPropertyHandler::implGetAvailableDataTypeNames: this will crash!");
// start with *all* types which are available at the model
std::vector< OUString > aAllTypes;
m_pHelper->getAvailableDataTypeNames( aAllTypes );
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index a73033579796..d23384b868a3 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -892,7 +892,7 @@ void SaneDlg::AcquirePreview()
mrSane.SetOptionValue( nOption, true );
rtl::Reference<BitmapTransporter> xTransporter(new BitmapTransporter);
- if( ! mrSane.Start( *xTransporter.get() ) )
+ if (!mrSane.Start(*xTransporter))
{
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Warning, VclButtonsType::Ok,
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index 32f3b4875423..3e86885fa621 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -283,7 +283,7 @@ void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & )
void UpdateCheckJob::terminateAndJoinThread()
{
- if ( m_pInitThread.get() != nullptr )
+ if (m_pInitThread != nullptr)
{
m_pInitThread->setTerminating();
m_pInitThread->join();