diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-15 21:55:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-15 21:55:29 +0200 |
commit | ea846caaa16a036cb4dfaf96262203a6eeaea7f1 (patch) | |
tree | 6753a969b5b80112dbf41abfb4ce68dbc78a6c53 /fpicker | |
parent | 082664d4adb9ec1268dea7b8210fc3f9c681d3a3 (diff) |
loplugin:salbool
Change-Id: Id2d9e8bf20b196d3a107802ac07ffb1ef61dfc60
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/aqua/ControlHelper.hxx | 2 | ||||
-rw-r--r-- | fpicker/source/aqua/ControlHelper.mm | 18 | ||||
-rw-r--r-- | fpicker/source/aqua/FilterHelper.hxx | 8 | ||||
-rw-r--r-- | fpicker/source/aqua/FilterHelper.mm | 30 |
4 files changed, 29 insertions, 29 deletions
diff --git a/fpicker/source/aqua/ControlHelper.hxx b/fpicker/source/aqua/ControlHelper.hxx index c77ed935b11d..1e2a774d262e 100644 --- a/fpicker/source/aqua/ControlHelper.hxx +++ b/fpicker/source/aqua/ControlHelper.hxx @@ -55,7 +55,7 @@ public: void setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue ); uno::Any getValue( sal_Int16 nControlId, sal_Int16 nControlAction ) const; - void enableControl( sal_Int16 nControlId, sal_Bool bEnable ) const; + void enableControl( sal_Int16 nControlId, bool bEnable ) const; OUString getLabel( sal_Int16 nControlId ); void setLabel( sal_Int16 nControlId, NSString* aLabel ); diff --git a/fpicker/source/aqua/ControlHelper.mm b/fpicker/source/aqua/ControlHelper.mm index 08a3971a6cf9..591e382ffa6d 100644 --- a/fpicker/source/aqua/ControlHelper.mm +++ b/fpicker/source/aqua/ControlHelper.mm @@ -157,9 +157,9 @@ void ControlHelper::initialize( sal_Int16 nTemplateId ) // XFilePickerControlAccess functions -void ControlHelper::enableControl( const sal_Int16 nControlId, const sal_Bool bEnable ) const +void ControlHelper::enableControl( const sal_Int16 nControlId, const bool bEnable ) const { - DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "enable", bEnable); + DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "enable", int(bEnable)); SolarMutexGuard aGuard; @@ -264,7 +264,7 @@ void ControlHelper::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, co if( [pControl class] == [NSPopUpButton class] ) { HandleSetListValue(pControl, nControlAction, rValue); } else if( [pControl class] == [NSButton class] ) { - sal_Bool bChecked = false; + bool bChecked = false; rValue >>= bChecked; SAL_INFO("fpicker.aqua"," value is a bool: " << bChecked); [(NSButton*)pControl setState:(bChecked ? NSOnState : NSOffState)]; @@ -289,13 +289,13 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction if( pControl == nil ) { SAL_INFO("fpicker.aqua","get value for unknown control " << nControlId); - aRetval <<= sal_True; + aRetval <<= true; } else { if( [pControl class] == [NSPopUpButton class] ) { aRetval = HandleGetListValue(pControl, nControlAction); } else if( [pControl class] == [NSButton class] ) { //NSLog(@"control: %@", [[pControl cell] title]); - sal_Bool bValue = [(NSButton*)pControl state] == NSOnState ? sal_True : sal_False; + bool bValue = [(NSButton*)pControl state] == NSOnState; aRetval <<= bValue; SAL_INFO("fpicker.aqua","value is a bool (checkbox): " << bValue); } @@ -332,8 +332,8 @@ void ControlHelper::createUserPane() int currentHeight = kAquaSpaceBoxFrameViewDiffTop + kAquaSpaceBoxFrameViewDiffBottom; int currentWidth = 300; - sal_Bool bPopupControlPresent = NO; - sal_Bool bButtonControlPresent = NO; + bool bPopupControlPresent = false; + bool bButtonControlPresent = false; int nCheckboxMaxWidth = 0; int nPopupMaxWidth = 0; @@ -355,7 +355,7 @@ void ControlHelper::createUserPane() // Note: controls are grouped by kind, first all popup menus, then checkboxes if ([pControl class] == [NSPopUpButton class]) { - if (bPopupControlPresent == YES) { + if (bPopupControlPresent) { //this is not the first popup currentHeight += kAquaSpaceBetweenPopupMenus; } @@ -363,7 +363,7 @@ void ControlHelper::createUserPane() currentHeight += kAquaSpaceBetweenControls; } - bPopupControlPresent = YES; + bPopupControlPresent = true; // we have to add the label text width NSString *label = m_aMapListLabels[pControl]; diff --git a/fpicker/source/aqua/FilterHelper.hxx b/fpicker/source/aqua/FilterHelper.hxx index 0464b1ce4d9a..e5e939d57ebf 100644 --- a/fpicker/source/aqua/FilterHelper.hxx +++ b/fpicker/source/aqua/FilterHelper.hxx @@ -59,7 +59,7 @@ public: OUStringList getFilterSuffixList() const { return m_sFilterSuffixList; } /// determines if the filter has sub filter (i.e., the filter is a filter group in real) - sal_Bool hasSubFilters( ) const; + bool hasSubFilters( ) const; /** retrieves the filters belonging to the entry @return @@ -105,15 +105,15 @@ public: OUStringList getCurrentFilterSuffixList(); int getCurrentFilterIndex(); void SetFilters(); - sal_Bool filenameMatchesFilter(NSString * sFilename); + bool filenameMatchesFilter(NSString * sFilename); private: FilterList *m_pFilterList; OUString m_aCurrentFilter; NSStringList *m_pFilterNames; - sal_Bool FilterNameExists( const OUString& rTitle ); - sal_Bool FilterNameExists( const UnoFilterList& _rGroupedFilters ); + bool FilterNameExists( const OUString& rTitle ); + bool FilterNameExists( const UnoFilterList& _rGroupedFilters ); void ensureFilterList( const OUString& _rInitialCurrentFilter ); diff --git a/fpicker/source/aqua/FilterHelper.mm b/fpicker/source/aqua/FilterHelper.mm index 99c1e93cf584..d162af3c2490 100644 --- a/fpicker/source/aqua/FilterHelper.mm +++ b/fpicker/source/aqua/FilterHelper.mm @@ -44,10 +44,10 @@ FilterEntry::FilterEntry( const rtl::OUString& _rTitle, const UnoFilterList& _rS } -sal_Bool FilterEntry::hasSubFilters() const +bool FilterEntry::hasSubFilters() const { // OSL_TRACE(">>> FilterEntry::%s", __func__); - sal_Bool bReturn = ( 0 < m_aSubFilters.getLength() ); + bool bReturn = ( 0 < m_aSubFilters.getLength() ); // OSL_TRACE("<<< FilterEntry::%s retVal: %d", __func__, bReturn); return bReturn; } @@ -203,9 +203,9 @@ FilterHelper::~FilterHelper() } -sal_Bool FilterHelper::FilterNameExists( const rtl::OUString& rTitle ) +bool FilterHelper::FilterNameExists( const rtl::OUString& rTitle ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( m_pFilterList ) bRet = @@ -219,9 +219,9 @@ sal_Bool FilterHelper::FilterNameExists( const rtl::OUString& rTitle ) } -sal_Bool FilterHelper::FilterNameExists( const UnoFilterList& _rGroupedFilters ) +bool FilterHelper::FilterNameExists( const UnoFilterList& _rGroupedFilters ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( m_pFilterList ) { @@ -351,7 +351,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno:: SolarMutexGuard aGuard; //add a separator if this is not the first group to be added - sal_Bool bPrependSeparator = m_pFilterList != NULL; + bool bPrependSeparator = m_pFilterList != NULL; // ensure that we have a filter list ::rtl::OUString sInitialCurrentFilter; @@ -375,13 +375,13 @@ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno:: DBG_PRINT_EXIT(CLASS_NAME, __func__); } -sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename) +bool FilterHelper::filenameMatchesFilter(NSString* sFilename) { DBG_PRINT_ENTRY(CLASS_NAME, __func__); if (m_aCurrentFilter == NULL) { OSL_TRACE("filter name is null"); - return sal_True; + return true; } NSFileManager *manager = [NSFileManager defaultManager]; @@ -398,14 +398,14 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename) NSString* pT = (NSString*)pType; if( [pT isEqualToString: NSFileTypeDirectory] || [pT isEqualToString: NSFileTypeSymbolicLink] ) - return sal_True; + return true; } } FilterList::iterator filter = ::std::find_if(m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch(m_aCurrentFilter)); if (filter == m_pFilterList->end()) { OSL_TRACE("filter not found in list"); - return sal_True; + return true; } OUStringList suffixList = filter->getFilterSuffixList(); @@ -415,7 +415,7 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename) rtl::OUString allMatcher(".*"); for(OUStringList::iterator iter = suffixList.begin(); iter != suffixList.end(); iter++) { if (aName.matchIgnoreAsciiCase(*iter, aName.getLength() - (*iter).getLength()) || ((*iter).equals(allMatcher))) { - return sal_True; + return true; } } } @@ -424,15 +424,15 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename) NSString* pResolved = resolveAlias( sFilename ); if( pResolved ) { - sal_Bool bResult = filenameMatchesFilter( pResolved ); + bool bResult = filenameMatchesFilter( pResolved ); [pResolved autorelease]; if( bResult ) - return sal_True; + return true; } DBG_PRINT_EXIT(CLASS_NAME, __func__); - return sal_False; + return false; } FilterList* FilterHelper::getFilterList() { |