diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-01-29 15:27:56 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-01-29 15:27:56 +0000 |
commit | 7ef0d37fbeeec4ea0630a4d36543a7f75f114f84 (patch) | |
tree | 534eb2cf557a0412ac0c4898fcf0f7c7045e831b /sfx2/source | |
parent | 4bd28a2fee0d36c67911019eeb7d934838e27cad (diff) |
INTEGRATION: CWS fwk82_SRC680 (1.198.28.1.2); FILE MERGED
2008/01/15 17:13:42 mba 1.198.28.1.2.1: #152862#: ODFVersion check finally done on ODFVersion property
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 45 |
1 files changed, 8 insertions, 37 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 638fb295cde1..e56e1fdc93e4 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -4,9 +4,9 @@ * * $RCSfile: objstor.cxx,v $ * - * $Revision: 1.199 $ + * $Revision: 1.200 $ * - * last change: $Author: obo $ $Date: 2008-01-04 16:34:26 $ + * last change: $Author: rt $ $Date: 2008-01-29 16:27:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -931,56 +931,27 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) // property "AutoCheckEnabled" not set } - if ( bOnlineUpdateEnabled - /*!!!&& pMedium->GetInteractionHandler().is()*/ - && !SFX_APP()->Get_Impl()->bODFVersionWarningLater ) + if ( pMedium->GetInteractionHandler().is() && !SFX_APP()->Get_Impl()->bODFVersionWarningLater ) { // scan the generator string (within meta.xml) SfxDocumentInfo aDocInfo( this ); uno::Reference< beans::XPropertySet > xSet( aDocInfo.GetInfo(), UNO_QUERY ); if ( xSet.is() ) { - // the new property "ODFVersion" is a temporary solution - // because at the moment the "Generator" property is not set correctly - uno::Any aAny; - try - { - aAny = xSet->getPropertyValue( DEFINE_CONST_UNICODE("ODFVersion") ); - } - catch( const uno::Exception& ) - { - // Custom Property "ODFVersion" not exists - } - - bool bFound = false; + // the new property "ODFVersion" is a temporary solution for OOo2.4 + uno::Any aAny = xSet->getPropertyValue( DEFINE_CONST_UNICODE("ODFVersion") ); ::rtl::OUString sTemp; - if ( aAny >>= sTemp ) - { - bFound = true; - if ( !sTemp.equalsAscii( "1.0" ) ) - { - // document is generated by an newer office - sfx2::NewerVersionWarningDialog aDlg( NULL ); - aDlg.Execute(); - } - } - - aAny = xSet->getPropertyValue( DEFINE_CONST_UNICODE("Generator") ); - if ( !bFound && ( aAny >>= sTemp ) ) + if ( (aAny >>= sTemp) && sTemp.getLength() ) { - String sGenerator( sTemp ); - String sWorkStamp = sGenerator.GetToken( 1, '$' ).GetToken( 1, '/' ); - sal_Int32 nWorkStamp = sWorkStamp.ToInt32(); - if ( nWorkStamp > SUPD ) + if ( !sTemp.equalsAscii( "1.0") && !sTemp.equalsAscii("1.1") ) { - // document is generated by an newer office + // newer ODF version than OOo2.4 sfx2::NewerVersionWarningDialog aDlg( NULL ); aDlg.Execute(); } } } } - // <-- } else GetpApp()->HideStatusText(); |