loplugin:salbool: Automatic rewrite of sal_False/True

Change-Id: Ief96e7038461f514d8fe5bf16b7181b122715775
This commit is contained in:
Stephan Bergmann 2016-04-20 17:16:53 +02:00
parent 4bff11d579
commit 2ee796ba49
27 changed files with 97 additions and 97 deletions

View File

@ -129,7 +129,7 @@ namespace abp
// User has one chance to accept it or not. // User has one chance to accept it or not.
// (or he can start it again by using wizard-menu!) // (or he can start it again by using wizard-menu!)
// So we should deregister it on our general job execution service by using right protocol parameters. // So we should deregister it on our general job execution service by using right protocol parameters.
css::uno::Sequence< css::beans::NamedValue > lProtocol { { "Deactivate", css::uno::makeAny( sal_True ) } }; css::uno::Sequence< css::beans::NamedValue > lProtocol { { "Deactivate", css::uno::makeAny( true ) } };
return makeAny( lProtocol ); return makeAny( lProtocol );
} }

View File

@ -154,8 +154,8 @@ namespace bib
m_xControlContainer->addControl("GridControl", m_xControl); m_xControlContainer->addControl("GridControl", m_xControl);
m_xGridWin.set(m_xControl, UNO_QUERY ); m_xGridWin.set(m_xControl, UNO_QUERY );
m_xDispatchProviderInterception.set(m_xControl, UNO_QUERY ); m_xDispatchProviderInterception.set(m_xControl, UNO_QUERY );
m_xGridWin->setVisible( sal_True ); m_xGridWin->setVisible( true );
m_xControl->setDesignMode( sal_True ); m_xControl->setDesignMode( true );
// initially switch on the design mode - switch it off _after_ loading the form // initially switch on the design mode - switch it off _after_ loading the form
::Size aSize = GetOutputSizePixel(); ::Size aSize = GetOutputSizePixel();

View File

@ -296,7 +296,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, const OUSt
if (pParentComponent) if (pParentComponent)
{ {
// not earlier because SetFocus() is triggered in setVisible() // not earlier because SetFocus() is triggered in setVisible()
pParentComponent->setVisible(sal_True); pParentComponent->setVisible(true);
} }
m_xDatMan->load(); m_xDatMan->load();

View File

@ -688,7 +688,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
const OUString sType("Type"); const OUString sType("Type");
sal_Int32 nType = 0; sal_Int32 nType = 0;
bool bIsFormatted = false; bool bIsFormatted = false;
sal_Bool bFormattedIsNumeric = sal_True; sal_Bool bFormattedIsNumeric = true;
xField->getPropertyValue(sType) >>= nType; xField->getPropertyValue(sType) >>= nType;
switch(nType) switch(nType)
{ {
@ -708,7 +708,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
case DataType::LONGVARCHAR: case DataType::LONGVARCHAR:
case DataType::CHAR: case DataType::CHAR:
case DataType::CLOB: case DataType::CLOB:
bFormattedIsNumeric = sal_False; bFormattedIsNumeric = false;
// _NO_ break ! // _NO_ break !
default: default:
sCurrentModelType = "FormattedField"; sCurrentModelType = "FormattedField";
@ -884,7 +884,7 @@ void BibDataManager::setFilter(const OUString& rQuery)
OUString aQuery = m_xParser->getFilter(); OUString aQuery = m_xParser->getFilter();
Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW ); Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW );
xFormProps->setPropertyValue( "Filter", makeAny( aQuery ) ); xFormProps->setPropertyValue( "Filter", makeAny( aQuery ) );
xFormProps->setPropertyValue( "ApplyFilter", makeAny( sal_True ) ); xFormProps->setPropertyValue( "ApplyFilter", makeAny( true ) );
reload(); reload();
} }
catch (const Exception&) catch (const Exception&)
@ -1022,8 +1022,8 @@ void BibDataManager::setActiveDataSource(const OUString& rURL)
} }
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
util::URL aURL; util::URL aURL;
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.FeatureDescriptor = getActiveDataTable(); aEvent.FeatureDescriptor = getActiveDataTable();
aEvent.State = makeAny( getDataSources() ); aEvent.State = makeAny( getDataSources() );
@ -1369,7 +1369,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel(
xPropSet->setPropertyValue("StringItemList", aAny); xPropSet->setPropertyValue("StringItemList", aAny);
sal_Bool bTrue = sal_True; sal_Bool bTrue = true;
aAny.setValue( &bTrue, cppu::UnoType<bool>::get() ); aAny.setValue( &bTrue, cppu::UnoType<bool>::get() );
xPropSet->setPropertyValue( "Dropdown", aAny ); xPropSet->setPropertyValue( "Dropdown", aAny );
} }

View File

