diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-08-05 09:24:18 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-08-10 22:03:34 +0200 |
commit | 266c73ebd350a161be9b73715673c0b85e499ac4 (patch) | |
tree | ccd12ce27407c6e941d2131664d2f7dd23f87e0c /sfx2/source | |
parent | d20dc73be974dfc0a8524a3bad52e7874783fb34 (diff) |
Use ASCII literals in indexOf and compare result against 0
Change-Id: I3bea0f3d0566d46c9f92e74f452b6c5a009adcd6
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 2b3f496cb02c..ad839b0ccb24 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -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 ) ); |