oox: sal_Bool->bool

Change-Id: Ia05b3210314c39db5110eded731f2be4b7405e87
This commit is contained in:
Noel Grandin 2014-04-01 14:13:50 +02:00
parent e8f4a2541b
commit f3802139ac
17 changed files with 44 additions and 44 deletions

View file

@ -26,16 +26,16 @@ namespace oox { namespace ppt {
struct HeaderFooter
{
sal_Bool mbSlideNumber;
sal_Bool mbHeader;
sal_Bool mbFooter;
sal_Bool mbDateTime;
bool mbSlideNumber;
bool mbHeader;
bool mbFooter;
bool mbDateTime;
HeaderFooter()
: mbSlideNumber( sal_True )
, mbHeader( sal_True )
, mbFooter( sal_True )
, mbDateTime( sal_True ) {};
: mbSlideNumber( true )
, mbHeader( true )
, mbFooter( true )
, mbDateTime( true ) {};
};
} }

View file

@ -29,7 +29,7 @@ class PPTShape : public oox::drawingml::Shape
{
OUString msModelId; // fallback dgs smartart shape reference
ShapeLocation meShapeLocation; // placeholdershapes (mnSubType != 0) on Master are never displayed
sal_Bool mbReferenced; // placeholdershapes on Layout are displayed only, if they are not referenced
bool mbReferenced; // placeholdershapes on Layout are displayed only, if they are not referenced
// placeholdershapes on Slide are displayed always
public:
@ -53,8 +53,8 @@ public:
void setShapeLocation( const oox::ppt::ShapeLocation eShapeLocation ) { meShapeLocation = eShapeLocation; };
ShapeLocation getShapeLocation() const { return meShapeLocation; };
sal_Bool isReferenced() const { return mbReferenced; };
void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; };
bool isReferenced() const { return mbReferenced; };
void setReferenced( bool bReferenced ){ mbReferenced = bReferenced; };
void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
void setModelId( const OUString& rId ) { msModelId = rId; }

View file

@ -49,7 +49,7 @@ protected:
private:
void importSlide(sal_uInt32 nSlide, sal_Bool bFirstSlide, sal_Bool bImportNotes);
void importSlide(sal_uInt32 nSlide, bool bFirstSlide, bool bImportNotes);
std::vector< OUString > maSlideMasterVector;
std::vector< OUString > maSlidesVector;

View file

