diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-05-28 12:07:23 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-05-28 12:07:23 +0000 |
commit | 2521da841fc89a9f38f7b75b32bbe6f746c39c01 (patch) | |
tree | d353494149cb6ee5e07d2207e496fcadbc6294bd /sfx2 | |
parent | 248720172183dcd3affe485984790b8d8e308b94 (diff) |
INTEGRATION: CWS odfversion241_DEV300 (1.198.28.5.12); FILE MERGED
2008/05/21 07:42:08 pb 1.198.28.5.12.2: fix: #i89096# no online update check anymore while checking ODF
2008/05/08 04:04:08 pb 1.198.28.5.12.1: fix: #i89151# consider AutoOnlineUpdate option before show odf warning
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index c5f93657d9..ef766f1717 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: objstor.cxx,v $ - * $Revision: 1.211 $ + * $Revision: 1.212 $ * * This file is part of OpenOffice.org. * @@ -840,27 +840,6 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) } } - // --> PB 2007-11-20 #i83653# Give warning if document contains features from new ODF version - // Online Update Check enabled? - sal_Bool bOnlineUpdateEnabled = sal_False; - uno::Any aVal; - uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); - try - { - uno::Reference < container::XNameAccess > xNameAccess( - xSMGR->createInstance( DEFINE_CONST_UNICODE("com.sun.star.setup.UpdateCheckConfig") ), - uno::UNO_QUERY ); - if ( xNameAccess.is() ) - { - aVal = xNameAccess->getByName( DEFINE_CONST_UNICODE("AutoCheckEnabled") ); - aVal >>= bOnlineUpdateEnabled; - } - } - catch( const uno::Exception& ) - { - // property "AutoCheckEnabled" not set - } - if ( pMedium->GetInteractionHandler().is() && !SFX_APP()->Get_Impl()->bODFVersionWarningLater ) { // scan the generator string (within meta.xml) @@ -883,14 +862,14 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) // Custom Property "ODFVersion" does not exist } - ::rtl::OUString sTemp; - if ( (aAny >>= sTemp) && sTemp.getLength() ) + ::rtl::OUString sVersion; + if ( (aAny >>= sVersion) && sVersion.getLength() ) { - double nVersion = sTemp.toDouble(); + double nVersion = sVersion.toDouble(); if ( nVersion > 1.20001 ) { // ODF version greater than 1.2 - added some decimal places to be safe against floating point conversion errors (hack) - sfx2::NewerVersionWarningDialog aDlg( NULL ); + sfx2::NewerVersionWarningDialog aDlg( NULL, sVersion ); aDlg.Execute(); } } @@ -2692,7 +2671,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl // this is a shared document that has to be disconnected from the old location FreeSharedFile( aTempFileURL ); - if ( pFilter->IsOwnFormat() + if ( pFilter->IsOwnFormat() && pFilter->UsesStorage() && pFilter->GetVersion() >= SOFFICE_FILEFORMAT_60 ) { @@ -3132,7 +3111,7 @@ sal_Bool SfxObjectShell::SaveChildren( BOOL bObjectsOnly ) if ( pImp->mpObjectContainer ) { sal_Bool bOasis = ( SotStorage::GetVersion( GetStorage() ) > SOFFICE_FILEFORMAT_60 ); - GetEmbeddedObjectContainer().StoreChildren(bOasis,bObjectsOnly); + GetEmbeddedObjectContainer().StoreChildren(bOasis,bObjectsOnly); } return bResult; |