Kaydet (Commit) 65c3e11e authored tarafından Noel Grandin's avatar Noel Grandin

framework: sal_Bool->bool

Change-Id: If3276f184c63e85762fe54ce19655c30e00aeb15
üst d4aa726f
......@@ -69,7 +69,7 @@ AddonMenu::~AddonMenu()
// Check if command URL string has the unique prefix to identify addon popup menus
sal_Bool AddonPopupMenu::IsCommandURLPrefix( const OUString& aCmdURL )
bool AddonPopupMenu::IsCommandURLPrefix( const OUString& aCmdURL )
{
const char aPrefixCharBuf[] = ADDONSPOPUPMENU_URL_PREFIX_STR;
......@@ -103,7 +103,7 @@ static Reference< XModel > GetModelFromFrame( const Reference< XFrame >& rFrame
sal_Bool AddonMenuManager::HasAddonMenuElements()
bool AddonMenuManager::HasAddonMenuElements()
{
return AddonsOptions().HasAddonsMenu();
}
......@@ -279,10 +279,10 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent
const Reference< XModel >& rModel )
{
Sequence< Sequence< PropertyValue > > aAddonSubMenu;
sal_Bool bInsertSeparator = sal_False;
sal_uInt32 i = 0;
sal_uInt32 nElements = 0;
sal_uInt32 nCount = aAddonMenuDefinition.getLength();
bool bInsertSeparator = false;
sal_uInt32 i = 0;
sal_uInt32 nElements = 0;
sal_uInt32 nCount = aAddonMenuDefinition.getLength();
AddonsOptions aAddonsOptions;
OUString aTitle;
......@@ -299,7 +299,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent
continue;
if ( aURL == "private:separator" )
bInsertSeparator = sal_True;
bInsertSeparator = true;
else
{
PopupMenu* pSubMenu = NULL;
......@@ -322,7 +322,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent
// Insert a separator only when we insert a new element afterwards and we
// have already one before us
nElements = 0;
bInsertSeparator = sal_False;
bInsertSeparator = false;
pCurrentMenu->InsertSeparator(OString(), nInsPos);
nInsPos = AddonMenuManager::GetNextPos( nInsPos );
}
......@@ -375,7 +375,7 @@ void AddonMenuManager::GetMenuEntry( const Sequence< PropertyValue >& rAddonMenu
}
// Check if the context string matches the provided xModel context
sal_Bool AddonMenuManager::IsCorrectContext( const Reference< XModel >& rModel, const OUString& aContext )
bool AddonMenuManager::IsCorrectContext( const Reference< XModel >& rModel, const OUString& aContext )
{
if ( rModel.is() )
{
......@@ -388,7 +388,7 @@ sal_Bool AddonMenuManager::IsCorrectContext( const Reference< XModel >& rModel,
OUString aToken = aContext.getToken( 0, ',', nIndex );
if ( xServiceInfo->supportsService( aToken ))
return sal_True;
return true;
}
while ( nIndex >= 0 );
}
......
......@@ -70,9 +70,9 @@ FrameListAnalyzer::~FrameListAnalyzer()
void FrameListAnalyzer::impl_analyze()
{
// reset all members to get a consistent state
m_bReferenceIsHidden = sal_False;
m_bReferenceIsHelp = sal_False;
m_bReferenceIsBacking = sal_False;
m_bReferenceIsHidden = false;
m_bReferenceIsHelp = false;
m_bReferenceIsBacking = false;
m_xHelp = css::uno::Reference< css::frame::XFrame >();
m_xBackingComponent = css::uno::Reference< css::frame::XFrame >();
......@@ -143,7 +143,7 @@ void FrameListAnalyzer::impl_analyze()
(m_xReferenceFrame->getName() == SPECIALTARGET_HELPTASK)
)
{
m_bReferenceIsHelp = sal_True;
m_bReferenceIsHelp = true;
}
try
......
......@@ -91,7 +91,7 @@ class RequestFilterSelect_Impl : public ::cppu::WeakImplHelper1< ::com::sun::sta
{
public:
RequestFilterSelect_Impl( const OUString& sURL );
sal_Bool isAbort () const;
bool isAbort () const;
OUString getFilter() const;
public:
......@@ -130,7 +130,7 @@ RequestFilterSelect_Impl::RequestFilterSelect_Impl( const OUString& sURL )
// return abort state of interaction
// If it is true, return value of method "getFilter()" will be unspecified then!
sal_Bool RequestFilterSelect_Impl::isAbort() const
bool RequestFilterSelect_Impl::isAbort() const
{
return m_pAbort->wasSelected();
}
......@@ -181,7 +181,7 @@ RequestFilterSelect::~RequestFilterSelect()
// return abort state of interaction
// If it is true, return value of method "getFilter()" will be unspecified then!
sal_Bool RequestFilterSelect::isAbort() const
bool RequestFilterSelect::isAbort() const
{
return pImp->isAbort();
}
......
......@@ -204,7 +204,7 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC
else
{
// Support add-on images for context menu interceptors
Image aImage = aAddonOptions.GetImageFromURL( aCommandURL, sal_False, sal_True );
Image aImage = aAddonOptions.GetImageFromURL( aCommandURL, false, true );
if ( !!aImage )
pSubMenu->SetItemImage( nNewItemId, aImage );
}
......
......@@ -29,7 +29,7 @@ using namespace ::com::sun::star;
namespace framework
{
sal_Bool UIConfigurationImporterOOo1x::ImportCustomToolbars(
bool UIConfigurationImporterOOo1x::ImportCustomToolbars(
const uno::Reference< ui::XUIConfigurationManager2 >& rContainerFactory,
uno::Sequence< uno::Reference< container::XIndexContainer > >& rSeqContainer,
const uno::Reference< uno::XComponentContext >& rxContext,
......@@ -37,7 +37,7 @@ sal_Bool UIConfigurationImporterOOo1x::ImportCustomToolbars(
{
const char USERDEFTOOLBOX[] = "userdeftoolbox0.xml";
sal_Bool bResult ( sal_False );
bool bResult ( false );
if ( rToolbarStorage.is() && rContainerFactory.is() )
{
try
......@@ -61,7 +61,7 @@ sal_Bool UIConfigurationImporterOOo1x::ImportCustomToolbars(
sal_uInt32 nIndex = rSeqContainer.getLength();
rSeqContainer.realloc( nIndex+1 );
rSeqContainer[nIndex] = xContainer;
bResult = sal_True;
bResult = true;
}
}
}
......
......@@ -45,7 +45,7 @@ TitleHelper::TitleHelper(const css::uno::Reference< css::uno::XComponentContext
, m_xOwner ()
, m_xUntitledNumbers()
, m_xSubTitle ()
, m_bExternalTitle (sal_False)
, m_bExternalTitle (false)
, m_sTitle ()
, m_nLeasedNumber (css::frame::UntitledNumbersConst::INVALID_NUMBER)
, m_aListener (m_aMutex)
......@@ -133,7 +133,7 @@ void SAL_CALL TitleHelper::setTitle(const OUString& sTitle)
// SYNCHRONIZED ->
::osl::ResettableMutexGuard aLock(m_aMutex);
m_bExternalTitle = sal_True;
m_bExternalTitle = true;
m_sTitle = sTitle;
aLock.clear ();
......@@ -383,7 +383,7 @@ void TitleHelper::impl_updateTitleForModel (const css::uno::Reference< css::fram
// WORKAROUND: the notification is currently sent always,
// can be changed after shared mode is supported per UNO API
sal_Bool bChanged = !init; // && m_sTitle != sTitle
bool bChanged = !init; // && m_sTitle != sTitle
m_sTitle = sTitle;
m_nLeasedNumber = nLeasedNumber;
......@@ -450,9 +450,9 @@ void TitleHelper::impl_updateTitleForController (const css::uno::Reference< css:
aLock.reset ();
OUString sNewTitle = sTitle.makeStringAndClear ();
sal_Bool bChanged = !init && m_sTitle != sNewTitle;
m_sTitle = sNewTitle;
m_nLeasedNumber = nLeasedNumber;
bool bChanged = !init && m_sTitle != sNewTitle;
m_sTitle = sNewTitle;
m_nLeasedNumber = nLeasedNumber;
aLock.clear ();
// <- SYNCHRONIZED
......@@ -497,8 +497,8 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram
aLock.reset ();
OUString sNewTitle = sTitle.makeStringAndClear ();
sal_Bool bChanged = !init && m_sTitle != sNewTitle;
m_sTitle = sNewTitle;
bool bChanged = !init && m_sTitle != sNewTitle;
m_sTitle = sNewTitle;
aLock.clear ();
// <- SYNCHRONIZED
......
......@@ -1006,25 +1006,25 @@ namespace framework
}
::sal_Bool UndoManagerHelper::isUndoPossible() const
bool UndoManagerHelper::isUndoPossible() const
{
// SYNCHRONIZED --->
::osl::MutexGuard aGuard( m_pImpl->getMutex() );
IUndoManager& rUndoManager = m_pImpl->getUndoManager();
if ( rUndoManager.IsInListAction() )
return sal_False;
return false;
return rUndoManager.GetUndoActionCount( IUndoManager::TopLevel ) > 0;
// <--- SYNCHRONIZED
}
::sal_Bool UndoManagerHelper::isRedoPossible() const
bool UndoManagerHelper::isRedoPossible() const
{
// SYNCHRONIZED --->
::osl::MutexGuard aGuard( m_pImpl->getMutex() );
const IUndoManager& rUndoManager = m_pImpl->getUndoManager();
if ( rUndoManager.IsInListAction() )
return sal_False;
return false;
return rUndoManager.GetRedoActionCount( IUndoManager::TopLevel ) > 0;
// <--- SYNCHRONIZED
}
......@@ -1132,7 +1132,7 @@ namespace framework
}
::sal_Bool UndoManagerHelper::isLocked()
bool UndoManagerHelper::isLocked()
{
// SYNCHRONIZED --->
::osl::MutexGuard aGuard( m_pImpl->getMutex() );
......
......@@ -86,7 +86,7 @@ void SAL_CALL PreventDuplicateInteraction::handle(const css::uno::Reference< css
throw(css::uno::RuntimeException, std::exception)
{
css::uno::Any aRequest = xRequest->getRequest();
sal_Bool bHandleIt = sal_True;
bool bHandleIt = true;
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
......@@ -224,8 +224,8 @@ void PreventDuplicateInteraction::addInteractionRule(const PreventDuplicateInter
sal_Bool PreventDuplicateInteraction::getInteractionInfo(const css::uno::Type& aInteraction,
PreventDuplicateInteraction::InteractionInfo* pReturn ) const
bool PreventDuplicateInteraction::getInteractionInfo(const css::uno::Type& aInteraction,
PreventDuplicateInteraction::InteractionInfo* pReturn ) const
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
......@@ -239,14 +239,14 @@ sal_Bool PreventDuplicateInteraction::getInteractionInfo(const css::uno::Type&
if (rInfo.m_aInteraction == aInteraction)
{
*pReturn = rInfo;
return sal_True;
return true;
}
}
aLock.clear();
// <- SAFE
return sal_False;
return false;
}
} // namespace framework
......
......@@ -42,7 +42,7 @@ using namespace ::com::sun::star::container;
namespace framework
{
sal_Bool StatusBarConfiguration::LoadStatusBar(
bool StatusBarConfiguration::LoadStatusBar(
const Reference< XComponentContext >& rxContext,
const Reference< XInputStream >& xInputStream,
const Reference< XIndexContainer >& rStatusbarConfiguration )
......@@ -63,23 +63,23 @@ sal_Bool StatusBarConfiguration::LoadStatusBar(
try
{
xParser->parseStream( aInputSource );
return sal_True;
return true;
}
catch ( const RuntimeException& )
{
return sal_False;
return false;
}
catch( const SAXException& )
{
return sal_False;
return false;
}
catch( const ::com::sun::star::io::IOException& )
{
return sal_False;
return false;
}
}
sal_Bool StatusBarConfiguration::StoreStatusBar(
bool StatusBarConfiguration::StoreStatusBar(
const Reference< XComponentContext >& rxContext,
const Reference< XOutputStream >& xOutputStream,
const Reference< XIndexAccess >& rStatusbarConfiguration )
......@@ -91,19 +91,19 @@ sal_Bool StatusBarConfiguration::StoreStatusBar(
{
OWriteStatusBarDocumentHandler aWriteStatusBarDocumentHandler( rStatusbarConfiguration, xWriter );
aWriteStatusBarDocumentHandler.WriteStatusBarDocument();
return sal_True;
return true;
}
catch ( const RuntimeException& )
{
return sal_False;
return false;
}
catch ( const SAXException& )
{
return sal_False;
return false;
}
catch ( const ::com::sun::star::io::IOException& )
{
return sal_False;
return false;
}
}
}
......
......@@ -42,7 +42,7 @@ using namespace ::com::sun::star::container;
namespace framework
{
sal_Bool ToolBoxConfiguration::LoadToolBox(
bool ToolBoxConfiguration::LoadToolBox(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rToolbarConfiguration )
......@@ -64,24 +64,24 @@ sal_Bool ToolBoxConfiguration::LoadToolBox(
try
{
xParser->parseStream( aInputSource );
return sal_True;
return true;
}
catch ( const RuntimeException& )
{
return sal_False;
return false;
}
catch( const SAXException& )
{
return sal_False;
return false;
}
catch( const ::com::sun::star::io::IOException& )
{
return sal_False;
return false;
}
}
sal_Bool ToolBoxConfiguration::StoreToolBox(
bool ToolBoxConfiguration::StoreToolBox(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rToolbarConfiguration )
......@@ -94,19 +94,19 @@ sal_Bool ToolBoxConfiguration::StoreToolBox(
Reference< XDocumentHandler > xHandler( xWriter, UNO_QUERY_THROW );
OWriteToolBoxDocumentHandler aWriteToolBoxDocumentHandler( rToolbarConfiguration, xHandler );
aWriteToolBoxDocumentHandler.WriteToolBoxDocument();
return sal_True;
return true;
}
catch ( const RuntimeException& )
{
return sal_False;
return false;
}
catch ( const SAXException& )
{
return sal_False;
return false;
}
catch ( const ::com::sun::star::io::IOException& )
{
return sal_False;
return false;
}
}
......
......@@ -108,7 +108,7 @@ ImageButtonToolbarController::ImageButtonToolbarController(
{
sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
Image aImage = AddonsOptions().GetImageFromURL( aCommand, bBigImages, sal_True );
Image aImage = AddonsOptions().GetImageFromURL( aCommand, bBigImages, true );
// Height will be controlled by scaling according to button height
m_pToolbar->SetItemImage( m_nID, aImage );
......
......@@ -50,9 +50,9 @@ class FWE_DLLPUBLIC AddonPopupMenu : public AddonMenu
~AddonPopupMenu();
// Check if command URL string has the unique prefix to identify addon popup menus
static sal_Bool IsCommandURLPrefix( const OUString& aCmdURL );
static bool IsCommandURLPrefix( const OUString& aCmdURL );
void SetCommandURL( const OUString& aCmdURL ) { m_aCommandURL = aCmdURL; }
void SetCommandURL( const OUString& aCmdURL ) { m_aCommandURL = aCmdURL; }
const OUString& GetCommandURL() const { return m_aCommandURL; }
protected:
......@@ -75,12 +75,12 @@ class FWE_DLLPUBLIC AddonMenuManager
ADDON_POPUPMENU
};
static sal_Bool HasAddonMenuElements();
static bool HasAddonMenuElements();
static sal_Bool IsAddonMenuId( sal_uInt16 nId ) { return (( nId >= ADDONMENU_ITEMID_START ) && ( nId < ADDONMENU_ITEMID_END )); }
static bool IsAddonMenuId( sal_uInt16 nId ) { return (( nId >= ADDONMENU_ITEMID_START ) && ( nId < ADDONMENU_ITEMID_END )); }
// Check if the context string matches the provided xModel context
static sal_Bool IsCorrectContext( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, const OUString& aContext );
static bool IsCorrectContext( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, const OUString& aContext );
// Factory method to create different Add-On menu types
static PopupMenu* CreatePopupMenuType( MenuType eMenuType, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame );
......
......@@ -190,10 +190,10 @@ class FWE_DLLPUBLIC AddonsOptions
@descr Call to retrieve if a addons menu is available
@return sal_True if there is a menu otherwise sal_False
@return true if there is a menu otherwise false
*//*-*****************************************************************************************************/
sal_Bool HasAddonsMenu() const;
bool HasAddonsMenu() const;
/*-****************************************************************************************************
@short returns number of addons toolbars
......@@ -308,8 +308,8 @@ class FWE_DLLPUBLIC AddonsOptions
@onerror An empty image
*//*-*****************************************************************************************************/
Image GetImageFromURL( const OUString& aURL, sal_Bool bBig, sal_Bool bNoScale ) const;
Image GetImageFromURL( const OUString& aURL, sal_Bool bBig ) const;
Image GetImageFromURL( const OUString& aURL, bool bBig, bool bNoScale ) const;
Image GetImageFromURL( const OUString& aURL, bool bBig ) const;
// private methods
......
......@@ -33,7 +33,7 @@ namespace framework
class FWE_DLLPUBLIC UIConfigurationImporterOOo1x
{
public:
static sal_Bool ImportCustomToolbars(
static bool ImportCustomToolbars(
const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager2 >& rContainerFactory,
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > >& rSeqContainer,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
......
......@@ -140,17 +140,17 @@ class FWE_DLLPUBLIC FrameListAnalyzer
/** is set to true only, if the reference frame is a hidden one.
This value is undefined if m_eDetectMode doesn't have set the flag E_HIDDEN! */
sal_Bool m_bReferenceIsHidden;
bool m_bReferenceIsHidden;
/** is set to true only, if the reference frame contains the help component.
In this case the member m_xHelp is set to NULL every time.
This value is undefined if m_eDetectMode doesn't have set the flag E_HELP! */
sal_Bool m_bReferenceIsHelp;
bool m_bReferenceIsHelp;
/** is set to true only, if the reference frame contains the backing component.
In this case the member m_xBackingComponent is set to NULL every time.
This value is undefined if m_eDetectMode doesn't have set the flag E_BACKINGCOMPONENT! */
sal_Bool m_bReferenceIsBacking;
bool m_bReferenceIsBacking;
// interface
......
......@@ -69,7 +69,7 @@ class FWE_DLLPUBLIC RequestFilterSelect
public:
RequestFilterSelect( const OUString& sURL );
~RequestFilterSelect();
sal_Bool isAbort () const;
bool isAbort () const;
OUString getFilter() const;
com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest > GetRequest();
};
......
......@@ -224,12 +224,12 @@ class FWE_DLLPUBLIC PreventDuplicateInteraction : private ThreadHelpBase2
- the interaction itself, so it can be analyzed further
@return [boolean]
sal_True if the queried interaction could be found.
sal_False otherwise.
true if the queried interaction could be found.
false otherwise.
@threadsafe yes
*/
virtual sal_Bool getInteractionInfo(const css::uno::Type& aInteraction,
virtual bool getInteractionInfo(const css::uno::Type& aInteraction,
PreventDuplicateInteraction::InteractionInfo* pReturn ) const;
};
......
......@@ -35,12 +35,12 @@ namespace framework
class FWE_DLLPUBLIC StatusBarConfiguration
{
public:
static sal_Bool LoadStatusBar(
static bool LoadStatusBar(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInputStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rStatusbarConfiguration );
static sal_Bool StoreStatusBar(
static bool StoreStatusBar(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutputStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rStatusbarConfiguration );
......
......@@ -187,7 +187,7 @@ class FWE_DLLPUBLIC TitleHelper : private ::cppu::BaseMutex
It was set from outside and so outside code has to make sure it will be
updated.
*/
::sal_Bool m_bExternalTitle;
bool m_bExternalTitle;
/** the actual title value */
OUString m_sTitle;
......
......@@ -34,12 +34,12 @@ namespace framework
class FWE_DLLPUBLIC ToolBoxConfiguration
{
public:
static sal_Bool LoadToolBox(
static bool LoadToolBox(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rToolbarConfiguration );
static sal_Bool StoreToolBox(
static bool StoreToolBox(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rToolbarConfiguration );
......
......@@ -126,8 +126,8 @@ namespace framework
void addUndoAction( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoAction >& i_action, IMutexGuard& i_instanceLock );
void undo( IMutexGuard& i_instanceLock );
void redo( IMutexGuard& i_instanceLock );
::sal_Bool isUndoPossible() const;
::sal_Bool isRedoPossible() const;
bool isUndoPossible() const;
bool isRedoPossible() const;
OUString getCurrentUndoActionTitle() const;
OUString getCurrentRedoActionTitle() const;
::com::sun::star::uno::Sequence< OUString >
......@@ -143,7 +143,7 @@ namespace framework
// XLockable, base of XUndoManager, equivalents
void lock();
void unlock();
::sal_Bool isLocked();
bool isLocked();
// XModifyBroadcaster equivalents
void addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& i_listener );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment