writerperfect: sal_Bool->bool

Change-Id: Ic51f9ed2c2c2fced13c8b279912410f9c1638ff9
This commit is contained in:
Noel Grandin 2014-04-30 10:00:10 +02:00
parent 19d35573fa
commit a86ad4d11c
4 changed files with 14 additions and 14 deletions

View File

@ -69,9 +69,9 @@ namespace
{ {
template<class T> template<class T>
sal_Bool lcl_queryIsPackage( const Sequence<T> &lComponentData ) bool lcl_queryIsPackage( const Sequence<T> &lComponentData )
{ {
sal_Bool bIsPackage = sal_False; bool bIsPackage = false;
const sal_Int32 nLength = lComponentData.getLength(); const sal_Int32 nLength = lComponentData.getLength();
const T *pValue = lComponentData.getConstArray(); const T *pValue = lComponentData.getConstArray();
@ -87,7 +87,7 @@ sal_Bool lcl_queryIsPackage( const Sequence<T> &lComponentData )
return bIsPackage; return bIsPackage;
} }
sal_Bool lcl_isPackage( const Any &rComponentData ) bool lcl_isPackage( const Any &rComponentData )
{ {
Sequence < beans::NamedValue > lComponentDataNV; Sequence < beans::NamedValue > lComponentDataNV;
Sequence < beans::PropertyValue > lComponentDataPV; Sequence < beans::PropertyValue > lComponentDataPV;
@ -109,7 +109,7 @@ throw (RuntimeException, std::exception)
const PropertyValue *pValue = aDescriptor.getConstArray(); const PropertyValue *pValue = aDescriptor.getConstArray();
Reference < XInputStream > xInputStream; Reference < XInputStream > xInputStream;
Reference < ucb::XContent > xContent; Reference < ucb::XContent > xContent;
sal_Bool bIsPackage = sal_False; bool bIsPackage = false;
for ( sal_Int32 i = 0 ; i < nLength; i++) for ( sal_Int32 i = 0 ; i < nLength; i++)
{ {
if ( pValue[i].Name == "ComponentData" ) if ( pValue[i].Name == "ComponentData" )

View File

@ -74,7 +74,7 @@ public:
OUString KeynoteImportFilter_getImplementationName() OUString KeynoteImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
sal_Bool SAL_CALL KeynoteImportFilter_supportsService( const OUString &ServiceName ) bool SAL_CALL KeynoteImportFilter_supportsService( const OUString &ServiceName )
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames( ) ::com::sun::star::uno::Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames( )

View File

@ -85,7 +85,7 @@ static bool handleEmbeddedWPGImage(const WPXBinaryData &input, WPXBinaryData &ou
return true; return true;
} }
sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (RuntimeException) throw (RuntimeException)
{ {
SAL_INFO("writerperfect", "WordPerfectImportFilter::importImpl"); SAL_INFO("writerperfect", "WordPerfectImportFilter::importImpl");
@ -101,7 +101,7 @@ throw (RuntimeException)
if ( !xInputStream.is() ) if ( !xInputStream.is() )
{ {
OSL_ASSERT( false ); OSL_ASSERT( false );
return sal_False; return false;
} }
WPXSvInputStream input( xInputStream ); WPXSvInputStream input( xInputStream );
@ -118,7 +118,7 @@ throw (RuntimeException)
SfxPasswordDialog aPasswdDlg( 0 ); SfxPasswordDialog aPasswdDlg( 0 );
aPasswdDlg.SetMinLen(0); aPasswdDlg.SetMinLen(0);
if(!aPasswdDlg.Execute()) if(!aPasswdDlg.Execute())
return sal_False; return false;
OUString aPasswd = aPasswdDlg.GetPassword(); OUString aPasswd = aPasswdDlg.GetPassword();
aUtf8Passwd = OUStringToOString(aPasswd, RTL_TEXTENCODING_UTF8); aUtf8Passwd = OUStringToOString(aPasswd, RTL_TEXTENCODING_UTF8);
if (WPD_PASSWORD_MATCH_OK == WPDocument::verifyPassword(&input, aUtf8Passwd.getStr())) if (WPD_PASSWORD_MATCH_OK == WPDocument::verifyPassword(&input, aUtf8Passwd.getStr()))
@ -126,7 +126,7 @@ throw (RuntimeException)
else else
unsuccessfulAttempts++; unsuccessfulAttempts++;
if (unsuccessfulAttempts == 3) // timeout after 3 password atempts if (unsuccessfulAttempts == 3) // timeout after 3 password atempts
return sal_False; return false;
} }
} }
@ -148,8 +148,8 @@ throw (RuntimeException)
collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPGObject); collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPGObject);
collector.registerEmbeddedImageHandler("image/x-wpg", &handleEmbeddedWPGImage); collector.registerEmbeddedImageHandler("image/x-wpg", &handleEmbeddedWPGImage);
if (WPD_OK == WPDocument::parse(&input, &collector, aUtf8Passwd.isEmpty() ? 0 : aUtf8Passwd.getStr())) if (WPD_OK == WPDocument::parse(&input, &collector, aUtf8Passwd.isEmpty() ? 0 : aUtf8Passwd.getStr()))
return sal_True; return true;
return sal_False; return false;
} }
sal_Bool SAL_CALL WordPerfectImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) sal_Bool SAL_CALL WordPerfectImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )

View File

@ -41,7 +41,7 @@ protected:
OUString msFilterName; OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler; ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (::com::sun::star::uno::RuntimeException); throw (::com::sun::star::uno::RuntimeException);
public: public:
@ -80,7 +80,7 @@ public:
OUString WordPerfectImportFilter_getImplementationName() OUString WordPerfectImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
sal_Bool SAL_CALL WordPerfectImportFilter_supportsService( const OUString &ServiceName ) bool SAL_CALL WordPerfectImportFilter_supportsService( const OUString &ServiceName )
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames( ) ::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames( )
@ -136,7 +136,7 @@ public:
OUString WordPerfectImportFilterDialog_getImplementationName() OUString WordPerfectImportFilterDialog_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
sal_Bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const OUString &ServiceName ) bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const OUString &ServiceName )
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames( ) ::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames( )