Kaydet (Commit) 266c73eb authored tarafından Matteo Casalin's avatar Matteo Casalin

Use ASCII literals in indexOf and compare result against 0

Change-Id: I3bea0f3d0566d46c9f92e74f452b6c5a009adcd6
üst d20dc73b
......@@ -777,25 +777,25 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( pFileFlagsItem )
{
const OUString aFileFlags = pFileFlagsItem->GetValue().toAsciiUpperCase();
if ( -1 != aFileFlags.indexOf( 0x0054 ) ) // T = 54h
if ( aFileFlags.indexOf('T') >= 0 )
{
rReq.RemoveItem( SID_TEMPLATE );
rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, true ) );
}
if ( -1 != aFileFlags.indexOf( 0x0048 ) ) // H = 48h
if ( aFileFlags.indexOf('H') >= 0 )
{
rReq.RemoveItem( SID_HIDDEN );
rReq.AppendItem( SfxBoolItem( SID_HIDDEN, true ) );
}
if ( -1 != aFileFlags.indexOf( 0x0052 ) ) // R = 52h
if ( aFileFlags.indexOf('R') >= 0 )
{
rReq.RemoveItem( SID_DOC_READONLY );
rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, true ) );
}
if ( -1 != aFileFlags.indexOf( 0x0042 ) ) // B = 42h
if ( aFileFlags.indexOf('B') >= 0 )
{
rReq.RemoveItem( SID_PREVIEW );
rReq.AppendItem( SfxBoolItem( SID_PREVIEW, true ) );
......
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