[Libreoffice-commits] core.git: 3 commits - sc/source sd/source sfx2/source sw/source

Matúš Kukan matus.kukan at collabora.com
Thu May 22 04:56:56 PDT 2014


 sc/source/filter/excel/expop2.cxx   |    3 ---
 sc/source/filter/xml/xmlwrap.cxx    |    2 --
 sd/source/ui/docshell/docshel4.cxx  |   11 -----------
 sfx2/source/doc/objcont.cxx         |    4 +---
 sfx2/source/doc/objstor.cxx         |    2 ++
 sfx2/source/doc/objxtor.cxx         |    2 +-
 sw/source/core/uibase/app/docsh.cxx |    1 -
 sw/source/filter/xml/xmlexp.cxx     |    4 ----
 8 files changed, 4 insertions(+), 25 deletions(-)

New commits:
commit 6e87f0bb75734e464bb0160dc00ab2fbe1a8fac3
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu May 22 13:50:39 2014 +0200

    Update also revision and editing time when setting 'modified' properties.
    
    Change-Id: Id756ef6dd62ca8df2e62265b9cc930f07d13f2e3

diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index bea59cd..7bba8d6 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -208,9 +208,7 @@ void SfxObjectShell::UpdateDocInfoForSave()
                 now.GetHour(), now.GetDay(), now.GetMonth(),
                 now.GetYear(), false) );
             xDocProps->setModifiedBy( aUserName );
-            if ( !HasName() || pImp->bIsSaving )
-                // QUESTION: not in case of "real" SaveAs as this is meant to create a new document
-                UpdateTime_Impl( xDocProps );
+            UpdateTime_Impl( xDocProps );
         }
     }
 }
commit fee87c6fda46923a564cd2574827a7beeffb1a1f
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu May 22 13:42:55 2014 +0200

    Use proper constructor to fill with system time.
    
    Probably 86adb5cacb4fe3e7fb869299447da5876f0da30d did not mean to change
    the behaviour here.
    
    Change-Id: If39c150973c502323b3c785a9738cf65cdd74e5d

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 29fe983..b0b2347 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -209,7 +209,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
     ,rDocShell( _rDocShell )
     ,aMacroMode( *this )
     ,pProgress( 0)
-    ,nTime( DateTime::EMPTY )
+    ,nTime( DateTime::SYSTEM )
     ,nVisualDocumentNumber( USHRT_MAX)
     ,nDocumentSignatureState( SIGNATURESTATE_UNKNOWN )
     ,nScriptingSignatureState( SIGNATURESTATE_UNKNOWN )
commit 5c2ab70cc2dfb7cf0c2418433b3aa89d225742a4
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu May 22 10:11:38 2014 +0200

    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

diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx
index 8f9ebf9..f1453e9 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 640890b..a9e8dd9 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 b61aa45..654d6a8 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 9c5250f..1e37373 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 fbe60dd..6272f02 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 378d80b..3d3e846 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 )
     {


More information about the Libreoffice-commits mailing list