@ -218,7 +218,7 @@ void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & xArg
sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > & /*xModel*/ ) throw (css::uno::RuntimeException, std::exception) sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > & /*xModel*/ ) throw (css::uno::RuntimeException, std::exception)
{ {
return sal_False; return false;
} }
sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend ) throw (css::uno::RuntimeException, std::exception) sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend ) throw (css::uno::RuntimeException, std::exception)
@ -227,7 +227,7 @@ sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend ) throw (css::uno::
getFrame()->removeFrameActionListener( pImp ); getFrame()->removeFrameActionListener( pImp );
else else
getFrame()->addFrameActionListener( pImp ); getFrame()->addFrameActionListener( pImp );
return sal_True; return true;
} }
uno::Any BibFrameController_Impl::getViewData() throw (css::uno::RuntimeException, std::exception) uno::Any BibFrameController_Impl::getViewData() throw (css::uno::RuntimeException, std::exception)
@ -452,8 +452,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
aEvent.FeatureURL = pObj->aURL; aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.Source = static_cast<XDispatch *>(this); aEvent.Source = static_cast<XDispatch *>(this);
pObj->xListener->statusChanged( aEvent ); pObj->xListener->statusChanged( aEvent );
//break; because there are more than one //break; because there are more than one
@ -504,7 +504,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
aEvent.FeatureURL = pObj->aURL; aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = !pDatMan->getParser()->getFilter().isEmpty(); aEvent.IsEnabled = !pDatMan->getParser()->getFilter().isEmpty();
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.Source = static_cast<XDispatch *>(this); aEvent.Source = static_cast<XDispatch *>(this);
pObj->xListener->statusChanged( aEvent ); pObj->xListener->statusChanged( aEvent );
} }
@ -648,22 +648,22 @@ void BibFrameController_Impl::addStatusListener(
// send first status synchronously // send first status synchronously
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
aEvent.FeatureURL = aURL; aEvent.FeatureURL = aURL;
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.Source = static_cast<XDispatch *>(this); aEvent.Source = static_cast<XDispatch *>(this);
if ( aURL.Path == "StatusBarVisible" ) if ( aURL.Path == "StatusBarVisible" )
{ {
aEvent.IsEnabled = sal_False; aEvent.IsEnabled = false;
aEvent.State <<= false; aEvent.State <<= false;
} }
else if ( aURL.Path == "Bib/hierarchical" ) else if ( aURL.Path == "Bib/hierarchical" )
{ {
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
const char* pHier = bHierarchical? "" : "*" ; const char* pHier = bHierarchical? "" : "*" ;
aEvent.State <<= OUString::createFromAscii(pHier); aEvent.State <<= OUString::createFromAscii(pHier);
} }
else if(aURL.Path == "Bib/MenuFilter") else if(aURL.Path == "Bib/MenuFilter")
{ {
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.FeatureDescriptor=pDatMan->getQueryField(); aEvent.FeatureDescriptor=pDatMan->getQueryField();
uno::Sequence<OUString> aStringSeq=pDatMan->getQueryFields(); uno::Sequence<OUString> aStringSeq=pDatMan->getQueryFields();
@ -672,7 +672,7 @@ void BibFrameController_Impl::addStatusListener(
} }
else if ( aURL.Path == "Bib/source") else if ( aURL.Path == "Bib/source")
{ {
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.FeatureDescriptor=pDatMan->getActiveDataTable(); aEvent.FeatureDescriptor=pDatMan->getActiveDataTable();
uno::Sequence<OUString> aStringSeq=pDatMan->getDataSources(); uno::Sequence<OUString> aStringSeq=pDatMan->getDataSources();
@ -683,11 +683,11 @@ void BibFrameController_Impl::addStatusListener(
aURL.Path == "Bib/autoFilter" || aURL.Path == "Bib/autoFilter" ||
aURL.Path == "Bib/standardFilter" ) aURL.Path == "Bib/standardFilter" )
{ {
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
} }
else if(aURL.Path == "Bib/query") else if(aURL.Path == "Bib/query")
{ {
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.State <<= pConfig->getQueryText(); aEvent.State <<= pConfig->getQueryText();
} }
else if (aURL.Path == "Bib/removeFilter" ) else if (aURL.Path == "Bib/removeFilter" )
@ -711,7 +711,7 @@ void BibFrameController_Impl::addStatusListener(
} }
else if(aURL.Path == "Paste" ) else if(aURL.Path == "Paste" )
{ {
aEvent.IsEnabled = sal_False; aEvent.IsEnabled = false;
vcl::Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) ); vcl::Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) );
if(pChild) if(pChild)
{ {
@ -809,8 +809,8 @@ void BibFrameController_Impl::RemoveFilter()
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
aEvent.FeatureURL = pObj->aURL; aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_False; aEvent.IsEnabled = false;
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.Source = static_cast<XDispatch *>(this); aEvent.Source = static_cast<XDispatch *>(this);
pObj->xListener->statusChanged( aEvent ); pObj->xListener->statusChanged( aEvent );
bRemoveFilter=true; bRemoveFilter=true;
@ -819,8 +819,8 @@ void BibFrameController_Impl::RemoveFilter()
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
aEvent.FeatureURL = pObj->aURL; aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.Source = static_cast<XDispatch *>(this); aEvent.Source = static_cast<XDispatch *>(this);
aEvent.State <<= aQuery; aEvent.State <<= aQuery;
pObj->xListener->statusChanged( aEvent ); pObj->xListener->statusChanged( aEvent );
@ -869,8 +869,8 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
aEvent.FeatureURL = pObj->aURL; aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.Source = static_cast<XDispatch *>(this); aEvent.Source = static_cast<XDispatch *>(this);
aEvent.FeatureDescriptor=pDatMan->getQueryField(); aEvent.FeatureDescriptor=pDatMan->getQueryField();
@ -884,8 +884,8 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
aEvent.FeatureURL = pObj->aURL; aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True; aEvent.IsEnabled = true;
aEvent.Requery = sal_False; aEvent.Requery = false;
aEvent.Source = static_cast<XDispatch *>(this); aEvent.Source = static_cast<XDispatch *>(this);
BibConfig* pConfig = BibModul::GetConfig(); BibConfig* pConfig = BibModul::GetConfig();
aEvent.State <<= pConfig->getQueryText(); aEvent.State <<= pConfig->getQueryText();

View File

@ -499,8 +499,8 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
break; break;
} }
// initially switch on the design mode - switch it off _after_ loading the form // initially switch on the design mode - switch it off _after_ loading the form
xCtrWin->setVisible( sal_True ); xCtrWin->setVisible( true );
xControl->setDesignMode( sal_True ); xControl->setDesignMode( true );
vcl::Window* pWindow = VCLUnoHelper::GetWindow(xControl->getPeer()); vcl::Window* pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
pWindow->set_grid_top_attach(rLabel.get_grid_top_attach()); pWindow->set_grid_top_attach(rLabel.get_grid_top_attach());

