loplugin:salbool: Automatic rewrite of sal_False/True

Change-Id: I379e89e1e6b9fd8668ba7ac59af33f63487a4f66
This commit is contained in:
Stephan Bergmann 2016-04-20 17:18:22 +02:00
parent 14fc21bd30
commit 398027e8b2
21 changed files with 48 additions and 48 deletions

View file

@ -156,7 +156,7 @@ void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs )
Reference< XUriReference > xBase = xFactory->parse( "file:///" );
Reference< XUriReference > xPart = xFactory->parse( rAttribs.getString( XML_Target, OUString() ) );
Reference< XUriReference > xAbs = xFactory->makeAbsolute( xBase, xPart, sal_True, RelativeUriExcessParentSegments_RETAIN );
Reference< XUriReference > xAbs = xFactory->makeAbsolute( xBase, xPart, true, RelativeUriExcessParentSegments_RETAIN );
if ( xAbs.is() )
maTargetPath = xAbs->getPath();

View file

@ -474,7 +474,7 @@ OUString lclAddRelation( const Reference< XRelationshipAccess >& rRelations, sal
aEntry[2].First = "TargetMode";
aEntry[2].Second = "External";
}
rRelations->insertRelationshipByID( sId, aEntry, sal_True );
rRelations->insertRelationshipByID( sId, aEntry, true );
return sId;
}

View file

@ -115,7 +115,7 @@ void ChartConverter::createDataProvider( const Reference< XChartDocument >& rxCh
try
{
if( !rxChartDoc->hasInternalDataProvider() )
rxChartDoc->createInternalDataProvider( sal_False );
rxChartDoc->createInternalDataProvider( false );
}
catch( Exception& )
{

View file

@ -620,7 +620,7 @@ Reference< XShape > Shape::createAndInsert(
{
SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "invisible shape with id: " << msId);
const OUString sVisible( "Visible" );
xSet->setPropertyValue( sVisible, Any( sal_False ) );
xSet->setPropertyValue( sVisible, Any( false ) );
}
ActionLockGuard const alg(mxShape);
@ -1194,8 +1194,8 @@ void Shape::keepDiagramCompatibilityInfo( XmlFilterBase& rFilterBase )
} else
xSet->setPropertyValue( aGrabBagPropName, Any( maDiagramDoms ) );
xSet->setPropertyValue( "MoveProtect", Any( sal_True ) );
xSet->setPropertyValue( "SizeProtect", Any( sal_True ) );
xSet->setPropertyValue( "MoveProtect", Any( true ) );
xSet->setPropertyValue( "SizeProtect", Any( true ) );
// Replace existing shapes with a new Graphic Object rendered
// from them
@ -1274,8 +1274,8 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
xShape.set( xServiceFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
Reference < XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
xPropSet->setPropertyValue( "Graphic", Any( xGraphic ) );
xPropSet->setPropertyValue( "MoveProtect", Any( sal_True ) );
xPropSet->setPropertyValue( "SizeProtect", Any( sal_True ) );
xPropSet->setPropertyValue( "MoveProtect", Any( true ) );
xPropSet->setPropertyValue( "SizeProtect", Any( true ) );
xPropSet->setPropertyValue( "Name", Any( OUString( "RenderedShapes" ) ) );
}
catch( const Exception& e )

View file

@ -192,9 +192,9 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons
applyTableCellProperties( rxCell, *this );
TextCharacterProperties aTextStyleProps;
xAt->gotoStart( sal_True );
xAt->gotoStart( true );
Reference< text::XTextRange > xStart( xAt, UNO_QUERY );
xAt->gotoEnd( sal_True );
xAt->gotoEnd( true );
Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
oox::drawingml::FillProperties aFillProperties;

View file

@ -134,7 +134,7 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32&
pTableStyle->getBand1V().getFillProperties() = pBand1HFillProperties;
//tet bold for 1st row/last row/column
::boost::optional< sal_Bool > textBoldStyle(sal_True);
::boost::optional< sal_Bool > textBoldStyle(true);
pTableStyle->getFirstRow().getTextBoldStyle() = textBoldStyle;
pTableStyle->getLastRow().getTextBoldStyle() = textBoldStyle;
pTableStyle->getFirstCol().getTextBoldStyle() = textBoldStyle;

View file

@ -38,17 +38,17 @@ TableStyleTextStyleContext::TableStyleTextStyleContext( ContextHandler2Helper& r
if( rAttribs.hasAttribute( XML_b ) ) {
sal_Int32 nB = rAttribs.getToken( XML_b, XML_def );
if ( nB == XML_on )
mrTableStylePart.getTextBoldStyle() = ::boost::optional< sal_Bool >( sal_True );
mrTableStylePart.getTextBoldStyle() = ::boost::optional< sal_Bool >( true );
else if ( nB == XML_off )
mrTableStylePart.getTextBoldStyle() = ::boost::optional< sal_Bool >( sal_False );
mrTableStylePart.getTextBoldStyle() = ::boost::optional< sal_Bool >( false );
}
if( rAttribs.hasAttribute( XML_i ) ) {
sal_Int32 nI = rAttribs.getToken( XML_i, XML_def );
if ( nI == XML_on )
mrTableStylePart.getTextItalicStyle() = ::boost::optional< sal_Bool >( sal_True );
mrTableStylePart.getTextItalicStyle() = ::boost::optional< sal_Bool >( true );
else if ( nI == XML_off )
mrTableStylePart.getTextItalicStyle() = ::boost::optional< sal_Bool >( sal_False );
mrTableStylePart.getTextItalicStyle() = ::boost::optional< sal_Bool >( false );
}
}

View file

@ -223,15 +223,15 @@ sal_Int32 TextField::insertAt(
}
else
{
xText->insertString( xAt, " ", sal_False );
xText->insertString( xAt, " ", false );
}
xText->insertTextContent( xAt, xContent, sal_False );
xText->insertTextContent( xAt, xContent, false );
}
}
}
else
{
xText->insertString( xAt, getText(), sal_False );
xText->insertString( xAt, getText(), false );
}
}
catch( const Exception& )

