diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-22 10:11:38 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-22 13:55:53 +0200 |
commit | 5c2ab70cc2dfb7cf0c2418433b3aa89d225742a4 (patch) | |
tree | 8e2801b85bc76d90e5b101626e09aee12d65c01d | |
parent | b630d26a2a53767d4d39e14d421448ed87811773 (diff) |
cp#1000077: Set 'modified' document property more consistently.
Update document info at one place, so that it works for other formats
like .doc, .docx, ... too.
Change-Id: If71799b491d2210f0d3bdbdb05f91f26c986a260
-rw-r--r-- | sc/source/filter/excel/expop2.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/uibase/app/docsh.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 4 |
6 files changed, 2 insertions, 21 deletions
diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index 8f9ebf9c0eba..f1453e945695 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -88,9 +88,6 @@ FltError ExportBiff5::Write() if( pDocShell && xRootStrg.Is() ) { - // #i88642# update doc info (revision etc) - pDocShell->UpdateDocInfoForSave(); - using namespace ::com::sun::star; uno::Reference<document::XDocumentPropertiesSupplier> xDPS( pDocShell->GetModel(), uno::UNO_QUERY_THROW); diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 640890b94247..a9e8dd9343da 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -788,8 +788,6 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) if ( pObjSh && xStorage.is() ) { - pObjSh->UpdateDocInfoForSave(); // update information - uno::Reference<frame::XModel> xModel(pObjSh->GetModel()); uno::Reference<task::XStatusIndicator> xStatusIndicator(GetStatusIndicator()); sal_Int32 nProgressRange(1000000); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index b61aa4582ede..654d6a8f204a 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -506,12 +506,7 @@ bool DrawDocShell::Save() bool bRet = SfxObjectShell::Save(); if( bRet ) - { - // Call UpdateDocInfoForSave() before export - UpdateDocInfoForSave(); - bRet = SdXMLFilter( *GetMedium(), *this, true, SDXMLMODE_Normal, SotStorage::GetVersion( GetMedium()->GetStorage() ) ).Export(); - } return bRet; } @@ -545,11 +540,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium ) bool bRet = SfxObjectShell::SaveAs( rMedium ); if( bRet ) - { - // Call UpdateDocInfoForSave() before export - UpdateDocInfoForSave(); bRet = SdXMLFilter( rMedium, *this, true, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Export(); - } if( GetError() == ERRCODE_NONE ) SetError( nVBWarning, OSL_LOG_PREFIX ); @@ -587,13 +578,11 @@ bool DrawDocShell::ConvertTo( SfxMedium& rMedium ) aTypeName.indexOf( "impress8" ) >= 0 ) { pFilter = new SdXMLFilter( rMedium, *this, true ); - UpdateDocInfoForSave(); } else if( aTypeName.indexOf( "StarOffice_XML_Impress" ) >= 0 || aTypeName.indexOf( "StarOffice_XML_Draw" ) >= 0 ) { pFilter = new SdXMLFilter( rMedium, *this, true, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ); - UpdateDocInfoForSave(); } else { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 9c5250f9e8b1..1e37373efdd7 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1119,6 +1119,8 @@ bool SfxObjectShell::SaveTo_Impl { SAL_INFO( "sfx.doc", "saving \"" << rMedium.GetName() << "\"" ); + UpdateDocInfoForSave(); + AddLog( OUString( OSL_LOG_PREFIX "Begin" ) ); ModifyBlocker_Impl aMod(this); diff --git a/sw/source/core/uibase/app/docsh.cxx b/sw/source/core/uibase/app/docsh.cxx index fbe60ddb513c..6272f021af8f 100644 --- a/sw/source/core/uibase/app/docsh.cxx +++ b/sw/source/core/uibase/app/docsh.cxx @@ -598,7 +598,6 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) } } #endif - UpdateDocInfoForSave(); } // #i76360# Update document statistics diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 378d80b55d79..3d3e8467bddb 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -193,10 +193,6 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) // Update doc stat, so that correct values are exported and // the progress works correctly. pDoc->UpdateDocStat(); - - SfxObjectShell* pObjSh = pDoc->GetDocShell(); - if( pObjSh ) - pObjSh->UpdateDocInfoForSave(); // update information } if( bShowProgress ) { |