View File

@ -222,14 +222,14 @@ namespace logging
OString sEntry; OString sEntry;
if ( !m_aHandlerHelper.formatForPublishing( _rRecord, sEntry ) ) if ( !m_aHandlerHelper.formatForPublishing( _rRecord, sEntry ) )
return sal_False; return false;
if ( _rRecord.Level >= m_nThreshold ) if ( _rRecord.Level >= m_nThreshold )
fprintf( stderr, "%s\n", sEntry.getStr() ); fprintf( stderr, "%s\n", sEntry.getStr() );
else else
fprintf( stdout, "%s\n", sEntry.getStr() ); fprintf( stdout, "%s\n", sEntry.getStr() );
return sal_True; return true;
} }
OUString SAL_CALL ConsoleHandler::getImplementationName() throw(RuntimeException, std::exception) OUString SAL_CALL ConsoleHandler::getImplementationName() throw(RuntimeException, std::exception)

View File

@ -322,14 +322,14 @@ namespace logging
MethodGuard aGuard( *this ); MethodGuard aGuard( *this );
if ( !impl_prepareFile_nothrow() ) if ( !impl_prepareFile_nothrow() )
return sal_False; return false;
OString sEntry; OString sEntry;
if ( !m_aHandlerHelper.formatForPublishing( _rRecord, sEntry ) ) if ( !m_aHandlerHelper.formatForPublishing( _rRecord, sEntry ) )
return sal_False; return false;
impl_writeString_nothrow( sEntry ); impl_writeString_nothrow( sEntry );
return sal_True; return true;
} }
OUString SAL_CALL FileHandler::getImplementationName() throw(RuntimeException, std::exception) OUString SAL_CALL FileHandler::getImplementationName() throw(RuntimeException, std::exception)

View File

@ -614,7 +614,7 @@ namespace pcr
OSL_ENSURE( xHelper.is(), "EFormsHelper::getModelElementUIName: invalid element or model!" ); OSL_ENSURE( xHelper.is(), "EFormsHelper::getModelElementUIName: invalid element or model!" );
if ( xHelper.is() ) if ( xHelper.is() )
{ {
OUString sElementName = ( _eType == Submission ) ? xHelper->getSubmissionName( _rxElement, sal_True ) : xHelper->getBindingName( _rxElement, sal_True ); OUString sElementName = ( _eType == Submission ) ? xHelper->getSubmissionName( _rxElement, true ) : xHelper->getBindingName( _rxElement, true );
Reference< xforms::XModel > xModel( xHelper, UNO_QUERY_THROW ); Reference< xforms::XModel > xModel( xHelper, UNO_QUERY_THROW );
sUIName = composeModelElementUIName( xModel->getID(), sElementName ); sUIName = composeModelElementUIName( xModel->getID(), sElementName );
} }
@ -686,7 +686,7 @@ namespace pcr
xElement->setPropertyValue( PROPERTY_MODEL, makeAny( xModel ) ); xElement->setPropertyValue( PROPERTY_MODEL, makeAny( xModel ) );
} }
#endif #endif
OUString sElementName = ( _eType == Submission ) ? xHelper->getSubmissionName( xElement, sal_True ) : xHelper->getBindingName( xElement, sal_True ); OUString sElementName = ( _eType == Submission ) ? xHelper->getSubmissionName( xElement, true ) : xHelper->getBindingName( xElement, true );
OUString sUIName = composeModelElementUIName( *pModelName, sElementName ); OUString sUIName = composeModelElementUIName( *pModelName, sElementName );
OSL_ENSURE( rMapUINameToElement.find( sUIName ) == rMapUINameToElement.end(), "EFormsHelper::getAllElementUINames: duplicate name!" ); OSL_ENSURE( rMapUINameToElement.find( sUIName ) == rMapUINameToElement.end(), "EFormsHelper::getAllElementUINames: duplicate name!" );

View File

@ -459,7 +459,7 @@ namespace pcr
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, false, true ); aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, false, true );
break; break;
default: default:
aDescriptor.Control = _rxControlFactory->createPropertyControl( nControlType, sal_False ); aDescriptor.Control = _rxControlFactory->createPropertyControl( nControlType, false );
break; break;
} }

View File