@ -56,7 +56,7 @@ class SlidePersist : public boost::enable_shared_from_this< SlidePersist >
{
public:
SlidePersist( oox::core::XmlFilterBase& rFilter, sal_Bool bMaster, sal_Bool bNotes,
SlidePersist( oox::core::XmlFilterBase& rFilter, bool bMaster, bool bNotes,
const com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage >&,
oox::drawingml::ShapePtr pShapesPtr, const ::oox::drawingml::TextListStylePtr & );
~SlidePersist();
@ -89,8 +89,8 @@ public:
oox::drawingml::FillPropertiesPtr getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
oox::drawingml::Color& getBackgroundColor() { return maBackgroundColor; }
sal_Bool isMasterPage() const { return mbMaster; }
sal_Bool isNotesPage() const { return mbNotes; }
bool isMasterPage() const { return mbMaster; }
bool isNotesPage() const { return mbNotes; }
void setLayoutValueToken( sal_Int32 nLayoutValueToken ) { mnLayoutValueToken = nLayoutValueToken; }
short getLayoutFromValueToken();
@ -137,8 +137,8 @@ private:
oox::ppt::HeaderFooter maHeaderFooter;
sal_Int32 mnLayoutValueToken;
sal_Bool mbMaster;
sal_Bool mbNotes;
bool mbMaster;
bool mbNotes;
oox::drawingml::TextListStylePtr maDefaultTextStylePtr;
oox::drawingml::TextListStylePtr maTitleTextStylePtr;

View file

@ -41,27 +41,27 @@ namespace oox { namespace ppt {
void setOoxTransitionSpeed( sal_Int32 nToken );
void setFadeColor( sal_Int32 nColor )
{ mnFadeColor = nColor; }
void setMode( sal_Bool bMode )
void setMode( bool bMode )
{ mbMode = bMode; }
void setOoxAdvanceTime( sal_Int32 nAdvanceTime )
{ mnAdvanceTime = nAdvanceTime; }
void setOoxAdvanceTime( sal_Int32 nAdvanceTime )
{ mnAdvanceTime = nAdvanceTime; }
static sal_Int16 ooxToOdpDirection( ::sal_Int32 nOoxType );
static sal_Int16 ooxToOdpEightDirections( ::sal_Int32 nOoxType );
static sal_Int16 ooxToOdpCornerDirections( ::sal_Int32 nOoxType );
static sal_Int16 ooxToOdpBorderDirections( ::sal_Int32 nOoxType );
static sal_Int16 ooxToOdpSideDirections( ::sal_Int32 nOoxType );
static sal_Bool ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType );
static bool ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType );
void setOoxTransitionType( ::sal_Int32 OoxType,
::sal_Int32 param1, ::sal_Int32 param2 );
private:
::sal_Int16 mnTransitionType;
::sal_Int16 mnTransitionSubType;
::sal_Bool mbTransitionDirectionNormal;
bool mbTransitionDirectionNormal;
::sal_Int16 mnAnimationSpeed;
::sal_Int32 mnFadeColor;
::sal_Bool mbMode; /**< http://api.libreoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */
bool mbMode; /**< http://api.libreoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */
::sal_Int32 mnAdvanceTime;
};

View file

@ -41,7 +41,7 @@ namespace oox { namespace ppt {
private:
PropertyMap& maSlideProperties;
::sal_Bool mbHasTransition;
bool mbHasTransition;
SlideTransition maTransition;
};

View file

@ -80,8 +80,8 @@ struct OOX_DLLPUBLIC ShapeTypeModel
OUString maHeightRelative; ///< To what the height is relative
OUString maRotation; ///< Rotation of the shape, in degrees.
OUString maFlip; ///< Flip type of the shape (can be "x" or "y").
sal_Bool mbAutoHeight; ///< If true, the height value is a minimum value (mostly used for textboxes)
sal_Bool mbVisible; ///< Visible or Hidden
bool mbAutoHeight; ///< If true, the height value is a minimum value (mostly used for textboxes)
bool mbVisible; ///< Visible or Hidden
OUString maWrapStyle; ///< Wrapping mode for text.
OUString maArcsize; ///< round rectangles arc size
OUString maEditAs; ///< Edit As type (e.g. "canvas" etc)

View file

@ -170,7 +170,7 @@ ContextHandlerRef PPTGraphicShapeContext::onCreateContext( sal_Int32 aElementTok
mpShapePtr->applyShapeReference( *pPlaceholder.get(), bUseText );
PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
if ( pPPTShape )
pPPTShape->setReferenced( sal_True );
pPPTShape->setReferenced( true );
pPPTShapePtr->setPlaceholder( pPlaceholder );
}
}

View file

@ -44,7 +44,7 @@ namespace oox { namespace ppt {
PPTShape::PPTShape( const oox::ppt::ShapeLocation eShapeLocation, const sal_Char* pServiceName )
: Shape( pServiceName )
, meShapeLocation( eShapeLocation )
, mbReferenced( sal_False )
, mbReferenced( false )
{
}

View file

@ -192,7 +192,7 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con
mpShapePtr->applyShapeReference( *pPlaceholder.get() );
PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
if ( pPPTShape )
pPPTShape->setReferenced( sal_True );
pPPTShape->setReferenced( true );
pPPTShapePtr->setPlaceholder( pPlaceholder );
}
}

View file

@ -135,7 +135,7 @@ void ResolveTextFields( XmlFilterBase& rFilter )
}
}
void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirstPage, sal_Bool bImportNotesPage)
void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage, bool bImportNotesPage)
{
PowerPointImport& rFilter = dynamic_cast< PowerPointImport& >( getFilter() );
@ -157,7 +157,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirst
if( !aSlideFragmentPath.isEmpty() )
{
SlidePersistPtr pMasterPersistPtr;
SlidePersistPtr pSlidePersistPtr( new SlidePersist( rFilter, sal_False, sal_False, xSlide,
SlidePersistPtr pSlidePersistPtr( new SlidePersist( rFilter, false, false, xSlide,
ShapePtr( new PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
FragmentHandlerRef xSlideFragmentHandler( new SlideFragmentHandler( rFilter, aSlideFragmentPath, pSlidePersistPtr, Slide ) );
@ -196,7 +196,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirst
else
xMasterPage = xMasterPages->insertNewByIndex( xMasterPages->getCount() );
pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, sal_True, sal_False, xMasterPage,
pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, true, false, xMasterPage,
ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath );
rFilter.getMasterPages().push_back( pMasterPersistPtr );
@ -264,7 +264,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirst
Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
if ( xNotesPage.is() )
{
SlidePersistPtr pNotesPersistPtr( new SlidePersist( rFilter, sal_False, sal_True, xNotesPage,
SlidePersistPtr pNotesPersistPtr( new SlidePersist( rFilter, false, true, xNotesPage,
ShapePtr( new PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
FragmentHandlerRef xNotesFragmentHandler( new SlideFragmentHandler( getFilter(), aNotesFragmentPath, pNotesPersistPtr, Slide ) );
rFilter.getNotesPages().push_back( pNotesPersistPtr );
@ -285,7 +285,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirst
Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY );
Reference< XDrawPage > xCommentAuthorsPage( xPresentationPage->getNotesPage() );
SlidePersistPtr pCommentAuthorsPersistPtr(
new SlidePersist( rFilter, sal_False, sal_True, xCommentAuthorsPage,
new SlidePersist( rFilter, false, true, xCommentAuthorsPage,
ShapePtr(
new PPTShape(
Slide, "com.sun.star.drawing.GroupShape" ) ),
@ -305,7 +305,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirst
Reference< XDrawPage > xCommentsPage( xPresentationPage->getNotesPage() );
SlidePersistPtr pCommentsPersistPtr(
new SlidePersist(
rFilter, sal_False, sal_True, xCommentsPage,
rFilter, false, true, xCommentsPage,
ShapePtr(
new PPTShape(
Slide, "com.sun.star.drawing.GroupShape" ) ),
@ -485,7 +485,7 @@ bool PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide
oox::ppt::HeaderFooter aHeaderFooter( pSlidePersistPtr->getHeaderFooter() );
if ( !pSlidePersistPtr->isMasterPage() )
aHeaderFooter.mbSlideNumber = aHeaderFooter.mbHeader = aHeaderFooter.mbFooter = aHeaderFooter.mbDateTime = sal_False;
aHeaderFooter.mbSlideNumber = aHeaderFooter.mbHeader = aHeaderFooter.mbFooter = aHeaderFooter.mbDateTime = false;
try
{
if ( pSlidePersistPtr->isNotesPage() )

View file

@ -104,7 +104,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
if( aIter == rMasterPages.end() && !mpSlidePersistPtr->getMasterPersist() )
{
TextListStylePtr pTextListStyle(new TextListStyle);
SlidePersistPtr pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, sal_True, sal_True, mpSlidePersistPtr->getPage(),
SlidePersistPtr pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, true, true, mpSlidePersistPtr->getPage(),
ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpSlidePersistPtr->getNotesTextStyle() ) );
pMasterPersistPtr->setPath( aNotesFragmentPath );
rFilter.getMasterPages().push_back( pMasterPersistPtr );

View file

@ -41,7 +41,7 @@ using namespace ::com::sun::star::animations;
namespace oox { namespace ppt {
SlidePersist::SlidePersist( XmlFilterBase& rFilter, sal_Bool bMaster, sal_Bool bNotes,
SlidePersist::SlidePersist( XmlFilterBase& rFilter, bool bMaster, bool bNotes,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxPage,
oox::drawingml::ShapePtr pShapesPtr, const drawingml::TextListStylePtr & pDefaultTextStyle )
: mpDrawingPtr( new oox::vml::Drawing( rFilter, rxPage, oox::vml::VMLDRAWING_POWERPOINT ) )

View file

@ -190,9 +190,9 @@ namespace oox { namespace ppt {
return nOdpDirection;
}
sal_Bool SlideTransition::ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType )
bool SlideTransition::ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType )
{
sal_Bool nOdpDirection = true;
bool nOdpDirection = true;
switch( nOoxType )
{
case XML_u:

View file

@ -44,7 +44,7 @@ namespace oox { namespace ppt {
SlideTransitionContext::SlideTransitionContext( FragmentHandler2& rParent, const AttributeList& rAttribs, PropertyMap & aProperties ) throw()
: FragmentHandler2( rParent )
, maSlideProperties( aProperties )
, mbHasTransition( sal_False )
, mbHasTransition( false )
{
// ST_TransitionSpeed
maTransition.setOoxTransitionSpeed( rAttribs.getToken( XML_spd, XML_fast ) );

View file

@ -112,8 +112,8 @@ awt::Rectangle lclGetAbsRect( const awt::Rectangle& rRelRect, const awt::Rectang
ShapeTypeModel::ShapeTypeModel():
mbAutoHeight( sal_False ),
mbVisible( sal_True )
mbAutoHeight( false ),
mbVisible( true )
{
}

View file

@ -413,7 +413,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle )
else if( aName == "mso-width-relative" ) mrTypeModel.maWidthRelative = aValue;
else if( aName == "mso-height-percent" ) mrTypeModel.maHeightPercent = aValue;
else if( aName == "mso-height-relative" ) mrTypeModel.maHeightRelative = aValue;
else if( aName == "mso-fit-shape-to-text" ) mrTypeModel.mbAutoHeight = sal_True;
else if( aName == "mso-fit-shape-to-text" ) mrTypeModel.mbAutoHeight = true;
else if( aName == "rotation" ) mrTypeModel.maRotation = aValue;
else if( aName == "flip" ) mrTypeModel.maFlip = aValue;
else if( aName.equalsAscii( "visibility" ) )