diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-27 11:38:04 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-10-02 14:57:21 +0200 |
commit | b8df7f62c4afb62715bfde248541938d002102c2 (patch) | |
tree | ba8173778564540709e0f6d5cf3fbd5fce405474 /svl | |
parent | sal_Bool->bool in svl::OFSInputStreamContainer and OFSStreamContainer (diff) | |
download | core-b8df7f62c4afb62715bfde248541938d002102c2.tar.gz core-b8df7f62c4afb62715bfde248541938d002102c2.zip |
sal_Bool->bool in svl::PasswordContainer
Change-Id: I2be813554e773fade260a78eb677022b4c6991b0
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/inc/passwordcontainer.hxx | 58 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 24 |
2 files changed, 41 insertions, 41 deletions
diff --git a/svl/source/inc/passwordcontainer.hxx b/svl/source/inc/passwordcontainer.hxx index 6b69b3ce2c3b..5dfd5c6685ab 100644 --- a/svl/source/inc/passwordcontainer.hxx +++ b/svl/source/inc/passwordcontainer.hxx @@ -49,18 +49,18 @@ class NamePassRecord { - ::rtl::OUString m_aName; + ::rtl::OUString m_aName; // there are two lists of passwords, memory passwords and persistent passwords - sal_Bool m_bHasMemPass; + bool m_bHasMemPass; ::std::vector< ::rtl::OUString > m_aMemPass; // persistent passwords are encrypted in one string - sal_Bool m_bHasPersPass; + bool m_bHasPersPass; ::rtl::OUString m_aPersPass; - void InitArrays( sal_Bool bHasMemoryList, const ::std::vector< ::rtl::OUString >& aMemoryList, - sal_Bool bHasPersistentList, const ::rtl::OUString& aPersistentList ) + void InitArrays( bool bHasMemoryList, const ::std::vector< ::rtl::OUString >& aMemoryList, + bool bHasPersistentList, const ::rtl::OUString& aPersistentList ) { m_bHasMemPass = bHasMemoryList; if ( bHasMemoryList ) @@ -75,30 +75,30 @@ public: NamePassRecord( const ::rtl::OUString& aName ) : m_aName( aName ) - , m_bHasMemPass( sal_False ) - , m_bHasPersPass( sal_False ) + , m_bHasMemPass( false ) + , m_bHasPersPass( false ) { } NamePassRecord( const ::rtl::OUString& aName, const ::std::vector< ::rtl::OUString >& aMemoryList ) : m_aName( aName ) - , m_bHasMemPass( sal_True ) + , m_bHasMemPass( true ) , m_aMemPass( aMemoryList ) - , m_bHasPersPass( sal_False ) + , m_bHasPersPass( false ) { } NamePassRecord( const ::rtl::OUString& aName, const ::rtl::OUString& aPersistentList ) : m_aName( aName ) - , m_bHasMemPass( sal_False ) - , m_bHasPersPass( sal_True ) + , m_bHasMemPass( false ) + , m_bHasPersPass( true ) , m_aPersPass( aPersistentList ) { } NamePassRecord( const ::rtl::OUString& aName, - sal_Bool bHasMemoryList, const ::std::vector< ::rtl::OUString >& aMemoryList, - sal_Bool bHasPersistentList, const ::rtl::OUString aPersistentList ) + bool bHasMemoryList, const ::std::vector< ::rtl::OUString >& aMemoryList, + bool bHasPersistentList, const ::rtl::OUString aPersistentList ) : m_aName( aName ) , m_bHasMemPass( bHasMemoryList ) , m_bHasPersPass( bHasPersistentList ) @@ -108,8 +108,8 @@ public: NamePassRecord( const NamePassRecord& aRecord ) : m_aName( aRecord.m_aName ) - , m_bHasMemPass( sal_False ) - , m_bHasPersPass( sal_False ) + , m_bHasMemPass( false ) + , m_bHasPersPass( false ) { InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass ); } @@ -130,7 +130,7 @@ public: return m_aName; } - sal_Bool HasPasswords( sal_Int8 nStatus ) const + bool HasPasswords( sal_Int8 nStatus ) const { if ( nStatus == MEMORY_RECORD ) return m_bHasMemPass; @@ -159,25 +159,25 @@ public: void SetMemPasswords( const ::std::vector< ::rtl::OUString >& aMemList ) { m_aMemPass = aMemList; - m_bHasMemPass = sal_True; + m_bHasMemPass = true; } void SetPersPasswords( const ::rtl::OUString& aPersList ) { m_aPersPass = aPersList; - m_bHasPersPass = sal_True; + m_bHasPersPass = true; } void RemovePasswords( sal_Int8 nStatus ) { if ( nStatus == MEMORY_RECORD ) { - m_bHasMemPass = sal_False; + m_bHasMemPass = false; m_aMemPass.clear(); } else if ( nStatus == PERSISTENT_RECORD ) { - m_bHasPersPass = sal_False; + m_bHasPersPass = false; m_aPersPass = ::rtl::OUString(); } } @@ -194,14 +194,14 @@ typedef ::std::map< ::rtl::OUString, ::std::list< NamePassRecord > > PassMap; class PasswordContainer; class StorageItem : public ::utl::ConfigItem { - PasswordContainer* mainCont; - sal_Bool hasEncoded; + PasswordContainer* mainCont; + bool hasEncoded; ::rtl::OUString mEncoded; public: StorageItem( PasswordContainer* point, const ::rtl::OUString& path ) : ConfigItem( path, CONFIG_MODE_IMMEDIATE_UPDATE ), mainCont( point ), - hasEncoded( sal_False ) + hasEncoded( false ) { ::com::sun::star::uno::Sequence< ::rtl::OUString > aNode( 1 ); *aNode.getArray() = path; @@ -214,10 +214,10 @@ public: void remove( const ::rtl::OUString& url, const ::rtl::OUString& rec ); void clear(); - sal_Bool getEncodedMP( ::rtl::OUString& aResult ); - void setEncodedMP( const ::rtl::OUString& aResult, sal_Bool bAcceptEnmpty = sal_False ); - void setUseStorage( sal_Bool bUse ); - sal_Bool useStorage(); + bool getEncodedMP( ::rtl::OUString& aResult ); + void setEncodedMP( const ::rtl::OUString& aResult, bool bAcceptEnmpty = false ); + void setUseStorage( bool bUse ); + bool useStorage(); virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ); virtual void Commit(); @@ -251,7 +251,7 @@ private: ::com::sun::star::task::UserRecord CopyToUserRecord( const NamePassRecord& aRecord, - sal_Bool& io_bTryToDecode, + bool& io_bTryToDecode, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler ); ::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > FindUsr( @@ -282,7 +282,7 @@ bool createUrlRecord( ::rtl::OUString GetMasterPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); - void UpdateVector( const ::rtl::OUString& url, ::std::list< NamePassRecord >& toUpdate, NamePassRecord& rec, sal_Bool writeFile ) + void UpdateVector( const ::rtl::OUString& url, ::std::list< NamePassRecord >& toUpdate, NamePassRecord& rec, bool writeFile ) throw(::com::sun::star::uno::RuntimeException); void PrivateAdd( const ::rtl::OUString& aUrl, diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 0a86600acebb..213856fc00e0 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -258,7 +258,7 @@ PassMap StorageItem::getInfo() //------------------------------------------------------------------------- -void StorageItem::setUseStorage( sal_Bool bUse ) +void StorageItem::setUseStorage( bool bUse ) { Sequence< ::rtl::OUString > sendNames(1); Sequence< uno::Any > sendVals(1); @@ -273,7 +273,7 @@ void StorageItem::setUseStorage( sal_Bool bUse ) //------------------------------------------------------------------------- -sal_Bool StorageItem::useStorage() +bool StorageItem::useStorage() { Sequence< ::rtl::OUString > aNodeNames( 1 ); aNodeNames[0] = ::rtl::OUString("UseStorage"); @@ -286,7 +286,7 @@ sal_Bool StorageItem::useStorage() return sal_False; } - sal_Bool aResult = false; + bool aResult = false; aPropertyValues[0] >>= aResult; return aResult; @@ -294,12 +294,12 @@ sal_Bool StorageItem::useStorage() //------------------------------------------------------------------------- -sal_Bool StorageItem::getEncodedMP( ::rtl::OUString& aResult ) +bool StorageItem::getEncodedMP( ::rtl::OUString& aResult ) { if( hasEncoded ) { aResult = mEncoded; - return sal_True; + return true; } Sequence< ::rtl::OUString > aNodeNames( 2 ); @@ -311,7 +311,7 @@ sal_Bool StorageItem::getEncodedMP( ::rtl::OUString& aResult ) if( aPropertyValues.getLength() != aNodeNames.getLength() ) { OSL_ENSURE( aPropertyValues.getLength() == aNodeNames.getLength(), "Problems during reading\n" ); - return sal_False; + return false; } aPropertyValues[0] >>= hasEncoded; @@ -324,7 +324,7 @@ sal_Bool StorageItem::getEncodedMP( ::rtl::OUString& aResult ) //------------------------------------------------------------------------- -void StorageItem::setEncodedMP( const ::rtl::OUString& aEncoded, sal_Bool bAcceptEmpty ) +void StorageItem::setEncodedMP( const ::rtl::OUString& aEncoded, bool bAcceptEmpty ) { Sequence< ::rtl::OUString > sendNames(2); Sequence< uno::Any > sendVals(2); @@ -598,7 +598,7 @@ vector< ::rtl::OUString > PasswordContainer::DecodePasswords( const ::rtl::OUStr //------------------------------------------------------------------------- -void PasswordContainer::UpdateVector( const ::rtl::OUString& aURL, list< NamePassRecord >& toUpdate, NamePassRecord& aRecord, sal_Bool writeFile ) throw(RuntimeException) +void PasswordContainer::UpdateVector( const ::rtl::OUString& aURL, list< NamePassRecord >& toUpdate, NamePassRecord& aRecord, bool writeFile ) throw(RuntimeException) { for( list< NamePassRecord >::iterator aNPIter = toUpdate.begin(); aNPIter != toUpdate.end(); ++aNPIter ) if( aNPIter->GetUserName().equals( aRecord.GetUserName() ) ) @@ -632,7 +632,7 @@ void PasswordContainer::UpdateVector( const ::rtl::OUString& aURL, list< NamePas //------------------------------------------------------------------------- -UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, sal_Bool& io_bTryToDecode, const Reference< XInteractionHandler >& aHandler ) +UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, bool& io_bTryToDecode, const Reference< XInteractionHandler >& aHandler ) { ::std::vector< ::rtl::OUString > aPasswords; if( aRecord.HasPasswords( MEMORY_RECORD ) ) @@ -648,7 +648,7 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, s catch( NoMasterException& ) { // if master password could not be detected the entry will be just ignored - io_bTryToDecode = sal_False; + io_bTryToDecode = false; } } @@ -661,7 +661,7 @@ Sequence< UserRecord > PasswordContainer::CopyToUserRecordSequence( const list< { Sequence< UserRecord > aResult( original.size() ); sal_uInt32 nInd = 0; - sal_Bool bTryToDecode = sal_True; + bool bTryToDecode = true; for( list< NamePassRecord >::const_iterator aNPIter = original.begin(); aNPIter != original.end(); @@ -754,7 +754,7 @@ Sequence< UserRecord > PasswordContainer::FindUsr( const list< NamePassRecord >& if( aNPIter->GetUserName().equals( aName ) ) { Sequence< UserRecord > aResult(1); - sal_Bool bTryToDecode = sal_True; + bool bTryToDecode = true; aResult[0] = CopyToUserRecord( *aNPIter, bTryToDecode, aHandler ); return aResult; |