@ -781,21 +781,21 @@ namespace pcr
LineDescriptor aDescriptor; LineDescriptor aDescriptor;
aDescriptor.Control = _rxControlFactory->createPropertyControl( PropertyControlType::TextField, sal_True ); aDescriptor.Control = _rxControlFactory->createPropertyControl( PropertyControlType::TextField, true );
Reference< XEventListener > xControlExtender = new PropertyControlExtender( aDescriptor.Control ); Reference< XEventListener > xControlExtender = new PropertyControlExtender( aDescriptor.Control );
const EventDescription& rEvent = impl_getEventForName_throw( _rPropertyName ); const EventDescription& rEvent = impl_getEventForName_throw( _rPropertyName );
aDescriptor.DisplayName = rEvent.sDisplayName; aDescriptor.DisplayName = rEvent.sDisplayName;
aDescriptor.HelpURL = HelpIdUrl::getHelpURL( rEvent.sHelpId ); aDescriptor.HelpURL = HelpIdUrl::getHelpURL( rEvent.sHelpId );
aDescriptor.PrimaryButtonId = OStringToOUString(rEvent.sUniqueBrowseId, RTL_TEXTENCODING_UTF8); aDescriptor.PrimaryButtonId = OStringToOUString(rEvent.sUniqueBrowseId, RTL_TEXTENCODING_UTF8);
aDescriptor.HasPrimaryButton = sal_True; aDescriptor.HasPrimaryButton = true;
aDescriptor.Category = "Events"; aDescriptor.Category = "Events";
return aDescriptor; return aDescriptor;
} }
sal_Bool SAL_CALL EventHandler::isComposable( const OUString& /*_rPropertyName*/ ) throw (UnknownPropertyException, RuntimeException, std::exception) sal_Bool SAL_CALL EventHandler::isComposable( const OUString& /*_rPropertyName*/ ) throw (UnknownPropertyException, RuntimeException, std::exception)
{ {
return sal_False; return false;
} }
InteractiveSelectionResult SAL_CALL EventHandler::onInteractivePropertySelection( const OUString& _rPropertyName, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& _rxInspectorUI ) throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception) InteractiveSelectionResult SAL_CALL EventHandler::onInteractivePropertySelection( const OUString& _rPropertyName, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& _rxInspectorUI ) throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception)
@ -888,7 +888,7 @@ namespace pcr
sal_Bool SAL_CALL EventHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException, std::exception) sal_Bool SAL_CALL EventHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException, std::exception)
{ {
return sal_True; return true;
} }
Reference< XFrame > EventHandler::impl_getContextFrame_nothrow() const Reference< XFrame > EventHandler::impl_getContextFrame_nothrow() const

View File

@ -1223,7 +1223,7 @@ namespace pcr
} }
} }
Optional< double > aValueNotPresent( sal_False, 0 ); Optional< double > aValueNotPresent( false, 0 );
aDescriptor.Control = PropertyHandlerHelper::createNumericControl( aDescriptor.Control = PropertyHandlerHelper::createNumericControl(
_rxControlFactory, nDigits, aValueNotPresent, aValueNotPresent, false ); _rxControlFactory, nDigits, aValueNotPresent, aValueNotPresent, false );
@ -1312,8 +1312,8 @@ namespace pcr
OTimeDurationControl* pControl = new OTimeDurationControl( impl_getDefaultDialogParent_nothrow(), WB_BORDER | WB_TABSTOP ); OTimeDurationControl* pControl = new OTimeDurationControl( impl_getDefaultDialogParent_nothrow(), WB_BORDER | WB_TABSTOP );
aDescriptor.Control = pControl; aDescriptor.Control = pControl;
pControl->setMinValue( Optional< double >( sal_True, 0 ) ); pControl->setMinValue( Optional< double >( true, 0 ) );
pControl->setMaxValue( Optional< double >( sal_True, ::std::numeric_limits< double >::max() ) ); pControl->setMaxValue( Optional< double >( true, ::std::numeric_limits< double >::max() ) );
} }
break; break;
@ -1325,8 +1325,8 @@ namespace pcr
case PROPERTY_ID_BLOCKINCREMENT: case PROPERTY_ID_BLOCKINCREMENT:
case PROPERTY_ID_SPININCREMENT: case PROPERTY_ID_SPININCREMENT:
{ {
Optional< double > aMinValue( sal_True, 0 ); Optional< double > aMinValue( true, 0 );
Optional< double > aMaxValue( sal_True, 0x7FFFFFFF ); Optional< double > aMaxValue( true, 0x7FFFFFFF );
if ( nPropId == PROPERTY_ID_MAXTEXTLEN || nPropId == PROPERTY_ID_BOUNDCOLUMN ) if ( nPropId == PROPERTY_ID_MAXTEXTLEN || nPropId == PROPERTY_ID_BOUNDCOLUMN )
aMinValue.Value = -1; aMinValue.Value = -1;
@ -1342,8 +1342,8 @@ namespace pcr
case PROPERTY_ID_DECIMAL_ACCURACY: case PROPERTY_ID_DECIMAL_ACCURACY:
{ {
Optional< double > aMinValue( sal_True, 0 ); Optional< double > aMinValue( true, 0 );
Optional< double > aMaxValue( sal_True, 20 ); Optional< double > aMaxValue( true, 20 );
aDescriptor.Control = PropertyHandlerHelper::createNumericControl( aDescriptor.Control = PropertyHandlerHelper::createNumericControl(
_rxControlFactory, 0, aMinValue, aMaxValue, false ); _rxControlFactory, 0, aMinValue, aMaxValue, false );
@ -1400,9 +1400,9 @@ namespace pcr
} }
if ( !aDescriptor.PrimaryButtonId.isEmpty() ) if ( !aDescriptor.PrimaryButtonId.isEmpty() )
aDescriptor.HasPrimaryButton = sal_True; aDescriptor.HasPrimaryButton = true;
if ( !aDescriptor.SecondaryButtonId.isEmpty() ) if ( !aDescriptor.SecondaryButtonId.isEmpty() )
aDescriptor.HasSecondaryButton = sal_True; aDescriptor.HasSecondaryButton = true;
bool bIsDataProperty = ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0; bool bIsDataProperty = ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0;
aDescriptor.Category = bIsDataProperty ? OUString("Data") : OUString("General"); aDescriptor.Category = bIsDataProperty ? OUString("Data") : OUString("General");
@ -2019,7 +2019,7 @@ namespace pcr
if ( _bSuspend ) if ( _bSuspend )
if ( m_xCommandDesigner.is() && m_xCommandDesigner->isActive() ) if ( m_xCommandDesigner.is() && m_xCommandDesigner->isActive() )
return m_xCommandDesigner->suspend(); return m_xCommandDesigner->suspend();
return sal_True; return true;
} }
@ -2475,7 +2475,7 @@ namespace pcr
break; break;
default: default:
_out_rProperty.Control = _rxControlFactory->createPropertyControl( PropertyControlType::MultiLineTextField, sal_False ); _out_rProperty.Control = _rxControlFactory->createPropertyControl( PropertyControlType::MultiLineTextField, false );
break; break;
} }
} }
@ -2571,7 +2571,7 @@ namespace pcr
switch( nListSourceType ) switch( nListSourceType )
{ {
case ListSourceType_VALUELIST: case ListSourceType_VALUELIST:
_out_rDescriptor.Control = _rxControlFactory->createPropertyControl( PropertyControlType::StringListField, sal_False ); _out_rDescriptor.Control = _rxControlFactory->createPropertyControl( PropertyControlType::StringListField, false );
break; break;
case ListSourceType_TABLEFIELDS: case ListSourceType_TABLEFIELDS:
@ -3208,12 +3208,12 @@ namespace pcr
const OUString* pToDisable = xCommandUI->getPropertiesToDisable(); const OUString* pToDisable = xCommandUI->getPropertiesToDisable();
while ( !pToDisable->isEmpty() ) while ( !pToDisable->isEmpty() )
{ {
m_xBrowserUI->enablePropertyUIElements( *pToDisable++, PropertyLineElement::All, sal_False ); m_xBrowserUI->enablePropertyUIElements( *pToDisable++, PropertyLineElement::All, false );
} }
// but enable the browse button for the property itself - so it can be used to raise the query designer // but enable the browse button for the property itself - so it can be used to raise the query designer
OUString sPropertyName( impl_getPropertyNameFromId_nothrow( _nDesignForProperty ) ); OUString sPropertyName( impl_getPropertyNameFromId_nothrow( _nDesignForProperty ) );
m_xBrowserUI->enablePropertyUIElements( sPropertyName, PropertyLineElement::PrimaryButton, sal_True ); m_xBrowserUI->enablePropertyUIElements( sPropertyName, PropertyLineElement::PrimaryButton, true );
} }
} }
catch( const Exception& ) catch( const Exception& )
@ -3239,7 +3239,7 @@ namespace pcr
const OUString* pToEnable = xCommandUI->getPropertiesToDisable(); const OUString* pToEnable = xCommandUI->getPropertiesToDisable();
while ( !pToEnable->isEmpty() ) while ( !pToEnable->isEmpty() )
{ {
m_xBrowserUI->enablePropertyUIElements( *pToEnable++, PropertyLineElement::All, sal_True ); m_xBrowserUI->enablePropertyUIElements( *pToEnable++, PropertyLineElement::All, true );
} }
} }
catch( const Exception& ) catch( const Exception& )

View File

@ -190,7 +190,7 @@ namespace pcr
getFastPropertyValue( rOldValue, nHandle ); getFastPropertyValue( rOldValue, nHandle );
rConvertedValue = rValue; rConvertedValue = rValue;
return sal_True; return true;
} }

View File

@ -454,8 +454,8 @@ namespace pcr
case PROPERTY_ID_POSITIONX: case PROPERTY_ID_POSITIONX:
case PROPERTY_ID_POSITIONY: case PROPERTY_ID_POSITIONY:
{ {
Optional< double > aZero( sal_True, 0 ); Optional< double > aZero( true, 0 );
Optional< double > aValueNotPresent( sal_False, 0 ); Optional< double > aValueNotPresent( false, 0 );
aLineDesc.Control = PropertyHandlerHelper::createNumericControl( aLineDesc.Control = PropertyHandlerHelper::createNumericControl(
_rxControlFactory, 2, bIsSize ? aZero : aValueNotPresent, aValueNotPresent, false ); _rxControlFactory, 2, bIsSize ? aZero : aValueNotPresent, aValueNotPresent, false );

View File

@ -597,7 +597,7 @@ namespace pcr
sal_Bool SAL_CALL GenericPropertyHandler::isComposable( const OUString& /*_rPropertyName*/ ) throw (UnknownPropertyException, RuntimeException, std::exception) sal_Bool SAL_CALL GenericPropertyHandler::isComposable( const OUString& /*_rPropertyName*/ ) throw (UnknownPropertyException, RuntimeException, std::exception)
{ {
return sal_False; return false;
} }
InteractiveSelectionResult SAL_CALL GenericPropertyHandler::onInteractivePropertySelection( const OUString& /*_rPropertyName*/, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/ ) throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception) InteractiveSelectionResult SAL_CALL GenericPropertyHandler::onInteractivePropertySelection( const OUString& /*_rPropertyName*/, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/ ) throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception)
@ -613,7 +613,7 @@ namespace pcr
sal_Bool SAL_CALL GenericPropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException, std::exception) sal_Bool SAL_CALL GenericPropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException, std::exception)
{ {
return sal_True; return true;
} }
void SAL_CALL GenericPropertyHandler::disposing() void SAL_CALL GenericPropertyHandler::disposing()

View File

@ -244,7 +244,7 @@ namespace pcr
try try
{ {
Reference< XModifiable > xDocumentModifiable( getContextDocument_throw(_rContext), UNO_QUERY_THROW ); Reference< XModifiable > xDocumentModifiable( getContextDocument_throw(_rContext), UNO_QUERY_THROW );
xDocumentModifiable->setModified( sal_True ); xDocumentModifiable->setModified( true );
} }
catch( const Exception& ) catch( const Exception& )
{ {

View File

@ -472,11 +472,11 @@ namespace pcr
{ // this means a "suspend" is to be "revoked" { // this means a "suspend" is to be "revoked"
suspendPropertyHandlers_nothrow( false ); suspendPropertyHandlers_nothrow( false );
// we ourself cannot revoke our suspend // we ourself cannot revoke our suspend
return sal_False; return false;
} }
if ( !suspendAll_nothrow() ) if ( !suspendAll_nothrow() )
return sal_False; return false;
// commit the editor's content // commit the editor's content
if ( haveView() ) if ( haveView() )
@ -486,7 +486,7 @@ namespace pcr
stopContainerWindowListening(); stopContainerWindowListening();
// outtahere // outtahere
return sal_True; return true;
} }