View file

@ -72,8 +72,8 @@ void TextParagraph::insertAt(
if( !bFirst )
{
xText->insertControlCharacter( xAt, ControlCharacter::APPEND_PARAGRAPH, sal_False );
xAt->gotoEnd( sal_True );
xText->insertControlCharacter( xAt, ControlCharacter::APPEND_PARAGRAPH, false );
xAt->gotoEnd( true );
}
sal_Int32 nCharHeight = 0;
@ -100,7 +100,7 @@ void TextParagraph::insertAt(
nParagraphSize += nLen;
}
}
xAt->gotoEnd( sal_True );
xAt->gotoEnd( true );
PropertyMap aioBulletList;
Reference< XPropertySet > xProps( xAt, UNO_QUERY);

View file

@ -515,7 +515,7 @@ void TextParagraphProperties::dump() const
xText->setString( sText );
Reference< css::text::XTextCursor > xStart( xText->createTextCursor(), UNO_QUERY );
Reference< css::text::XTextRange > xRange( xStart, UNO_QUERY );
xStart->gotoEnd( sal_True );
xStart->gotoEnd( true );
Reference< XPropertySet > xPropSet( xRange, UNO_QUERY );
pushToPropSet( nullptr, xPropSet, emptyMap, nullptr, false, 0 );
PropertySet pSet( xPropSet );

View file

@ -149,10 +149,10 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
mrBulletList.setGraphic( mxBlipProps->mxGraphic );
if( mrBulletList.is() )
rPropertyMap.setProperty( PROP_IsNumbering, sal_True);
rPropertyMap.setProperty( PROP_IsNumbering, true);
sal_Int16 nLevel = mrTextParagraphProperties.getLevel();
rPropertyMap.setProperty( PROP_NumberingLevel, nLevel);
rPropertyMap.setProperty( PROP_NumberingIsNumber, sal_True);
rPropertyMap.setProperty( PROP_NumberingIsNumber, true);
if( mrTextParagraphProperties.getParaAdjust() )
rPropertyMap.setProperty( PROP_ParaAdjust, mrTextParagraphProperties.getParaAdjust().get());
@ -171,7 +171,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
return new TextSpacingContext( *this, mrTextParagraphProperties.getParaBottomMargin() );
// EG_TextBulletColor
case A_TOKEN( buClrTx ): // CT_TextBulletColorFollowText ???
mrBulletList.mbBulletColorFollowText <<= sal_True;
mrBulletList.mbBulletColorFollowText <<= true;
break;
case A_TOKEN( buClr ): // CT_Color
return new ColorContext( *this, *mrBulletList.maBulletColorPtr );
@ -189,7 +189,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
// EG_TextBulletTypeface
case A_TOKEN( buFontTx ): // CT_TextBulletTypefaceFollowText
mrBulletList.mbBulletFontFollowText <<= sal_True;
mrBulletList.mbBulletFontFollowText <<= true;
break;
case A_TOKEN( buFont ): // CT_TextFont
mrBulletList.maBulletFont.setAttributes( rAttribs );

