summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-28 20:01:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-28 20:26:25 +0100
commitad930bddba8002fe592d7242b99867bffed9dbf0 (patch)
tree0850f58cad301de17622c86d53ea6b45041f510a /oox
parent0f50845dbd751140612b09a1210922eb70af729e (diff)
bool improvements
Change-Id: I171212bbfc2f54a16b5669ab4401a3168e7f0552
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/binarycodec.cxx8
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx4
-rw-r--r--oox/source/drawingml/table/tablecellcontext.cxx6
-rw-r--r--oox/source/drawingml/table/tablecontext.cxx14
-rw-r--r--oox/source/drawingml/transform2dcontext.cxx2
-rw-r--r--oox/source/ole/axcontrol.cxx2
-rw-r--r--oox/source/ppt/headerfootercontext.cxx8
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx2
8 files changed, 23 insertions, 23 deletions
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx
index f4d6b1641b12..47784fb50309 100644
--- a/oox/source/core/binarycodec.cxx
+++ b/oox/source/core/binarycodec.cxx
@@ -176,7 +176,7 @@ void BinaryCodec_XOR::initKey( const sal_uInt8 pnPassData[ 16 ] )
bool BinaryCodec_XOR::initCodec( const uno::Sequence< beans::NamedValue >& aData )
{
- bool bResult = sal_False;
+ bool bResult = false;
::comphelper::SequenceAsHashMap aHashData( aData );
uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault("XOR95EncryptionKey", uno::Sequence< sal_Int8 >() );
@@ -184,7 +184,7 @@ bool BinaryCodec_XOR::initCodec( const uno::Sequence< beans::NamedValue >& aData
if ( aKey.getLength() == 16 )
{
(void)memcpy( mpnKey, aKey.getConstArray(), 16 );
- bResult = sal_True;
+ bResult = true;
mnBaseKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95BaseKey", (sal_Int16)0 );
mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95PasswordHash", (sal_Int16)0 );
@@ -283,7 +283,7 @@ BinaryCodec_RCF::~BinaryCodec_RCF()
bool BinaryCodec_RCF::initCodec( const uno::Sequence< beans::NamedValue >& aData )
{
- bool bResult = sal_False;
+ bool bResult = false;
::comphelper::SequenceAsHashMap aHashData( aData );
uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault("STD97EncryptionKey", uno::Sequence< sal_Int8 >() );
@@ -295,7 +295,7 @@ bool BinaryCodec_RCF::initCodec( const uno::Sequence< beans::NamedValue >& aData
if ( aUniqueID.getLength() == 16 )
{
(void)memcpy( mpnUnique, aUniqueID.getConstArray(), 16 );
- bResult = sal_False;
+ bResult = false;
}
else
OSL_FAIL( "Unexpected document ID!\n" );
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index e3b53130bd8f..32b73a812292 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -979,8 +979,8 @@ Path2DContext::Path2DContext( ContextHandler2Helper& rParent, const AttributeLis
rPath2D.w = rAttribs.getString( XML_w, aEmptyString ).toInt64();
rPath2D.h = rAttribs.getString( XML_h, aEmptyString ).toInt64();
rPath2D.fill = rAttribs.getToken( XML_fill, XML_norm );
- rPath2D.stroke = rAttribs.getBool( XML_stroke, sal_True );
- rPath2D.extrusionOk = rAttribs.getBool( XML_extrusionOk, sal_True );
+ rPath2D.stroke = rAttribs.getBool( XML_stroke, true );
+ rPath2D.extrusionOk = rAttribs.getBool( XML_extrusionOk, true );
}
Path2DContext::~Path2DContext()
diff --git a/oox/source/drawingml/table/tablecellcontext.cxx b/oox/source/drawingml/table/tablecellcontext.cxx
index 05c3d061ab15..1813cbb918ac 100644
--- a/oox/source/drawingml/table/tablecellcontext.cxx
+++ b/oox/source/drawingml/table/tablecellcontext.cxx
@@ -39,8 +39,8 @@ TableCellContext::TableCellContext( ContextHandler2Helper& rParent, const Attrib
if ( rAttribs.hasAttribute( XML_gridSpan ) )
mrTableCell.setGridSpan( rAttribs.getString( XML_gridSpan ).get().toInt32() );
- mrTableCell.sethMerge( rAttribs.getBool( XML_hMerge, sal_False ) );
- mrTableCell.setvMerge( rAttribs.getBool( XML_vMerge, sal_False ) );
+ mrTableCell.sethMerge( rAttribs.getBool( XML_hMerge, false ) );
+ mrTableCell.setvMerge( rAttribs.getBool( XML_vMerge, false ) );
}
TableCellContext::~TableCellContext()
@@ -67,7 +67,7 @@ TableCellContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeLis
mrTableCell.setBottomMargin( rAttribs.getInteger( XML_marB, 45720 ) );
mrTableCell.setVertToken( rAttribs.getToken( XML_vert, XML_horz ) ); // ST_TextVerticalType
mrTableCell.setAnchorToken( rAttribs.getToken( XML_anchor, XML_t ) ); // ST_TextAnchoringType
- mrTableCell.setAnchorCtr( rAttribs.getBool( XML_anchorCtr, sal_False ) );
+ mrTableCell.setAnchorCtr( rAttribs.getBool( XML_anchorCtr, false ) );
mrTableCell.setHorzOverflowToken( rAttribs.getToken( XML_horzOverflow, XML_clip ) ); // ST_TextHorzOverflowType
}
break;
diff --git a/oox/source/drawingml/table/tablecontext.cxx b/oox/source/drawingml/table/tablecontext.cxx
index c02d85a0e56a..17949a766d5c 100644
--- a/oox/source/drawingml/table/tablecontext.cxx
+++ b/oox/source/drawingml/table/tablecontext.cxx
@@ -48,13 +48,13 @@ TableContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& r
{
case A_TOKEN( tblPr ): // CT_TableProperties
{
- mrTableProperties.isRtl() = rAttribs.getBool( XML_rtl, sal_False );
- mrTableProperties.isFirstRow() = rAttribs.getBool( XML_firstRow, sal_False );
- mrTableProperties.isFirstCol() = rAttribs.getBool( XML_firstCol, sal_False );
- mrTableProperties.isLastRow() = rAttribs.getBool( XML_lastRow, sal_False );
- mrTableProperties.isLastCol() = rAttribs.getBool( XML_lastCol, sal_False );
- mrTableProperties.isBandRow() = rAttribs.getBool( XML_bandRow, sal_False );
- mrTableProperties.isBandCol() = rAttribs.getBool( XML_bandCol, sal_False );
+ mrTableProperties.isRtl() = rAttribs.getBool( XML_rtl, false );
+ mrTableProperties.isFirstRow() = rAttribs.getBool( XML_firstRow, false );
+ mrTableProperties.isFirstCol() = rAttribs.getBool( XML_firstCol, false );
+ mrTableProperties.isLastRow() = rAttribs.getBool( XML_lastRow, false );
+ mrTableProperties.isLastCol() = rAttribs.getBool( XML_lastCol, false );
+ mrTableProperties.isBandRow() = rAttribs.getBool( XML_bandRow, false );
+ mrTableProperties.isBandCol() = rAttribs.getBool( XML_bandCol, false );
}
break;
case A_TOKEN( tableStyle ): // CT_TableStyle
diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx
index 8b9040cf564e..e232b4d27e33 100644
--- a/oox/source/drawingml/transform2dcontext.cxx
+++ b/oox/source/drawingml/transform2dcontext.cxx
@@ -42,7 +42,7 @@ Transform2DContext::Transform2DContext( ContextHandler2Helper& rParent, const At
if( !btxXfrm )
{
mrShape.setRotation( rAttribs.getInteger( XML_rot, 0 ) ); // 60000ths of a degree Positive angles are clockwise; negative angles are counter-clockwise
- mrShape.setFlip( rAttribs.getBool( XML_flipH, sal_False ), rAttribs.getBool( XML_flipV, sal_False ) );
+ mrShape.setFlip( rAttribs.getBool( XML_flipH, false ), rAttribs.getBool( XML_flipV, false ) );
}
else
{
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 98c65c66ca86..8b7d7b0868f4 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2629,7 +2629,7 @@ HtmlSelectModel::importBinaryModel( BinaryInputStream& rInStrm )
for( std::vector< sal_Int16 >::iterator it = selectedIndices.begin(); it != selectedIndices.end(); ++it, ++index )
msIndices[ index ] = *it;
}
- return sal_True;
+ return true;
}
diff --git a/oox/source/ppt/headerfootercontext.cxx b/oox/source/ppt/headerfootercontext.cxx
index fe6356b7b19a..d0f9b25f3a89 100644
--- a/oox/source/ppt/headerfootercontext.cxx
+++ b/oox/source/ppt/headerfootercontext.cxx
@@ -32,19 +32,19 @@ namespace oox { namespace ppt {
{
if ( rAttribs.hasAttribute( XML_sldNum ) )
{
- rHeaderFooter.mbSlideNumber = rAttribs.getBool( XML_sldNum, sal_True );
+ rHeaderFooter.mbSlideNumber = rAttribs.getBool( XML_sldNum, true );
}
if ( rAttribs.hasAttribute( XML_hdr ) )
{
- rHeaderFooter.mbHeader = rAttribs.getBool( XML_hdr, sal_True );
+ rHeaderFooter.mbHeader = rAttribs.getBool( XML_hdr, true );
}
if ( rAttribs.hasAttribute( XML_ftr ) )
{
- rHeaderFooter.mbFooter = rAttribs.getBool( XML_ftr, sal_True );
+ rHeaderFooter.mbFooter = rAttribs.getBool( XML_ftr, true );
}
if ( rAttribs.hasAttribute( XML_dt ) )
{
- rHeaderFooter.mbDateTime = rAttribs.getBool( XML_dt, sal_True );
+ rHeaderFooter.mbDateTime = rAttribs.getBool( XML_dt, true );
}
}
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 7ae3b0fec627..9d3772aaf973 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -78,7 +78,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
PropertyMap aPropMap;
PropertySet aSlideProp( xSlide );
- aPropMap[ PROP_Visible ] = Any( rAttribs.getBool( XML_show, sal_True ) );
+ aPropMap[ PROP_Visible ] = Any( rAttribs.getBool( XML_show, true ) );
aSlideProp.setProperties( aPropMap );
return this;