View File

@ -483,7 +483,7 @@ namespace pcr
do do
{ {
--loop; --loop;
(*loop)->suspend( sal_False ); (*loop)->suspend( false );
} }
while ( loop != m_aSlaveHandlers.begin() ); while ( loop != m_aSlaveHandlers.begin() );
} }

View File

@ -239,7 +239,7 @@ namespace pcr
sal_Bool SAL_CALL PropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException, std::exception) sal_Bool SAL_CALL PropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException, std::exception)
{ {
return sal_True; return true;
} }
IMPLEMENT_FORWARD_XCOMPONENT( PropertyHandler, PropertyHandler_Base ) IMPLEMENT_FORWARD_XCOMPONENT( PropertyHandler, PropertyHandler_Base )
@ -335,7 +335,7 @@ namespace pcr
{ {
Reference< XModifiable > xModifiable( impl_getContextDocument_nothrow(), UNO_QUERY ); Reference< XModifiable > xModifiable( impl_getContextDocument_nothrow(), UNO_QUERY );
if ( xModifiable.is() ) if ( xModifiable.is() )
xModifiable->setModified( sal_True ); xModifiable->setModified( true );
} }
bool PropertyHandler::impl_componentHasProperty_throw( const OUString& _rPropName ) const bool PropertyHandler::impl_componentHasProperty_throw( const OUString& _rPropName ) const

View File

