Kaydet (Commit) 2f7f1fd0 authored tarafından Khaled Hosny's avatar Khaled Hosny

Simplify this code a bit

Change-Id: I591484788c5bcb9b9cde9696b149ede7298015a5
üst 7c1aa21e
......@@ -903,20 +903,14 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
fprintf( stderr, "ttc: %s contains %d fonts\n", aFullPath.getStr(), nLength );
#endif
sal_uInt64 fileSize;
sal_uInt64 fileSize = 0;
OUString aURL;
if (!osl::File::getFileURLFromSystemPath(OStringToOUString(aFullPath, osl_getThreadTextEncoding()),
if (osl::File::getFileURLFromSystemPath(OStringToOUString(aFullPath, osl_getThreadTextEncoding()),
aURL))
{
fileSize = 0;
}
else
{
osl::File aFile(aURL);
if (aFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock) != osl::File::E_None)
fileSize = 0;
else
if (aFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock) == osl::File::E_None)
{
osl::DirectoryItem aItem;
osl::DirectoryItem::get( aURL, aItem );
......
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