diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:20:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:27:26 +0200 |
commit | bb34461d280d499d93ef982e9b7391fd791ffa35 (patch) | |
tree | 4f67b05103bc4bbe7069744f05282a42dc29806a /svx/source/form | |
parent | a34ded25d61c61c5c25792a1bace4970a754afc6 (diff) |
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Iadc107a89e6c489bf5261042ec6853a1354c434d
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/datanavi.cxx | 8 | ||||
-rw-r--r-- | svx/source/form/fmPropBrw.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 10 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 38 | ||||
-rw-r--r-- | svx/source/form/formfeaturedispatcher.cxx | 2 |
5 files changed, 31 insertions, 31 deletions
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 53b5f50de11c..eab715d0fbd1 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -585,7 +585,7 @@ namespace svxform try { - m_xUIHelper->getBindingForNode( xNewNode, sal_True ); + m_xUIHelper->getBindingForNode( xNewNode, true ); } catch ( Exception& ) { @@ -959,7 +959,7 @@ namespace svxform ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( - sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, sal_False ) ); + sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, false ) ); aQBox->set_primary_text(sMessText); if ( aQBox->Execute() == RET_YES ) { @@ -2574,7 +2574,7 @@ namespace svxform */ Reference< css::xml::dom::XNode > xNode = m_pItemNode->m_xNode; - m_xBinding = m_xUIHelper->getBindingForNode( xNode, sal_True ); + m_xBinding = m_xUIHelper->getBindingForNode( xNode, true ); if ( m_xBinding.is() ) { Reference< css::xforms::XModel > xModel( m_xUIHelper, UNO_QUERY ); @@ -3290,7 +3290,7 @@ namespace svxform Reference<css::xml::dom::XNode>( xModel->getDefaultInstance()->getDocumentElement(), UNO_QUERY_THROW ), - sal_True ); + true ); m_xTempBinding = m_xCreatedBinding; } diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 3f017c207b20..70c7aadbda38 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -224,7 +224,7 @@ FmPropBrw::FmPropBrw( const Reference< XComponentContext >& _xORB, SfxBindings* if ( m_xBrowserComponentWindow.is() ) - m_xBrowserComponentWindow->setVisible( sal_True ); + m_xBrowserComponentWindow->setVisible( true ); if ( _pInfo ) m_sLastActivePage = _pInfo->aExtraString; @@ -341,7 +341,7 @@ bool FmPropBrw::Close() try { Reference< XController > xController( m_xMeAsFrame->getController() ); - if ( xController.is() && !xController->suspend( sal_True ) ) + if ( xController.is() && !xController->suspend( true ) ) return false; } catch( const Exception& ) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index a60bdb6894a7..0dca9bff4a88 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1357,21 +1357,21 @@ void FmXFormShell::LoopGrids(LoopGridsSync nSync, LoopGridsFlags nFlags) { case LoopGridsSync::DISABLE_SYNC: { - sal_Bool bB(sal_False); + sal_Bool bB(false); xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, Any(&bB,cppu::UnoType<bool>::get())); } break; case LoopGridsSync::FORCE_SYNC: { Any aOldVal( xModelSet->getPropertyValue(FM_PROP_DISPLAYSYNCHRON) ); - sal_Bool bB(sal_True); + sal_Bool bB(true); xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, Any(&bB,cppu::UnoType<bool>::get())); xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, aOldVal); } break; case LoopGridsSync::ENABLE_SYNC: { - sal_Bool bB(sal_True); + sal_Bool bB(true); xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, Any(&bB,cppu::UnoType<bool>::get())); } break; @@ -1379,7 +1379,7 @@ void FmXFormShell::LoopGrids(LoopGridsSync nSync, LoopGridsFlags nFlags) if (nFlags & LoopGridsFlags::DISABLE_ROCTRLR) { - sal_Bool bB(sal_False); + sal_Bool bB(false); xModelSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, Any(&bB,cppu::UnoType<bool>::get())); Reference< XPropertyState> xModelPropState(xModelSet, UNO_QUERY); if (xModelPropState.is()) @@ -3058,7 +3058,7 @@ void FmXFormShell::stopFiltering(bool bSave) if (aOriginalFilters.size() == aOriginalApplyFlags.size()) // the first getPropertyValue failed -> use two dummies aOriginalFilters.push_back( OUString() ); - aOriginalApplyFlags.push_back( sal_False ); + aOriginalApplyFlags.push_back( false ); } } saveFilter(*j); diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 4629ac9fdf22..3072c399e528 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -479,7 +479,7 @@ void FmXAutoControl::createPeer( const Reference< XToolkit > & rxToolkit, const if (xText.is()) { xText->setText(SVX_RESSTR(RID_STR_AUTOFIELD)); - xText->setEditable(sal_False); + xText->setEditable(false); } } @@ -677,7 +677,7 @@ Sequence< OUString> SAL_CALL FormController::getSupportedServiceNames() throw( R sal_Bool SAL_CALL FormController::approveReset(const EventObject& /*rEvent*/) throw( RuntimeException, std::exception ) { - return sal_True; + return true; } @@ -767,7 +767,7 @@ sal_Bool FormController::convertFastPropertyValue( Any & /*rConvertedValue*/, An sal_Int32 /*nHandle*/, const Any& /*rValue*/ ) throw( IllegalArgumentException ) { - return sal_False; + return false; } @@ -2198,7 +2198,7 @@ void FormController::setControlLock(const Reference< XControl > & xControl) { Any aVal = xField->getPropertyValue(FM_PROP_ISREADONLY); if (aVal.hasValue() && ::comphelper::getBOOL(aVal)) - xBound->setLock(sal_True); + xBound->setLock(true); else xBound->setLock(bLocked); } @@ -3500,9 +3500,9 @@ sal_Bool SAL_CALL FormController::supportsMode(const OUString& Mode) throw( Runt for (sal_Int32 i = aModes.getLength(); i > 0; ) { if (pModes[--i] == Mode) - return sal_True; + return true; } - return sal_False; + return false; } @@ -3689,11 +3689,11 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent // check values on NULL and required flag if ( !lcl_shouldValidateRequiredFields_nothrow( _rEvent.Source ) ) - return sal_True; + return true; OSL_ENSURE( m_pColumnInfoCache.get(), "FormController::approveRowChange: no column infos!" ); if ( !m_pColumnInfoCache.get() ) - return sal_True; + return true; try { @@ -3730,7 +3730,7 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent aGuard.clear(); displayErrorSetFocus( sMessage, rColInfo.xFirstControlWithInputRequired, getDialogParentWindow() ); - return sal_False; + return false; } } catch( const Exception& ) @@ -3755,7 +3755,7 @@ sal_Bool SAL_CALL FormController::approveCursorMove(const EventObject& event) th return static_cast<XRowSetApproveListener*>(aIter.next())->approveCursorMove(aEvt); } - return sal_True; + return true; } @@ -3772,7 +3772,7 @@ sal_Bool SAL_CALL FormController::approveRowSetChange(const EventObject& event) return static_cast<XRowSetApproveListener*>(aIter.next())->approveRowSetChange(aEvt); } - return sal_True; + return true; } // XRowSetApproveBroadcaster @@ -3887,7 +3887,7 @@ sal_Bool SAL_CALL FormController::approveParameter(const DatabaseParameterEvent& try { if ( !ensureInteractionHandler() ) - return sal_False; + return false; // two continuations allowed: OK and Cancel OParameterContinuation* pParamValues = new OParameterContinuation; @@ -3907,14 +3907,14 @@ sal_Bool SAL_CALL FormController::approveParameter(const DatabaseParameterEvent& if (!pParamValues->wasSelected()) // canceled - return sal_False; + return false; // transfer the values into the parameter supplier Sequence< PropertyValue > aFinalValues = pParamValues->getValues(); if (aFinalValues.getLength() != aRequest.Parameters->getCount()) { OSL_FAIL("FormController::approveParameter: the InteractionHandler returned nonsense!"); - return sal_False; + return false; } const PropertyValue* pFinalValues = aFinalValues.getConstArray(); for (sal_Int32 i=0; i<aFinalValues.getLength(); ++i, ++pFinalValues) @@ -3941,7 +3941,7 @@ sal_Bool SAL_CALL FormController::approveParameter(const DatabaseParameterEvent& DBG_UNHANDLED_EXCEPTION(); } } - return sal_True; + return true; } // XConfirmDeleteBroadcaster @@ -3992,7 +3992,7 @@ sal_Bool SAL_CALL FormController::confirmDelete(const RowChangeEvent& aEvent) th try { if ( !ensureInteractionHandler() ) - return sal_False; + return false; // two continuations allowed: Yes and No OInteractionApprove* pApprove = new OInteractionApprove; @@ -4016,14 +4016,14 @@ sal_Bool SAL_CALL FormController::confirmDelete(const RowChangeEvent& aEvent) th m_xInteractionHandler->handle( xRequest ); if ( pApprove->wasSelected() ) - return sal_True; + return true; } catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); } - return sal_False; + return false; } @@ -4131,7 +4131,7 @@ void SAL_CALL FormController::addStatusListener( const Reference< XStatusListene { // send an initial statusChanged event FeatureStateEvent aEvent; aEvent.FeatureURL = _rURL; - aEvent.IsEnabled = sal_True; + aEvent.IsEnabled = true; _rxListener->statusChanged(aEvent); // and don't add the listener at all (the status will never change) } diff --git a/svx/source/form/formfeaturedispatcher.cxx b/svx/source/form/formfeaturedispatcher.cxx index f9016c7d3a8d..e45d21ef1c63 100644 --- a/svx/source/form/formfeaturedispatcher.cxx +++ b/svx/source/form/formfeaturedispatcher.cxx @@ -56,7 +56,7 @@ namespace svx _rState.FeatureURL = m_aFeatureURL; _rState.IsEnabled = aState.Enabled; - _rState.Requery = sal_False; + _rState.Requery = false; _rState.State = aState.State; } |