View file

@ -74,7 +74,7 @@ sal_Int32 TextRun::insertAt(
if( mbIsLineBreak )
{
OSL_TRACE( "OOX: TextRun::insertAt() insert line break" );
xText->insertControlCharacter( xStart, ControlCharacter::LINE_BREAK, sal_False );
xText->insertControlCharacter( xStart, ControlCharacter::LINE_BREAK, false );
}
else
{
@ -82,7 +82,7 @@ sal_Int32 TextRun::insertAt(
sal_Int16 nSymbolFontFamily = 0, nSymbolFontPitch = 0;
if ( !aTextCharacterProps.maSymbolFont.getFontData( aSymbolFontName, nSymbolFontPitch, nSymbolFontFamily, rFilterBase ) )
xText->insertString( xStart, getText(), sal_False );
xText->insertString( xStart, getText(), false );
else if ( !getText().isEmpty() )
{
// #i113673
@ -121,7 +121,7 @@ sal_Int32 TextRun::insertAt(
}
}
OUString aSubString( getText().copy( nIndex, nCount ) );
xText->insertString( xStart, aSubString, sal_False );
xText->insertString( xStart, aSubString, false );
nIndex += nCount;
if ( nIndex >= getText().getLength() )
@ -142,14 +142,14 @@ sal_Int32 TextRun::insertAt(
if( xField.is() )
{
Reference< XTextCursor > xTextFieldCursor = xText->createTextCursor();
xTextFieldCursor->gotoEnd( sal_False );
xTextFieldCursor->gotoEnd( false );
PropertySet aFieldProps( xField );
aFieldProps.setProperties( maTextCharacterProperties.maHyperlinkPropertyMap );
aFieldProps.setProperty( PROP_Representation, getText() );
xText->insertTextContent( xStart, xField, sal_False );
xText->insertTextContent( xStart, xField, false );
xTextFieldCursor->gotoEnd( sal_True );
xTextFieldCursor->gotoEnd( true );
aTextCharacterProps.maFillProperties.maFillColor.setSchemeClr( XML_hlink );
aTextCharacterProps.maFillProperties.moFillType.set(XML_solidFill);
@ -168,7 +168,7 @@ sal_Int32 TextRun::insertAt(
else
{
OSL_TRACE( "OOX: URL field couldn't be created" );
xText->insertString( xStart, getText(), sal_False );
xText->insertString( xStart, getText(), false );
}
}
}

View file

@ -2136,7 +2136,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
}
if (GetDocumentType() == DOCUMENT_DOCX)
{
sal_Bool bTextAutoGrowHeight = sal_False;
sal_Bool bTextAutoGrowHeight = false;
GET(bTextAutoGrowHeight, TextAutoGrowHeight);
mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit), FSEND);
}

View file

@ -161,7 +161,7 @@ OUString TextInputStream::readToChar( sal_Unicode cChar, bool bIncludeChar )
character in this call, it will be returned in the next call of one
of the own member functions. The function createFinalString() adds
a character that has been buffered in the previous call. */
OUString aString = createFinalString( mxTextStrm->readString( aDelimiters, sal_False ) );
OUString aString = createFinalString( mxTextStrm->readString( aDelimiters, false ) );
// remove last character from string and remember it for next call
if( !bIncludeChar && !aString.isEmpty() && (aString[ aString.getLength() - 1 ] == cChar) )
{

View file

@ -399,7 +399,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
try
{
Reference< XVBACompatibility > xVBACompat( getLibraryContainer( PROP_BasicLibraries ), UNO_QUERY_THROW );
xVBACompat->setVBACompatibilityMode( sal_True );
xVBACompat->setVBACompatibilityMode( true );
xVBACompat->setProjectName( maPrjName );
}

View file

@ -54,7 +54,7 @@ ContextHandlerRef PPTShapePropertiesContext::onCreateContext( sal_Int32 aElement
switch( aElementToken )
{
case A_TOKEN( xfrm ):
mrShape.getShapeProperties().setProperty( PROP_IsPlaceholderDependent, sal_False);
mrShape.getShapeProperties().setProperty( PROP_IsPlaceholderDependent, false);
return ShapePropertiesContext::onCreateContext( aElementToken, rAttribs );
default:

View file

@ -124,7 +124,7 @@ void ResolveTextFields( XmlFilterBase& rFilter )
xPropSet->setPropertyValue( sURL, Any( aURL ) );
Reference< text::XTextContent > xContent( rTextField.xTextField, UNO_QUERY);
Reference< text::XTextRange > xTextRange( rTextField.xTextCursor, UNO_QUERY );
rTextField.xText->insertTextContent( xTextRange, xContent, sal_True );
rTextField.xText->insertTextContent( xTextRange, xContent, true );
}
catch( uno::Exception& )
{

View file

@ -61,7 +61,7 @@ namespace oox { namespace ppt {
if ( !url.isEmpty() )
{
maSlideProperties.setProperty( PROP_Sound, url);
maSlideProperties.setProperty( PROP_SoundOn, sal_True);
maSlideProperties.setProperty( PROP_SoundOn, true);
}
}
}

View file

@ -839,13 +839,13 @@ beans::PropertyValue lcl_createTextpathProps()
{
uno::Sequence<beans::PropertyValue> aTextpathPropSeq(4);
aTextpathPropSeq[0].Name = "TextPath";
aTextpathPropSeq[0].Value <<= sal_True;
aTextpathPropSeq[0].Value <<= true;
aTextpathPropSeq[1].Name = "TextPathMode";
aTextpathPropSeq[1].Value <<= drawing::EnhancedCustomShapeTextPathMode_SHAPE;
aTextpathPropSeq[2].Name = "ScaleX";
aTextpathPropSeq[2].Value <<= sal_False;
aTextpathPropSeq[2].Value <<= false;
aTextpathPropSeq[3].Name = "SameLetterHeights";
aTextpathPropSeq[3].Value <<= sal_False;
aTextpathPropSeq[3].Value <<= false;
beans::PropertyValue aRet;
aRet.Name = "TextPath";

View file

@ -369,12 +369,12 @@ void InputStream::updateBuffer() throw (IOException, RuntimeException)
OString InputStream::readToElementBegin() throw (IOException, RuntimeException)
{
return OUStringToOString( mxTextStrm->readString( maOpeningBracket, sal_False ), RTL_TEXTENCODING_ISO_8859_1 );
return OUStringToOString( mxTextStrm->readString( maOpeningBracket, false ), RTL_TEXTENCODING_ISO_8859_1 );
}
OString InputStream::readToElementEnd() throw (IOException, RuntimeException)
{
OString aText = OUStringToOString( mxTextStrm->readString( maClosingBracket, sal_False ), RTL_TEXTENCODING_ISO_8859_1 );
OString aText = OUStringToOString( mxTextStrm->readString( maClosingBracket, false ), RTL_TEXTENCODING_ISO_8859_1 );
OSL_ENSURE( aText.endsWith(">"), "InputStream::readToElementEnd - missing closing bracket of XML element" );
return aText;
}

View file

@ -423,7 +423,7 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
if ( xControlShape.is() && !getTypeModel().mbVisible )
{
PropertySet aControlShapeProp( xControlShape->getControl() );
aControlShapeProp.setProperty( PROP_EnableVisible, uno::makeAny( sal_False ) );
aControlShapeProp.setProperty( PROP_EnableVisible, uno::makeAny( false ) );
}
/* Notify the drawing that a new shape has been inserted. For
convenience, pass the rectangle that contains position and
@ -562,12 +562,12 @@ void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel,
else if ( rTypeModel.maPositionHorizontal == "inside" )
{
rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::LEFT));
rPropSet.setAnyProperty(PROP_PageToggle, makeAny(sal_True));
rPropSet.setAnyProperty(PROP_PageToggle, makeAny(true));
}
else if ( rTypeModel.maPositionHorizontal == "outside" )
{
rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::RIGHT));
rPropSet.setAnyProperty(PROP_PageToggle, makeAny(sal_True));
rPropSet.setAnyProperty(PROP_PageToggle, makeAny(true));
}
if ( rTypeModel.maPositionHorizontalRelative == "page" )
@ -839,7 +839,7 @@ Reference< XShape > SimpleShape::createPictureObject( const Reference< XShapes >
{
aPropSet.setProperty(PROP_HoriOrientPosition, rShapeRect.X);
aPropSet.setProperty(PROP_VertOrientPosition, rShapeRect.Y);
aPropSet.setProperty(PROP_Opaque, sal_False);
aPropSet.setProperty(PROP_Opaque, false);
}
// fdo#70457: preserve rotation information
if ( !maTypeModel.maRotation.isEmpty() )