@ -333,7 +333,7 @@ namespace pcr
// fallback: use the XCloseable::close (with all possible disadvantages) // fallback: use the XCloseable::close (with all possible disadvantages)
Reference< XCloseable > xClose( m_xDesigner->getFrame(), UNO_QUERY ); Reference< XCloseable > xClose( m_xDesigner->getFrame(), UNO_QUERY );
if ( xClose.is() ) if ( xClose.is() )
xClose->close( sal_True ); xClose->close( true );
} }
} }
catch( const Exception& ) catch( const Exception& )
@ -351,7 +351,7 @@ namespace pcr
bool bAllow = true; bool bAllow = true;
try try
{ {
bAllow = m_xDesigner->suspend( sal_True ); bAllow = m_xDesigner->suspend( true );
} }
catch( const Exception& ) catch( const Exception& )
{ {

View File

@ -500,11 +500,11 @@ namespace pcr
Optional< double > SAL_CALL ONumericControl::getMinValue() throw (RuntimeException, std::exception) Optional< double > SAL_CALL ONumericControl::getMinValue() throw (RuntimeException, std::exception)
{ {
Optional< double > aReturn( sal_True, 0 ); Optional< double > aReturn( true, 0 );
sal_Int64 minValue = getTypedControlWindow()->GetMin(); sal_Int64 minValue = getTypedControlWindow()->GetMin();
if ( minValue == ::std::numeric_limits< sal_Int64 >::min() ) if ( minValue == ::std::numeric_limits< sal_Int64 >::min() )
aReturn.IsPresent = sal_False; aReturn.IsPresent = false;
else else
aReturn.Value = (double)minValue; aReturn.Value = (double)minValue;
@ -523,11 +523,11 @@ namespace pcr
Optional< double > SAL_CALL ONumericControl::getMaxValue() throw (RuntimeException, std::exception) Optional< double > SAL_CALL ONumericControl::getMaxValue() throw (RuntimeException, std::exception)
{ {
Optional< double > aReturn( sal_True, 0 ); Optional< double > aReturn( true, 0 );
sal_Int64 maxValue = getTypedControlWindow()->GetMax(); sal_Int64 maxValue = getTypedControlWindow()->GetMax();
if ( maxValue == ::std::numeric_limits< sal_Int64 >::max() ) if ( maxValue == ::std::numeric_limits< sal_Int64 >::max() )
aReturn.IsPresent = sal_False; aReturn.IsPresent = false;
else else
aReturn.Value = (double)maxValue; aReturn.Value = (double)maxValue;

View File

@ -60,7 +60,7 @@ namespace pcr
virtual sal_Int32 SAL_CALL getGroupCount() throw( RuntimeException, std::exception ) override {return 0;} virtual sal_Int32 SAL_CALL getGroupCount() throw( RuntimeException, std::exception ) override {return 0;}
virtual void SAL_CALL getGroup(sal_Int32 /*nGroup*/, Sequence< Reference< XControlModel > >& /*Group*/, OUString& /*Name*/) throw( RuntimeException, std::exception ) override {} virtual void SAL_CALL getGroup(sal_Int32 /*nGroup*/, Sequence< Reference< XControlModel > >& /*Group*/, OUString& /*Name*/) throw( RuntimeException, std::exception ) override {}
virtual void SAL_CALL getGroupByName(const OUString& /*Name*/, Sequence< Reference< XControlModel > >& /*Group*/) throw( RuntimeException, std::exception ) override {} virtual void SAL_CALL getGroupByName(const OUString& /*Name*/, Sequence< Reference< XControlModel > >& /*Group*/) throw( RuntimeException, std::exception ) override {}
virtual sal_Bool SAL_CALL getGroupControl() throw( RuntimeException, std::exception ) override {return sal_False;} ; virtual sal_Bool SAL_CALL getGroupControl() throw( RuntimeException, std::exception ) override {return false;} ;
virtual void SAL_CALL setGroupControl(sal_Bool /*GroupControl*/) throw( RuntimeException, std::exception ) override {}; virtual void SAL_CALL setGroupControl(sal_Bool /*GroupControl*/) throw( RuntimeException, std::exception ) override {};
}; };

View File

@ -302,8 +302,8 @@ namespace pcr
// collect some information about the to-be-created control // collect some information about the to-be-created control
sal_Int16 nControlType = PropertyControlType::TextField; sal_Int16 nControlType = PropertyControlType::TextField;
::std::vector< OUString > aListEntries; ::std::vector< OUString > aListEntries;
Optional< double > aMinValue( sal_False, 0 ); Optional< double > aMinValue( false, 0 );
Optional< double > aMaxValue( sal_False, 0 ); Optional< double > aMaxValue( false, 0 );
switch ( nPropId ) switch ( nPropId )
{ {
@ -314,7 +314,7 @@ namespace pcr
aDescriptor.PrimaryButtonId = UID_PROP_ADD_DATA_TYPE; aDescriptor.PrimaryButtonId = UID_PROP_ADD_DATA_TYPE;
aDescriptor.SecondaryButtonId = UID_PROP_REMOVE_DATA_TYPE; aDescriptor.SecondaryButtonId = UID_PROP_REMOVE_DATA_TYPE;
aDescriptor.HasPrimaryButton = aDescriptor.HasSecondaryButton = sal_True; aDescriptor.HasPrimaryButton = aDescriptor.HasSecondaryButton = true;
aDescriptor.PrimaryButtonImageURL = "private:graphicrepository/extensions/res/buttonplus.png"; aDescriptor.PrimaryButtonImageURL = "private:graphicrepository/extensions/res/buttonplus.png";
aDescriptor.SecondaryButtonImageURL = "private:graphicrepository/extensions/res/buttonminus.png"; aDescriptor.SecondaryButtonImageURL = "private:graphicrepository/extensions/res/buttonminus.png";
break; break;
@ -354,7 +354,7 @@ namespace pcr
::rtl::Reference< XSDDataType > xDataType( m_pHelper->getValidatingDataType() ); ::rtl::Reference< XSDDataType > xDataType( m_pHelper->getValidatingDataType() );
sal_Int16 nTypeClass = xDataType.is() ? xDataType->classify() : DataTypeClass::STRING; sal_Int16 nTypeClass = xDataType.is() ? xDataType->classify() : DataTypeClass::STRING;
aMinValue.IsPresent = aMaxValue.IsPresent = sal_True; aMinValue.IsPresent = aMaxValue.IsPresent = true;
aMinValue.Value = DataTypeClass::gYear == nTypeClass ? 0 : 1; aMinValue.Value = DataTypeClass::gYear == nTypeClass ? 0 : 1;
aMaxValue.Value = ::std::numeric_limits< sal_Int32 >::max(); aMaxValue.Value = ::std::numeric_limits< sal_Int32 >::max();
if ( DataTypeClass::gMonth == nTypeClass ) if ( DataTypeClass::gMonth == nTypeClass )
@ -407,7 +407,7 @@ namespace pcr
aDescriptor.Control = PropertyHandlerHelper::createNumericControl( _rxControlFactory, 0, aMinValue, aMaxValue, false ); aDescriptor.Control = PropertyHandlerHelper::createNumericControl( _rxControlFactory, 0, aMinValue, aMaxValue, false );
break; break;
default: default:
aDescriptor.Control = _rxControlFactory->createPropertyControl( nControlType, sal_False ); aDescriptor.Control = _rxControlFactory->createPropertyControl( nControlType, false );
break; break;
} }

View File

@ -290,12 +290,12 @@ namespace extensions { namespace resource
ResourceTypePtr resourceType; ResourceTypePtr resourceType;
sal_Int32 resourceId( 0 ); sal_Int32 resourceId( 0 );
if ( !impl_getResourceTypeAndId_nothrow( _key, resourceType, resourceId ) ) if ( !impl_getResourceTypeAndId_nothrow( _key, resourceType, resourceId ) )
return sal_False; return false;
if ( !m_pResourceManager->IsAvailable( StringResourceAccess::getResourceType(), resourceId ) ) if ( !m_pResourceManager->IsAvailable( StringResourceAccess::getResourceType(), resourceId ) )
return sal_False; return false;
return sal_True; return true;
} }
Type SAL_CALL OpenOfficeResourceBundle::getElementType( ) throw (RuntimeException, std::exception) Type SAL_CALL OpenOfficeResourceBundle::getElementType( ) throw (RuntimeException, std::exception)

View File

@ -1330,7 +1330,7 @@ void UpdateCheck::handleMenuBarUI( const rtl::Reference< UpdateHandler >& rUpdat
{ {
if( UPDATESTATE_NO_UPDATE_AVAIL == eState ) if( UPDATESTATE_NO_UPDATE_AVAIL == eState )
{ {
xMenuBarUI->setPropertyValue( PROPERTY_SHOW_MENUICON, uno::makeAny(sal_False) ); xMenuBarUI->setPropertyValue( PROPERTY_SHOW_MENUICON, uno::makeAny(false) );
} }
else else
{ {
@ -1338,10 +1338,10 @@ void UpdateCheck::handleMenuBarUI( const rtl::Reference< UpdateHandler >& rUpdat
xMenuBarUI->setPropertyValue( PROPERTY_TEXT, uno::makeAny(rUpdateHandler->getBubbleText(eState)) ); xMenuBarUI->setPropertyValue( PROPERTY_TEXT, uno::makeAny(rUpdateHandler->getBubbleText(eState)) );
if( ! suppressBubble && ( ! rUpdateHandler->isVisible() || rUpdateHandler->isMinimized() ) ) if( ! suppressBubble && ( ! rUpdateHandler->isVisible() || rUpdateHandler->isMinimized() ) )
xMenuBarUI->setPropertyValue( PROPERTY_SHOW_BUBBLE, uno::makeAny( sal_True ) ); xMenuBarUI->setPropertyValue( PROPERTY_SHOW_BUBBLE, uno::makeAny( true ) );
if( UPDATESTATE_CHECKING != eState ) if( UPDATESTATE_CHECKING != eState )
xMenuBarUI->setPropertyValue( PROPERTY_SHOW_MENUICON, uno::makeAny(sal_True) ); xMenuBarUI->setPropertyValue( PROPERTY_SHOW_MENUICON, uno::makeAny(true) );
} }
} }
} }

View File

@ -145,7 +145,7 @@ UpdateCheckROModel::getUpdateEntry(UpdateInfo& rInfo) const
rInfo.Version = getStringValue(UPDATE_VERSION); rInfo.Version = getStringValue(UPDATE_VERSION);
rInfo.Description = getStringValue(UPDATE_DESCRIPTION); rInfo.Description = getStringValue(UPDATE_DESCRIPTION);
sal_Bool isDirectDownload = sal_False; sal_Bool isDirectDownload = false;
m_aNameAccess.getValue(IS_DIRECT_DOWNLOAD) >>= isDirectDownload; m_aNameAccess.getValue(IS_DIRECT_DOWNLOAD) >>= isDirectDownload;
rInfo.Sources.push_back( DownloadSource( isDirectDownload, getStringValue(DOWNLOAD_URL) ) ); rInfo.Sources.push_back( DownloadSource( isDirectDownload, getStringValue(DOWNLOAD_URL) ) );
@ -253,7 +253,7 @@ UpdateCheckConfig::get(
bool bool
UpdateCheckConfig::isAutoCheckEnabled() const UpdateCheckConfig::isAutoCheckEnabled() const
{ {
sal_Bool nValue = sal_False; sal_Bool nValue = false;
const_cast < UpdateCheckConfig *> (this)->getByName( AUTOCHECK_ENABLED ) >>= nValue; const_cast < UpdateCheckConfig *> (this)->getByName( AUTOCHECK_ENABLED ) >>= nValue;
return nValue; return nValue;
} }
@ -261,7 +261,7 @@ UpdateCheckConfig::isAutoCheckEnabled() const
bool bool
UpdateCheckConfig::isAutoDownloadEnabled() const UpdateCheckConfig::isAutoDownloadEnabled() const
{ {
sal_Bool nValue = sal_False; sal_Bool nValue = false;
const_cast < UpdateCheckConfig *> (this)->getByName( AUTODOWNLOAD_ENABLED ) >>= nValue; const_cast < UpdateCheckConfig *> (this)->getByName( AUTODOWNLOAD_ENABLED ) >>= nValue;
return nValue; return nValue;
} }
@ -520,7 +520,7 @@ UpdateCheckConfig::commitChanges()
aChangesSet[i].Accessor >>= aString; aChangesSet[i].Accessor >>= aString;
if( aString.endsWith(AUTOCHECK_ENABLED "']") ) if( aString.endsWith(AUTOCHECK_ENABLED "']") )
{ {
sal_Bool bEnabled = sal_False; sal_Bool bEnabled = false;
aChangesSet[i].Element >>= bEnabled; aChangesSet[i].Element >>= bEnabled;
m_rListener->autoCheckStatusChanged(bEnabled); m_rListener->autoCheckStatusChanged(bEnabled);
} }
@ -551,7 +551,7 @@ UpdateCheckConfig::hasPendingChanges( ) throw (uno::RuntimeException, std::exce
if( xChangesBatch.is() ) if( xChangesBatch.is() )
return xChangesBatch->hasPendingChanges(); return xChangesBatch->hasPendingChanges();
return sal_False; return false;
} }
uno::Sequence< util::ElementChange > SAL_CALL uno::Sequence< util::ElementChange > SAL_CALL

View File

@ -489,7 +489,7 @@ UpdateInformationProvider::load(const OUString& rURL)
// Disable KeepAlive in webdav - don't want millions of office // Disable KeepAlive in webdav - don't want millions of office
// instances phone home & clog up servers // instances phone home & clog up servers
uno::Sequence< beans::NamedValue > aProps { { "KeepAlive", uno::makeAny(sal_False) } }; uno::Sequence< beans::NamedValue > aProps { { "KeepAlive", uno::makeAny(false) } };
ucb::OpenCommandArgument3 aOpenArgument; ucb::OpenCommandArgument3 aOpenArgument;
aOpenArgument.Mode = ucb::OpenMode::DOCUMENT; aOpenArgument.Mode = ucb::OpenMode::DOCUMENT;
@ -565,7 +565,7 @@ UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode
* seems to evaluate expression always relative to the root node. * seems to evaluate expression always relative to the root node.
*/ */
uno::Reference< xml::dom::XDocument > xUpdateXML = m_xDocumentBuilder->newDocument(); uno::Reference< xml::dom::XDocument > xUpdateXML = m_xDocumentBuilder->newDocument();
xUpdateXML->appendChild( xUpdateXML->importNode(xChildElement.get(), sal_True ) ); xUpdateXML->appendChild( xUpdateXML->importNode(xChildElement.get(), true ) );
return xUpdateXML->getDocumentElement(); return xUpdateXML->getDocumentElement();
} }
} }