remove Attribute_XXX in favor of osl_File_Attribute_XXX (desktop)
This commit is contained in:
parent
ce6738ec7b
commit
9cc6dfd98f
4 changed files with 19 additions and 19 deletions
|
@ -2920,7 +2920,7 @@ RTLFUNC(GetAttr)
|
|||
FileStatus aFileStatus( osl_FileStatus_Mask_Attributes | osl_FileStatus_Mask_Type );
|
||||
aItem.getFileStatus( aFileStatus );
|
||||
sal_uInt64 nAttributes = aFileStatus.getAttributes();
|
||||
sal_Bool bReadOnly = (nAttributes & Attribute_ReadOnly) != 0;
|
||||
sal_Bool bReadOnly = (nAttributes & osl_File_Attribute_ReadOnly) != 0;
|
||||
|
||||
FileStatus::Type aType = aFileStatus.getFileType();
|
||||
sal_Bool bDirectory = isFolder( aType );
|
||||
|
|
|
@ -240,7 +240,7 @@ namespace desktop {
|
|||
|
||||
#ifdef UNIX
|
||||
// set safer permissions for the user directory by default
|
||||
File::setAttributes(aUserPath, Attribute_OwnWrite| Attribute_OwnRead| Attribute_OwnExe);
|
||||
File::setAttributes(aUserPath, osl_File_Attribute_OwnWrite| osl_File_Attribute_OwnRead| osl_File_Attribute_OwnExe);
|
||||
#endif
|
||||
|
||||
// copy data from shared data directory of base installation
|
||||
|
|
|
@ -3332,11 +3332,11 @@ sal_Bool SfxMedium::SetWritableForUserOnly( const ::rtl::OUString& aURL )
|
|||
{
|
||||
sal_uInt64 nAttributes = aFileStatus.getAttributes();
|
||||
|
||||
nAttributes &= ~(Attribute_OwnWrite |
|
||||
Attribute_GrpWrite |
|
||||
Attribute_OthWrite |
|
||||
Attribute_ReadOnly);
|
||||
nAttributes |= Attribute_OwnWrite;
|
||||
nAttributes &= ~(osl_File_Attribute_OwnWrite |
|
||||
osl_File_Attribute_GrpWrite |
|
||||
osl_File_Attribute_OthWrite |
|
||||
osl_File_Attribute_ReadOnly);
|
||||
nAttributes |= osl_File_Attribute_OwnWrite;
|
||||
|
||||
bResult = ( osl::File::setAttributes( aURL, nAttributes ) == ::osl::FileBase::E_None );
|
||||
}
|
||||
|
|
|
@ -951,23 +951,23 @@ shell::setv( const rtl::OUString& aUnqPath,
|
|||
if(err == osl::FileBase::E_None) {
|
||||
if(values[i].Name == IsReadOnly)
|
||||
{
|
||||
nAttributes &= ~(Attribute_OwnWrite |
|
||||
Attribute_GrpWrite |
|
||||
Attribute_OthWrite |
|
||||
Attribute_ReadOnly);
|
||||
nAttributes &= ~(osl_File_Attribute_OwnWrite |
|
||||
osl_File_Attribute_GrpWrite |
|
||||
osl_File_Attribute_OthWrite |
|
||||
osl_File_Attribute_ReadOnly);
|
||||
if(value)
|
||||
nAttributes |= Attribute_ReadOnly;
|
||||
nAttributes |= osl_File_Attribute_ReadOnly;
|
||||
else
|
||||
nAttributes |= (
|
||||
Attribute_OwnWrite |
|
||||
Attribute_GrpWrite |
|
||||
Attribute_OthWrite);
|
||||
osl_File_Attribute_OwnWrite |
|
||||
osl_File_Attribute_GrpWrite |
|
||||
osl_File_Attribute_OthWrite);
|
||||
}
|
||||
else if(values[i].Name == IsHidden)
|
||||
{
|
||||
nAttributes &= ~(Attribute_Hidden);
|
||||
nAttributes &= ~(osl_File_Attribute_Hidden);
|
||||
if(value)
|
||||
nAttributes |= Attribute_Hidden;
|
||||
nAttributes |= osl_File_Attribute_Hidden;
|
||||
}
|
||||
err = osl::File::setAttributes(
|
||||
aUnqPath,nAttributes);
|
||||
|
@ -2426,7 +2426,7 @@ shell::commit( const shell::ContentMap::iterator& it,
|
|||
if( aFileStatus.isValid( osl_FileStatus_Mask_Attributes ) )
|
||||
{
|
||||
sal_uInt64 Attr = aFileStatus.getAttributes();
|
||||
sal_Bool readonly = ( Attr & Attribute_ReadOnly ) != 0;
|
||||
sal_Bool readonly = ( Attr & osl_File_Attribute_ReadOnly ) != 0;
|
||||
it1->setValue( uno::makeAny( readonly ) );
|
||||
}
|
||||
}
|
||||
|
@ -2437,7 +2437,7 @@ shell::commit( const shell::ContentMap::iterator& it,
|
|||
if( aFileStatus.isValid( osl_FileStatus_Mask_Attributes ) )
|
||||
{
|
||||
sal_uInt64 Attr = aFileStatus.getAttributes();
|
||||
sal_Bool ishidden = ( Attr & Attribute_Hidden ) != 0;
|
||||
sal_Bool ishidden = ( Attr & osl_File_Attribute_Hidden ) != 0;
|
||||
it1->setValue( uno::makeAny( ishidden ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue