[Libreoffice-commits] .: 6 commits - binfilter/bf_sc binfilter/bf_sch binfilter/bf_sd binfilter/bf_sfx2 binfilter/bf_so3 binfilter/bf_starmath binfilter/bf_svx binfilter/bf_sw binfilter/inc

Pierre-André Jacquod pjacquod at kemper.freedesktop.org
Fri Mar 25 14:08:40 PDT 2011


 binfilter/bf_sc/source/core/data/sc_documen5.cxx     |  892 +++----
 binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx      |   53 
 binfilter/bf_sc/source/ui/inc/docsh.hxx              |    2 
 binfilter/bf_sch/source/ui/docshell/sch_docshell.cxx |  182 -
 binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx   |   65 
 binfilter/bf_sfx2/source/doc/sfx2_frameobj.cxx       |   28 
 binfilter/bf_sfx2/source/doc/sfx2_interno.cxx        |   10 
 binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx        |    3 
 binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx        | 1812 ++++++---------
 binfilter/bf_sfx2/source/doc/sfx2_sfxbasemodel.cxx   | 2173 ++++++++-----------
 binfilter/bf_so3/source/inplace/applet2.cxx          |   45 
 binfilter/bf_so3/source/inplace/client.cxx           |   59 
 binfilter/bf_so3/source/inplace/embobj.cxx           |   21 
 binfilter/bf_so3/source/inplace/outplace.cxx         |   97 
 binfilter/bf_so3/source/inplace/plugin.cxx           |   54 
 binfilter/bf_so3/source/persist/persist.cxx          |  329 --
 binfilter/bf_starmath/source/starmath_document.cxx   |   43 
 binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx      | 1564 ++++++-------
 binfilter/bf_svx/source/xml/svx_xmleohlp.cxx         |    2 
 binfilter/bf_sw/source/ui/app/sw_docsh.cxx           |    7 
 binfilter/inc/bf_sch/docshell.hxx                    |    3 
 binfilter/inc/bf_sd/docshell.hxx                     |    2 
 binfilter/inc/bf_sfx2/frameobj.hxx                   |    1 
 binfilter/inc/bf_sfx2/interno.hxx                    |    1 
 binfilter/inc/bf_sfx2/objsh.hxx                      |    6 
 binfilter/inc/bf_so3/applet.hxx                      |    1 
 binfilter/inc/bf_so3/embobj.hxx                      |    1 
 binfilter/inc/bf_so3/outplace.hxx                    |    1 
 binfilter/inc/bf_so3/persist.hxx                     |    4 
 binfilter/inc/bf_so3/plugin.hxx                      |    1 
 binfilter/inc/bf_starmath/document.hxx               |    1 
 binfilter/inc/bf_sw/docsh.hxx                        |    1 
 32 files changed, 2974 insertions(+), 4490 deletions(-)

New commits:
commit a101e60a07a1e54e3a89d272c4e38beb068b9d51
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Wed Mar 23 22:42:00 2011 +0100

    remove SaveAs function within binfilter
    
    and replaced with its return value false where called

diff --git a/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx b/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx
index 46a0e11..5b057ea 100644
--- a/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx
+++ b/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx
@@ -798,46 +798,6 @@ DBG_BF_ASSERT(0, "STRIP");
 /*N*/ }
 
 
-/*N*/ BOOL ScDocShell::SaveAs( SvStorage* pStor )
-/*N*/ {
-/*N*/ 	RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::SaveAs" );
-/*N*/
-/*N*/ 	ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
-/*N*/
-/*N*/ 	DBG_ASSERT( pStor, "SaveAs without storage?" );
-/*N*/ 	BOOL bXML = ( pStor->GetVersion() >= SOFFICE_FILEFORMAT_60 );
-/*N*/
-/*N*/ 	//	DoEnterHandler hier nicht (wegen AutoSave), ist im ExecuteSave
-/*N*/
-/*N*/ 	ScChartListenerCollection* pCharts = aDocument.GetChartListenerCollection();
-/*N*/ 	if (pCharts)
-/*N*/ 		pCharts->UpdateDirtyCharts();					// Charts, die noch upgedated werden muessen
-/*N*/ 	if (pAutoStyleList)
-/*?*/ 		{DBG_BF_ASSERT(0, "STRIP");}
-/*N*/ 	if (GetCreateMode()== SFX_CREATE_MODE_STANDARD)
-/*N*/ 		SvInPlaceObject::SetVisArea( Rectangle() );		// normal bearbeitet -> keine VisArea
-/*N*/
-/*N*/ 	// #77577# save additionally XML in storage
-/*N*/ 	if ( GetCreateMode() != SFX_CREATE_MODE_EMBEDDED && !bXML )
-/*N*/ 		AddXMLAsZipToTheStorage( *pStor );
-/*N*/
-/*N*/ 	//	wait cursor is handled with progress bar
-/*N*/ 	BOOL bRet = SfxInPlaceObject::SaveAs( pStor );
-/*N*/ 	if( bRet )
-/*N*/ 	{
-/*N*/ 		if (bXML)
-/*N*/ 			bRet = SaveXML( NULL, pStor );
-/*N*/ 		else
-                OSL_ASSERT("SaveCalc removed");
-//            bRet = SaveCalc( pStor );
-/*N*/ 	}
-/*N*/
-/*N*/ 	return bRet;
-/*N*/ }
-
-
-
-
 // Xcl-like column width measured in characters of standard font.
 
 
diff --git a/binfilter/bf_sc/source/ui/inc/docsh.hxx b/binfilter/bf_sc/source/ui/inc/docsh.hxx
index 1d587fb..271efec 100644
--- a/binfilter/bf_sc/source/ui/inc/docsh.hxx
+++ b/binfilter/bf_sc/source/ui/inc/docsh.hxx
@@ -160,7 +160,6 @@ public:
     virtual BOOL    ConvertFrom( SfxMedium &rMedium );
     virtual void    HandsOff();
     virtual BOOL    Save();
-    virtual BOOL    SaveAs( SvStorage * pNewStor );
 
     virtual BOOL    SaveCompleted( SvStorage * pNewStor );		// SfxInPlaceObject
 
diff --git a/binfilter/bf_sch/source/ui/docshell/sch_docshell.cxx b/binfilter/bf_sch/source/ui/docshell/sch_docshell.cxx
index 62d6960..f479ad3 100644
--- a/binfilter/bf_sch/source/ui/docshell/sch_docshell.cxx
+++ b/binfilter/bf_sch/source/ui/docshell/sch_docshell.cxx
@@ -730,188 +730,6 @@ using namespace ::com::sun::star;
 
 /************************************************************************/
 
-/*N*/ BOOL SchChartDocShell::SaveAs(SvStorage * pStor) throw()
-/*N*/ {
-/*N*/ 	RTL_LOGFILE_CONTEXT_AUTHOR (context, "sch", "af119097", "::SchChartDocShell::SaveAs");
-/*N*/
-/*N*/ 	CHART_TRACE( "SchChartDocShell::SaveAs" );
-/*N*/ 	DBG_ASSERT( pStor, "SaveAs() without Storage called!" );
-    if (!pStor)
-        return FALSE;
-/*N*/
-/*N*/ 	BOOL bRet = FALSE;
-/*N*/
-/*N*/     long nOldFormat = GetStorage()->GetVersion();
-/*N*/     long nNewFormat = pStor->GetVersion();
-/*N*/
-/*N*/ 	BOOL bIsXML = nNewFormat >= SOFFICE_FILEFORMAT_60;
-/*N*/     BOOL bFormatChanges = (nOldFormat != nNewFormat);
-/*N*/
-/*N*/ 	//	If chart was loaded from binary format it has never been built.
-/*N*/ 	if( ! pChDoc->IsInitialized())
-/*N*/ 		pChDoc->Initialize();
-/*N*/
-/*N*/ 	if( bIsXML )
-/*N*/ 	{
-/*N*/ 		RTL_LOGFILE_CONTEXT_TRACE (context, "XML format");
-/*N*/ 		bRet = SfxInPlaceObject::SaveAs( pStor );
-/*N*/
-         /**********************************************************************
-          * StarOffice XML-Filter Export
-          **********************************************************************/
-/*N*/             Reference< ::com::sun::star::frame::XModel> xModel(GetModel());
-/*N*/ 			SchXMLWrapper aFilter( xModel, *pStor,
-/*N*/ 								   GetCreateMode() != SFX_CREATE_MODE_EMBEDDED );
-/*N*/
-/*N*/ 			// update user info before writing
-/*N*/ 			UpdateDocInfoForSave();
-/*N*/
-/*N*/             // old storage was binary format
-/*N*/             if( bFormatChanges )
-/*N*/             {
-/*N*/                 // convert SomeData-strings from Calc/Writer to data structure
-/*N*/                 SvPersist* pLclParent = GetParent();
-/*N*/                 if( pLclParent )
-/*N*/                 {
-/*?*/                     // determine which is parent application
-
-
-/** removed since the actually come up and the fprintf even in pro builds
-DBG_BF_ASSERT(0, "STRIP");					  
-OSL_FAIL( "Conversion routine called" );
-fprintf( stderr,  "BM: Conversion routine called\n" );
-*/
-                          SvGlobalName aGlobalName;
- /*?*/                     ULONG nFileFormat;
- /*?*/                     String aAppName, aFullName, aShortName;
- /*?*/                     pLclParent->FillClass( &aGlobalName, &nFileFormat,
- /*?*/                                         &aAppName, &aFullName, &aShortName,
- /*?*/                                         SOFFICE_FILEFORMAT_60 );
- /*?*/
- /*?*/                     // calc does this conversion itself except when object was
- /*?*/                     // copied to clipboard. In this case SomeData3 was filled before.
- /*?*/                     if( nFileFormat == SOT_FORMATSTR_ID_STARCALC_60 )
- /*?*/                     {
- /*?*/                         SchMemChart* pData = pChDoc->GetChartData();
- /*?*/                         if( pData &&
- /*?*/                             pData->SomeData3().Len() > 0 &&
- /*?*/                             (pData->GetChartRange().maRanges.size() == 0) )
- /*?*/                         {
- /*?*/                             pData->ConvertChartRangeForCalc( TRUE );
- /*?*/                         }
- /*?*/                     }
- /*?*/                     else if( nFileFormat == SOT_FORMATSTR_ID_STARWRITER_60 )
- /*?*/                         pChDoc->GetChartData()->ConvertChartRangeForWriter( TRUE );
-
- /*N*/                }
-/*N*/
-/*N*/ 		    bRet = aFilter.Export();
-/*N*/ 		}
-/*N*/ 	}
-/*N*/ 	else		// binary format <= 5.0
-/*N*/ 	{
-/*N*/ 		pChDoc->PrepareAxisStorage();
-/*N*/ 		long nFileFormat = pStor->GetVersion();
-/*N*/ 		RTL_LOGFILE_CONTEXT_TRACE1 (context, "binary format %ld", nFileFormat);
-/*N*/ 		if(nFileFormat <= SOFFICE_FILEFORMAT_40 && pChDoc->IsReal3D())
-/*N*/ 		{
-/*N*/ 			pChDoc->PrepareOld3DStorage();
-/*N*/ 			CHART_TRACE( "Fileformat 4.0" );
-/*N*/ 		}
-/*N*/
-/*N*/ 		bRet = SfxInPlaceObject::SaveAs( pStor );
-/*N*/
-/*N*/ 		// compressed or native format
-/*N*/       const BOOL                              bSaveNative = FALSE;
-/*N*/       const BOOL                              bSaveCompressed = FALSE;
-/*N*/
-/*N*/ 		pChDoc->SetSaveCompressed( bSaveCompressed );
-/*N*/ 		pChDoc->SetSaveNative( bSaveNative );
-/*N*/
-/*N*/ 		if (bRet)
-/*N*/ 		{
-/*N*/ 			pChDoc->PreSave();
-/*N*/ 			SvStorageStreamRef rPoolStream = pStor->OpenStream( SCH_STYLE_SHEET_NAME );
-/*N*/ 			rPoolStream->SetVersion( pStor->GetVersion ());
-/*N*/
-/*N*/ 			SetWaitCursor( TRUE );
-/*N*/
-/*N*/ 			if( ! rPoolStream->GetError())
-/*N*/ 			{
-/*N*/ 				rPoolStream->SetBufferSize(POOL_BUFFER_SIZE);
-/*N*/ 				GetPool().SetFileFormatVersion( (USHORT)pStor->GetVersion ());
-/*N*/ 				GetPool().Store( *rPoolStream );
-/*N*/
-/*N*/
-/*N*/ 				// the style sheet pool uses next() and first() methods without resetting
-/*N*/ 				// the search mask (?) so it has to be done here
-/*N*/ 				GetStyleSheetPool()->SetSearchMask( SFX_STYLE_FAMILY_ALL );
-/*N*/ 				// FALSE = also save unused style sheets
-/*N*/ 				GetStyleSheetPool()->Store( *rPoolStream, FALSE );
-/*N*/ 				rPoolStream->SetBufferSize( 0 );
-/*N*/
-/*N*/ 			}
-/*N*/ 			else
-/*N*/ 				bRet = FALSE;
-/*N*/
-/*N*/ 			if( bRet )
-/*N*/ 				bRet = rPoolStream->GetError() == 0;
-/*N*/ 			DBG_ASSERT( bRet, "Fehler beim Schreiben der Pools" );
-/*N*/
-/*N*/ 			SvStorageStreamRef rDocumentStream = pStor->OpenStream( aStarChartDoc );
-/*N*/ 			rDocumentStream->SetVersion( pStor->GetVersion());
-/*N*/ 			GetPool().SetFileFormatVersion ( (USHORT)pStor->GetVersion ());
-/*N*/
-/*N*/ 			if( ! rDocumentStream->GetError())
-/*N*/ 			{
-/*N*/                 // old storage was XML format
-/*N*/                 // always convert as internal storage is only the chart range
-/*N*/                     // convert data structure from Calc/Writer to SomeData strings
-/*N*/                     SvPersist* pLclParent = GetParent();
-/*N*/                     if( pLclParent )
-/*N*/                     {
-/*N*/                         // determine which is parent application
-/*N*/                         SvGlobalName aGlobalName;
-/*N*/                         ULONG nLclFileFormat;
-/*N*/                         String aAppName, aFullName, aShortName;
-/*N*/                         pLclParent->FillClass( &aGlobalName, &nLclFileFormat,
-/*N*/                                             &aAppName, &aFullName, &aShortName,
-/*N*/                                             SOFFICE_FILEFORMAT_60 );
-/*N*/
-/*N*/                         if( nLclFileFormat == SOT_FORMATSTR_ID_STARCALC_60 )
-/*?*/                          pChDoc->GetChartData()->ConvertChartRangeForCalc( FALSE );
-/*N*/                         else if( nLclFileFormat == SOT_FORMATSTR_ID_STARWRITER_60 )
-/*N*/                             pChDoc->GetChartData()->ConvertChartRangeForWriter( FALSE );
-/*N*/                     }
-/*N*/
-/*N*/                 rDocumentStream->SetBufferSize( DOCUMENT_BUFFER_SIZE );
-/*N*/ 				rDocumentStream->SetKey( pStor->GetKey());	// set password
-/*N*/ 				*rDocumentStream << *pChDoc;
-/*N*/ 				rDocumentStream->SetBufferSize( 0 );
-/*N*/ 			}
-/*N*/ 			else bRet = FALSE;
-/*N*/ 			if( bRet )
-/*N*/ 				bRet = rDocumentStream->GetError() == 0;
-/*N*/ 			DBG_ASSERT( bRet, "Fehler beim Schreiben des Models" );
-/*N*/
-/*N*/ 			// finished
-/*N*/
-/*N*/ 			SetWaitCursor( FALSE );
-/*N*/
-/*N*/ 			pChDoc->PostSave();
-/*N*/ 		}
-/*N*/
-/*N*/
-/*N*/ 		if( nFileFormat <= SOFFICE_FILEFORMAT_40 && pChDoc->IsReal3D())
-/*N*/ 		{
-/*N*/ 			pChDoc->CleanupOld3DStorage();
-/*N*/ 		}
-/*N*/ 	}
-/*N*/
-/*N*/ 	return bRet;
-/*N*/ }
-
-/************************************************************************/
 
 /*N*/ BOOL SchChartDocShell::SaveCompleted( SvStorage * pStor ) throw()
 /*N*/ {
diff --git a/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx b/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx
index b89cb09..33dcc67 100644
--- a/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx
+++ b/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx
@@ -379,40 +379,6 @@ BOOL SdDrawDocShell::Load( SvStorage* pStore )
      return bRet;
  }
 
-BOOL SdDrawDocShell::SaveAs( SvStorage* pStore )
-{
-    if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
-        SvInPlaceObject::SetVisArea( Rectangle() );
-
-    UINT32	nVBWarning = ERRCODE_NONE;
-    BOOL	bRet = SfxInPlaceObject::SaveAs( pStore );
-
-    if( bRet )
-    {
-        SdFilter* pFilter = NULL;
-
-        if( pStore->GetVersion() >= SOFFICE_FILEFORMAT_60 )
-        {
-            SfxMedium aMedium( pStore );
-            pFilter = new SdXMLFilter( aMedium, *this, sal_True );
-
-            UpdateDocInfoForSave();
-            
-            bRet = pFilter->Export();
-        }
-        else
-        {
-            OSL_ASSERT("binary export removed");
-        }
-
-        delete pFilter;
-    }
-
-    if( GetError() == ERRCODE_NONE )
-        SetError( nVBWarning );
-
-    return bRet;
-}
 
 BOOL SdDrawDocShell::SaveCompleted( SvStorage * pStor )
 {
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_frameobj.cxx b/binfilter/bf_sfx2/source/doc/sfx2_frameobj.cxx
index f9b79c5..c076762 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_frameobj.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_frameobj.cxx
@@ -172,34 +172,6 @@ namespace binfilter {
 /*N*/ 	return FALSE;
 /*N*/ }
 
-//=========================================================================
-/*N*/ BOOL SfxFrameObject::SaveAs
-/*N*/ (
-/*N*/ 	SvStorage * /*pStor*/	/* Storage, in den der Inhalt des Objekte
-                           geschrieben wird */
-/*N*/ )
-/*	[Beschreibung]
-
-    Der Inhalt des Objektes wird in pStor geschrieben.
-
-    [Anmerkung]
-
-    Der Storage wird nicht behalten.
-
-    [R"uckgabewert]
-
-    BOOL			TRUE, das Objekt wurde geschreiben.
-                    FALSE, das Objekt wurde nicht geschrieben. Es muss
-                    die in der Klasse <SvPersist> beschrieben
-                    Fehlerbehandlung erfolgen.
-
-    [Querverweise]
-
-    <SvPersist::SaveAs>
-*/
-/*N*/ {DBG_BF_ASSERT(0, "STRIP");
-/*N*/ 	return FALSE;
-/*N*/ }
 
 //=========================================================================
 /*	[Beschreibung]
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_interno.cxx b/binfilter/bf_sfx2/source/doc/sfx2_interno.cxx
index e572023..c746e08 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_interno.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_interno.cxx
@@ -167,16 +167,6 @@ namespace binfilter {
 
 //--------------------------------------------------------------------
 
-/*N*/ BOOL SfxInPlaceObject::SaveAs( SvStorage * pNewStor )
-/*N*/ {
-/*N*/ 	if( !SaveAsChilds( pNewStor ) )
-/*N*/ 		return FALSE;
-/*N*/     if( SvInPlaceObject::SaveAs( pNewStor ) )
-/*N*/         return pObjShell->SfxObjectShell::SaveAs(pNewStor);
-/*N*/ 	return FALSE;
-/*N*/ }
-
-//--------------------------------------------------------------------
 
 /*N*/ void SfxInPlaceObject::HandsOff()
 /*N*/ {
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx
index 891acdc..66308e4 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx
@@ -223,9 +223,6 @@ using namespace ::com::sun::star::uno;
 /*N*/ 	}
 /*N*/ 	else
 /*N*/ 	{
-/*N*/ 		//!! kein Aufruf der Basisklasse wegen doppeltem Aufruf in Persist
-/*N*/ 		//if(!SfxObjectShell::SaveAs(pNewStg))
-/*N*/ 		//  return FALSE;
 /*N*/ 		/*SfxApplication *pSfxApp =*/ SFX_APP();
 /*N*/ 		/*SfxMedium *pActMed =*/ GetMedium();
 /*N*/
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
index cccd82f..155f444 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
@@ -130,13 +130,6 @@ sal_Bool SfxObjectShell::Save()
         return SaveInfoAndConfig_Impl( GetMedium()->GetStorage() );
 }
 
-sal_Bool SfxObjectShell::SaveAs( SvStorage* pNewStg )
-{
-    if( SOFFICE_FILEFORMAT_60 <= pNewStg->GetVersion() )
-        return sal_True;
-    else
-        return SaveInfoAndConfig_Impl( pNewStg );
-}
 
 sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, String& rPasswd )
 {
diff --git a/binfilter/bf_so3/source/inplace/applet2.cxx b/binfilter/bf_so3/source/inplace/applet2.cxx
index 3cb5dc1..a6a28bb 100644
--- a/binfilter/bf_so3/source/inplace/applet2.cxx
+++ b/binfilter/bf_so3/source/inplace/applet2.cxx
@@ -677,51 +677,6 @@ BOOL SvAppletObject::Save()
 }
 
 //=========================================================================
-BOOL SvAppletObject::SaveAs
-(
-    SvStorage *pStor	/* Storage, in den der Inhalt des Objekte
-                           geschrieben wird */
-)
-/*	[Beschreibung]
-
-    Der Inhalt des Objektes wird in pStor geschrieben.
-
-    [Anmerkung]
-
-    Der Storage wird nicht behalten.
-
-    [R"uckgabewert]
-
-    BOOL			TRUE, das Objekt wurde geschreiben.
-                    FALSE, das Objekt wurde nicht geschrieben. Es muss
-                    die in der Klasse <SvPersist> beschrieben
-                    Fehlerbehandlung erfolgen.
-
-    [Querverweise]
-
-    <SvPersist::SaveAs>
-*/
-{
-    if( SvInPlaceObject::SaveAs( pStor ) )
-    {
-        SvStorageStreamRef xStm;
-        xStm = pStor->OpenStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( DOCNAME ) ), STREAM_STD_WRITE | STREAM_TRUNC );
-        xStm->SetVersion( pStor->GetVersion() );
-        xStm->SetBufferSize( 8192 );
-
-        *xStm << (BYTE)APPLET_VERS;
-        *xStm << pImpl->aCmdList;
-        xStm->WriteByteString( pImpl->aClass, RTL_TEXTENCODING_ASCII_US );
-        xStm->WriteByteString( pImpl->aName, RTL_TEXTENCODING_ASCII_US );
-        xStm->WriteByteString( pImpl->aCodeBase, RTL_TEXTENCODING_ASCII_US );
-        *xStm << pImpl->bMayScript;
-
-        return xStm->GetError() == ERRCODE_NONE;
-    }
-    return FALSE;
-}
-
-//=========================================================================
 void SvAppletObject::HandsOff()
 /*	[Beschreibung]
 
diff --git a/binfilter/bf_so3/source/inplace/embobj.cxx b/binfilter/bf_so3/source/inplace/embobj.cxx
index 25aefe8..7cedce1 100644
--- a/binfilter/bf_so3/source/inplace/embobj.cxx
+++ b/binfilter/bf_so3/source/inplace/embobj.cxx
@@ -301,27 +301,6 @@ BOOL SvEmbeddedObject::Save()
     return SvPersist::Save();
 }
 
-BOOL SvEmbeddedObject::SaveAs( SvStorage * pNewStor )
-{
-    BOOL bRet = FALSE;
-    if( SvPersist::SaveAs( pNewStor ) )
-    {
-        bRet = TRUE;
-        if( bRet && Owner() && GetParent()
-          && SOFFICE_FILEFORMAT_31 == pNewStor->GetVersion() )
-        {
-            ULONG n = pNewStor->GetFormat();
-            if( n == SOT_FORMATSTR_ID_STARWRITER_30 || n == SOT_FORMATSTR_ID_STARDRAW
-              || n == SOT_FORMATSTR_ID_STARCALC )
-            {
-                // empty MTF for 3.1 formats
-                GDIMetaFile aMtf;
-                MakeContentStream( pNewStor, aMtf );
-            }
-        }
-    }
-    return bRet;
-}
 
 /*************************************************************************
 |*    SvEmbeddedObject::LoadContent()
diff --git a/binfilter/bf_so3/source/inplace/outplace.cxx b/binfilter/bf_so3/source/inplace/outplace.cxx
index aff0ad7..2af6d09 100644
--- a/binfilter/bf_so3/source/inplace/outplace.cxx
+++ b/binfilter/bf_so3/source/inplace/outplace.cxx
@@ -1394,103 +1394,6 @@ BOOL SvOutPlaceObject::Save()
 }
 
 //=========================================================================
-BOOL SvOutPlaceObject::SaveAs
-(
-    SvStorage *pStor	/* Storage, in den der Inhalt des Objekte
-                           geschrieben wird */
-)
-/*	[Beschreibung]
-
-    Der Inhalt des Objektes wird in pStor geschrieben.
-
-    [Anmerkung]
-
-    Der Storage wird nicht behalten.
-
-    [R"uckgabewert]
-
-    BOOL			TRUE, das Objekt wurde geschreiben.
-                    FALSE, das Objekt wurde nicht geschrieben. Es muss
-                    die in der Klasse <SvPersist> beschrieben
-                    Fehlerbehandlung erfolgen.
-
-    [Querverweise]
-
-    <SvPersist::SaveAs>
-*/
-{
-    if( SvInPlaceObject::SaveAs( pStor ) )
-    {
-        if( pStor->GetVersion() <= SOFFICE_FILEFORMAT_40 || pStor->GetVersion() >= SOFFICE_FILEFORMAT_60 )
-        {
-#ifdef WNT
-            if( pImpl->pSO_Cont )
-                pImpl->pSO_Cont->Save( pImpl->xWorkingStg );
-#endif
-            SotStorageStreamRef xOleObjStm =
-                pImpl->xWorkingStg->OpenSotStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Ole-Object" ) ),
-                                                    STREAM_STD_READ );
-            if( xOleObjStm->GetError() )
-                return FALSE;
-
-            SvCacheStream aStm;
-            aStm << *xOleObjStm;
-            aStm.Seek( 0 );
-            SotStorageRef xOleObjStor = new SotStorage( aStm );
-            if( xOleObjStor->GetError() )
-                return FALSE;
-
-            // delete all storage entries
-            SvStorageInfoList aList;
-            pStor->FillInfoList( &aList );
-            for( UINT32 i = 0; i < aList.Count(); i++ )
-            {
-                // workaround a bug in our storage implementation
-                String aTmpName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Temp-Delete" ) ) );
-                aTmpName += String::CreateFromInt32( nUniqueId++ );
-                pStor->Rename( aList[i].GetName(), aTmpName );
-                pStor->Remove( aTmpName );
-
-                //pStor->Remove( aList[i].GetName() );
-            }
-            xOleObjStor->CopyTo( pStor );
-            return pStor->GetError() == ERRCODE_NONE;
-        }
-        else
-        {
-            SvStorageStreamRef xStm;
-            xStm = pStor->OpenStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( DOCNAME ) ),
-                                    STREAM_STD_WRITE | STREAM_TRUNC );
-            xStm->SetVersion( pStor->GetVersion() );
-            xStm->SetBufferSize( 128 );
-
-            // write Length
-            *xStm << (UINT16)(2 + 5 );
-#ifdef WNT
-            if( pImpl->pSO_Cont )
-            {
-                WIN_BOOL fSetExtent;
-                pImpl->pSO_Cont->GetInfo( pImpl->dwAspect, fSetExtent );
-                pImpl->bSetExtent = fSetExtent;
-
-                pImpl->pSO_Cont->Save( pStor );
-            }
-            else
-#endif
-            {
-                pImpl->xWorkingStg->CopyTo( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Ole-Object" ) ),
-                                    pStor, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Ole-Object" ) ) );
-            }
-            *xStm << pImpl->dwAspect;
-            *xStm << pImpl->bSetExtent;
-
-            return xStm->GetError() == ERRCODE_NONE;
-        }
-    }
-    return FALSE;
-}
-
-//=========================================================================
 void    SvOutPlaceObject::HandsOff()
 {
     if( HasStorage() && pImpl->xWorkingStg == GetStorage() )
diff --git a/binfilter/bf_so3/source/inplace/plugin.cxx b/binfilter/bf_so3/source/inplace/plugin.cxx
index 4614876..ef68281 100644
--- a/binfilter/bf_so3/source/inplace/plugin.cxx
+++ b/binfilter/bf_so3/source/inplace/plugin.cxx
@@ -793,60 +793,6 @@ BOOL SvPlugInObject::Save()
 }
 
 //=========================================================================
-BOOL SvPlugInObject::SaveAs
-(
-    SvStorage *pStor	/* Storage, in den der Inhalt des Objekte
-                           geschrieben wird */
-)
-/*	[Beschreibung]
-
-    Der Inhalt des Objektes wird in pStor geschrieben.
-
-    [Anmerkung]
-
-    Der Storage wird nicht behalten.
-
-    [R"uckgabewert]
-
-    BOOL			TRUE, das Objekt wurde geschreiben.
-                    FALSE, das Objekt wurde nicht geschrieben. Es muss
-                    die in der Klasse <SvPersist> beschrieben
-                    Fehlerbehandlung erfolgen.
-
-    [Querverweise]
-
-    <SvPersist::SaveAs>
-*/
-{
-    if( SvInPlaceObject::SaveAs( pStor ) )
-    {
-        SvStorageStreamRef xStm;
-        xStm = pStor->OpenStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( DOCNAME ) ),
-                                STREAM_STD_WRITE | STREAM_TRUNC );
-        xStm->SetVersion( pStor->GetVersion() );
-        xStm->SetBufferSize( 8192 );
-
-        *xStm << (BYTE)PLUGIN_VERS;
-        *xStm << nPlugInMode;
-        *xStm << aCmdList;
-        if( pURL )
-        {
-            *xStm << (BYTE)TRUE;
-            String aURL = pURL->GetMainURL( INetURLObject::NO_DECODE );
-            if( aURL.Len() )
-                aURL = ::binfilter::StaticBaseUrl::AbsToRel( aURL );
-            xStm->WriteByteString( aURL, RTL_TEXTENCODING_ASCII_US );
-        }
-        else
-            *xStm << (BYTE)FALSE;
-        xStm->WriteByteString( GetMimeType(), RTL_TEXTENCODING_ASCII_US );
-
-        return xStm->GetError() == ERRCODE_NONE;
-    }
-    return FALSE;
-}
-
-//=========================================================================
 void SvPlugInObject::HandsOff()
 /*	[Beschreibung]
 
diff --git a/binfilter/bf_so3/source/persist/persist.cxx b/binfilter/bf_so3/source/persist/persist.cxx
index ed36bc4..c96434d 100644
--- a/binfilter/bf_so3/source/persist/persist.cxx
+++ b/binfilter/bf_so3/source/persist/persist.cxx
@@ -1207,34 +1207,6 @@ BOOL SvPersist::Save()
     return bRet;
 }
 
-BOOL SvPersist::SaveAs( SvStorage * pStor )
-{
-    ASSERT_INIT()
-
-    bOpSaveAs = TRUE;
-
-    BOOL bRet = TRUE;
-
-    SvGlobalName aNoName; // wegen MAC
-    if( pStor->GetClassName() == aNoName )
-        // kein Typ im Storage gesetzt
-        SetupStorage( pStor );
-
-    if( SOFFICE_FILEFORMAT_60 > pStor->GetVersion() )
-    {
-        if( SOFFICE_FILEFORMAT_31 == pStor->GetVersion() && GetParent() )
-        {
-            // Es ist ein Objekt
-            bRet = DoSaveContent( pStor,
-                SvFactory::IsIntern31( pStor->GetClassName() ) );
-        }
-        else
-            bRet = DoSaveContent( pStor, TRUE );
-    }
-
-    return bRet;
-}
-
 void SvPersist::HandsOff()
 {
     ASSERT_INIT()
diff --git a/binfilter/bf_starmath/source/starmath_document.cxx b/binfilter/bf_starmath/source/starmath_document.cxx
index 3aaf709..82a3f54 100644
--- a/binfilter/bf_starmath/source/starmath_document.cxx
+++ b/binfilter/bf_starmath/source/starmath_document.cxx
@@ -559,49 +559,6 @@ static const char pStarMathDoc[] = "StarMathDocument";
 /*N*/ }
 
 
-/*N*/ BOOL SmDocShell::SaveAs(SvStorage * pNewStor)
-/*N*/ {
-/*N*/ 	BOOL bRet = FALSE;
-/*N*/
-/*N*/     //! apply latest changes if necessary
-/*N*/     UpdateText();
-/*N*/
-/*N*/     if ( SfxInPlaceObject::SaveAs( pNewStor ) )
-/*N*/ 	{
-/*N*/ 		if( !pTree )
-/*?*/ 			Parse();
-/*N*/ 		if( pTree && !IsFormulaArranged() )
-/*?*/ 			ArrangeFormula();
-/*N*/
-/*N*/ 		if (pNewStor->GetVersion() >= SOFFICE_FILEFORMAT_60)
-/*N*/ 		{
-/*N*/ 			// a math package as a storage
-/*?*/              Reference< ::com::sun::star::frame::XModel> xModel(GetModel());
-/*?*/  			SmXMLWrapper aEquation(xModel);
-/*?*/  			SfxMedium aMedium(pNewStor);
-/*?*/  			aEquation.SetFlat(sal_False);
-/*?*/  			bRet = aEquation.Export(aMedium);
-/*N*/ 		}
-/*N*/ 		else
-/*N*/ 		{
-/*N*/ 			SvStorageStreamRef aStm = pNewStor->OpenStream(
-/*N*/ 										String::CreateFromAscii(pStarMathDoc));
-/*N*/ 			aStm->SetVersion( pNewStor->GetVersion() );
-/*N*/ 			GetPool().SetFileFormatVersion( USHORT( pNewStor->GetVersion() ));
-/*N*/ 			aStm->SetBufferSize(DOCUMENT_BUFFER_SIZE);
-/*N*/ 			aStm->SetKey( pNewStor->GetKey() ); // Passwort setzen
-/*N*/
-/*N*/ 			if ( aStm.Is() )
-/*N*/ 			{
-/*N*/ 				ImplSave( aStm );
-/*N*/ 				bRet = TRUE;
-/*N*/ 			}
-/*N*/ 		}
-/*N*/ 	}
-/*N*/ 	return bRet;
-/*N*/ }
-
-
 /*N*/ BOOL SmDocShell::SaveCompleted(SvStorage * pStor)
 /*N*/ {
 /*N*/ 	if( SfxInPlaceObject::SaveCompleted( pStor ))
diff --git a/binfilter/bf_sw/source/ui/app/sw_docsh.cxx b/binfilter/bf_sw/source/ui/app/sw_docsh.cxx
index a836c9d..992e84e 100644
--- a/binfilter/bf_sw/source/ui/app/sw_docsh.cxx
+++ b/binfilter/bf_sw/source/ui/app/sw_docsh.cxx
@@ -294,13 +294,6 @@ BOOL SwDocShell::Save()
     return false;
 }
 
-BOOL SwDocShell::SaveAs(SvStorage*)
-{
-    //only here for virtual reason, will be deleted
-    //this is a virtual fonction from SfxObjectShell (in sfx)
-    return false;
-}
-
 /*--------------------------------------------------------------------
     Beschreibung: Sichern im Defaultformat
  --------------------------------------------------------------------*/
diff --git a/binfilter/inc/bf_sch/docshell.hxx b/binfilter/inc/bf_sch/docshell.hxx
index fdfbebd..12dfa99 100644
--- a/binfilter/inc/bf_sch/docshell.hxx
+++ b/binfilter/inc/bf_sch/docshell.hxx
@@ -89,7 +89,7 @@ class SchChartDocShell: public SfxObjectShell, public SfxInPlaceObject
     void Construct() throw();
 
      // #61907# bei deaktivierung des InPlaceEdit evtl. gebufferte neue Daten
-    // �bernehmen
+    // ?bernehmen
  protected:
 
  public:
@@ -104,7 +104,6 @@ class SchChartDocShell: public SfxObjectShell, public SfxInPlaceObject
     virtual BOOL InitNew(SvStorage*) throw();
     virtual BOOL Load(SvStorage*) throw();
     virtual BOOL Save() throw();
-    virtual BOOL SaveAs(SvStorage* pNewStor) throw();
     virtual BOOL SaveCompleted(SvStorage* pNewStor) throw();
 
     virtual Rectangle GetVisArea(USHORT nAspect) const throw();
diff --git a/binfilter/inc/bf_sd/docshell.hxx b/binfilter/inc/bf_sd/docshell.hxx
index 4d929dd..ab81ed6 100644
--- a/binfilter/inc/bf_sd/docshell.hxx
+++ b/binfilter/inc/bf_sd/docshell.hxx
@@ -94,7 +94,6 @@ public:
     virtual BOOL	        Load( SvStorage * );
     virtual void	        HandsOff();
     virtual BOOL	        Save();
-    virtual BOOL	        SaveAs( SvStorage * pNewStor );
     virtual BOOL	        SaveCompleted( SvStorage * pNewStor );
     virtual void	        SetVisArea(const Rectangle& rRect);
     virtual Rectangle       GetVisArea(USHORT nAspect) const;
diff --git a/binfilter/inc/bf_sfx2/frameobj.hxx b/binfilter/inc/bf_sfx2/frameobj.hxx
index 6e1dbe8..3f1adb9 100644
--- a/binfilter/inc/bf_sfx2/frameobj.hxx
+++ b/binfilter/inc/bf_sfx2/frameobj.hxx
@@ -66,7 +66,6 @@ protected:
                             // Laden speichern
     virtual BOOL    		Load( SvStorage * );
     virtual BOOL    		Save();
-    virtual BOOL    		SaveAs( SvStorage * );
     virtual BOOL    		SaveCompleted( SvStorage * );
 
                             ~SfxFrameObject();
diff --git a/binfilter/inc/bf_sfx2/interno.hxx b/binfilter/inc/bf_sfx2/interno.hxx
index 4717965..1a9c212 100644
--- a/binfilter/inc/bf_sfx2/interno.hxx
+++ b/binfilter/inc/bf_sfx2/interno.hxx
@@ -73,7 +73,6 @@ protected:
     virtual BOOL        InitNew( SvStorage * );         // Rekursiv
     virtual BOOL        Load( SvStorage * );            // Rekursiv
     virtual BOOL        Save();                         // Rekursiv
-    virtual BOOL        SaveAs( SvStorage * pNewStg );  // Rekursiv
     virtual void        HandsOff();                     // Rekursiv
     virtual BOOL        SaveCompleted( SvStorage * );   // Rekursiv
 
diff --git a/binfilter/inc/bf_sfx2/objsh.hxx b/binfilter/inc/bf_sfx2/objsh.hxx
index 20d3401..20c69da 100644
--- a/binfilter/inc/bf_sfx2/objsh.hxx
+++ b/binfilter/inc/bf_sfx2/objsh.hxx
@@ -269,7 +269,6 @@ public:
     virtual sal_uInt16			PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
     virtual sal_Bool            IsInformationLost();
     virtual sal_Bool   			Save();
-    virtual sal_Bool   			SaveAs( SvStorage * pNewStg );
     virtual Size                GetFirstPageSize();
     virtual sal_Bool			DoClose();
     virtual void                PrepareReload();
diff --git a/binfilter/inc/bf_so3/applet.hxx b/binfilter/inc/bf_so3/applet.hxx
index db49625..7a2747e 100644
--- a/binfilter/inc/bf_so3/applet.hxx
+++ b/binfilter/inc/bf_so3/applet.hxx
@@ -87,7 +87,6 @@ protected:
     SO3_DLLPRIVATE virtual BOOL    InitNew( SvStorage * );
     SO3_DLLPRIVATE virtual BOOL    Load( SvStorage * );
     SO3_DLLPRIVATE virtual BOOL    Save();
-    SO3_DLLPRIVATE virtual BOOL    SaveAs( SvStorage * );
     SO3_DLLPRIVATE virtual void    HandsOff();
     SO3_DLLPRIVATE virtual BOOL    SaveCompleted( SvStorage * );
 
diff --git a/binfilter/inc/bf_so3/embobj.hxx b/binfilter/inc/bf_so3/embobj.hxx
index fcb8127..e696fee 100644
--- a/binfilter/inc/bf_so3/embobj.hxx
+++ b/binfilter/inc/bf_so3/embobj.hxx
@@ -88,7 +88,6 @@ protected:
                     ~SvEmbeddedObject();
     virtual BOOL    Load( SvStorage * );
     virtual BOOL    Save();
-    virtual BOOL    SaveAs( SvStorage * pNewStg );
     virtual void    LoadContent( SvStream & rStm, BOOL bOwner_ );
     virtual void    SaveContent( SvStream & rStm, BOOL bOwner_ );
     virtual void    Connect( BOOL bConnect );
diff --git a/binfilter/inc/bf_so3/outplace.hxx b/binfilter/inc/bf_so3/outplace.hxx
index 860ad95..3f624a5 100644
--- a/binfilter/inc/bf_so3/outplace.hxx
+++ b/binfilter/inc/bf_so3/outplace.hxx
@@ -82,7 +82,6 @@ protected:
     SO3_DLLPRIVATE virtual BOOL    InitNew( SvStorage * );
     SO3_DLLPRIVATE virtual BOOL    Load( SvStorage * );
     SO3_DLLPRIVATE virtual BOOL    Save();
-    SO3_DLLPRIVATE virtual BOOL    SaveAs( SvStorage * );
     SO3_DLLPRIVATE virtual void    HandsOff();
     SO3_DLLPRIVATE virtual BOOL    SaveCompleted( SvStorage * );
 
diff --git a/binfilter/inc/bf_so3/persist.hxx b/binfilter/inc/bf_so3/persist.hxx
index 1f288e8..3fa0a87 100644
--- a/binfilter/inc/bf_so3/persist.hxx
+++ b/binfilter/inc/bf_so3/persist.hxx
@@ -161,7 +161,6 @@ protected:
     virtual BOOL    InitNew( SvStorage * );         // Rekursiv
     virtual BOOL    Load( SvStorage * );            // Rekursiv
     virtual BOOL    Save();                         // Rekursiv
-    virtual BOOL    SaveAs( SvStorage * pNewStg );  // Rekursiv
     virtual void    HandsOff();                     // Rekursiv
     virtual BOOL    SaveCompleted( SvStorage * );   // Rekursiv
 
diff --git a/binfilter/inc/bf_so3/plugin.hxx b/binfilter/inc/bf_so3/plugin.hxx
index 260514f..0ab3da1 100644
--- a/binfilter/inc/bf_so3/plugin.hxx
+++ b/binfilter/inc/bf_so3/plugin.hxx
@@ -99,7 +99,6 @@ protected:
     SO3_DLLPRIVATE virtual BOOL    InitNew( SvStorage * );
     SO3_DLLPRIVATE virtual BOOL    Load( SvStorage * );
     SO3_DLLPRIVATE virtual BOOL    Save();
-    SO3_DLLPRIVATE virtual BOOL    SaveAs( SvStorage * );
     SO3_DLLPRIVATE virtual void    HandsOff();
     SO3_DLLPRIVATE virtual BOOL    SaveCompleted( SvStorage * );
 
diff --git a/binfilter/inc/bf_starmath/document.hxx b/binfilter/inc/bf_starmath/document.hxx
index ca7f850..eae4598 100644
--- a/binfilter/inc/bf_starmath/document.hxx
+++ b/binfilter/inc/bf_starmath/document.hxx
@@ -149,7 +149,6 @@ class SmDocShell : public SfxObjectShell, public SfxInPlaceObject,
     virtual BOOL		Load(SvStorage *);
             void		ImplSave(  SvStorageStreamRef xStrm  );
     virtual BOOL		Save();
-    virtual BOOL		SaveAs( SvStorage *pNewStor );
     virtual BOOL		SaveCompleted( SvStorage *pNewStor );
     virtual void		HandsOff();
 
diff --git a/binfilter/inc/bf_sw/docsh.hxx b/binfilter/inc/bf_sw/docsh.hxx
index d3ff68a..fc8b7f2 100644
--- a/binfilter/inc/bf_sw/docsh.hxx
+++ b/binfilter/inc/bf_sw/docsh.hxx
@@ -95,7 +95,6 @@ class SwDocShell: public SfxObjectShell, public SfxInPlaceObject,
     virtual BOOL			LoadFrom(SvStorage* pStor);
     virtual BOOL            ConvertFrom( SfxMedium &rMedium );
     virtual void			HandsOff();
-    virtual BOOL			SaveAs(SvStorage * pNewStor );
     virtual BOOL			SaveCompleted(SvStorage * pNewStor );
 
     // DocInfo dem Doc melden
commit 28a1c709d39bd7fe35d55ea969a352b74b014ab0
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Wed Mar 23 16:26:50 2011 +0100

    remove function SaveAsOwnFormat in binfilter
    
    and replace calls with its return value false

diff --git a/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx b/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx
index 455028b..b89cb09 100644
--- a/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx
+++ b/binfilter/bf_sd/source/ui/docshell/sd_docshell.cxx
@@ -449,37 +449,6 @@ SfxStyleSheetBasePool* SdDrawDocShell::GetStyleSheetPool()
 }
 
 
-BOOL SdDrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
-{
-
-    const SfxFilter* pFilter = rMedium.GetFilter();
-
-    if (pFilter->IsOwnTemplateFormat())
-    {
-        String aLayoutName;
-
-        SfxStringItem* pLayoutItem;
-        if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, FALSE, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET )
-        {
-            aLayoutName = pLayoutItem->GetValue();
-        }
-        else
-        {
-            INetURLObject aURL( rMedium.GetName() );
-            aURL.removeExtension();
-            aLayoutName = aURL.getName();
-        }
-
-        if( aLayoutName.Len() )
-        {
-            String aOldPageLayoutName = pDoc->GetSdPage(0, PK_STANDARD)->GetLayoutName();
-            pDoc->RenameLayoutTemplate(aOldPageLayoutName, aLayoutName);
-        }
-     }
-
-    return SfxObjectShell::SaveAsOwnFormat(rMedium);
-}
-
 void SdDrawDocShell::FillClass(SvGlobalName* pClassName,ULONG*  pFormat, String* pAppName, String* pFullTypeName, String* pShortTypeName, long    nFileFormat) const
 {
     SfxInPlaceObject::FillClass(pClassName, pFormat, pAppName, pFullTypeName,
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
index e635299..cccd82f 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
@@ -742,7 +742,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
         }
         else
             // save to target
-            bOk = SaveAsOwnFormat( rMedium );
+            bOk = false;
 
         // look for a "version" parameter
         const SfxStringItem *pVersionItem = pSet ? (const SfxStringItem*)
@@ -1381,47 +1381,6 @@ sal_Bool DocSh::ConvertTo( SfxMedium &rMedium )
 /*N*/ 		return sal_False;
 /*N*/ }
 
-/*N*/ sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
-/*N*/ {
-/*N*/ 	SvStorageRef xStor = rMedium.GetStorage();
-/*N*/ 	if( xStor.Is() )
-/*N*/ 	{
-/*N*/ 		ULONG nVersion = rMedium.GetFilter()->GetVersion();
-/*N*/ 		xStor->SetVersion( nVersion );
-/*N*/
-/*N*/ 		// Initialize Basic
-/*N*/ 		GetBasicManager();
-/*N*/
-/*N*/ 		// Save dialog container
-/*N*/ 		if( nVersion >= 6200 )
-/*N*/ 		{
-/*N*/ 			SfxDialogLibraryContainer* pDialogCont = pImp->pDialogLibContainer;
-/*N*/ 			if( pDialogCont )
-/*N*/ 				pDialogCont->storeLibrariesToStorage( (SotStorage*)(SvStorage*)xStor );
-/*N*/
-/*N*/ 			SfxScriptLibraryContainer* pBasicCont = pImp->pBasicLibContainer;
-/*N*/ 			if( pBasicCont )
-/*N*/ 				pBasicCont->storeLibrariesToStorage( (SotStorage*)(SvStorage*)xStor );
-/*N*/
-/*N*/ 			// Konfiguration schreiben
-/*N*/ 			if ( GetConfigManager() )
-/*N*/ 			{
-/*N*/ 				{
-/*N*/ 					SotStorageRef xCfgStor = pImp->pCfgMgr->GetConfigurationStorage( xStor );
-/*N*/                     if ( pImp->pCfgMgr->StoreConfiguration( xCfgStor ) )
-/*N*/ 						xCfgStor->Commit();
-/*N*/ 				}
-/*N*/ 			}
-/*N*/
-/*N*/ 		}
-/*N*/
-/*N*/ 		/*const SfxFilter* pFilter =*/ rMedium.GetFilter();
-/*N*/ 		return SaveAs( xStor );
-/*N*/ 	}
-/*N*/ 	else return sal_False;
-/*N*/ }
-
-
 /*N*/ void SfxObjectShell::AddXMLAsZipToTheStorage( SvStorage& rRoot )
 /*N*/ {
 /*N*/ 	static struct _ObjExpType {
diff --git a/binfilter/inc/bf_sd/docshell.hxx b/binfilter/inc/bf_sd/docshell.hxx
index cb599bb..4d929dd 100644
--- a/binfilter/inc/bf_sd/docshell.hxx
+++ b/binfilter/inc/bf_sd/docshell.hxx
@@ -95,7 +95,6 @@ public:
     virtual void	        HandsOff();
     virtual BOOL	        Save();
     virtual BOOL	        SaveAs( SvStorage * pNewStor );
-    virtual BOOL            SaveAsOwnFormat( SfxMedium& rMedium );
     virtual BOOL	        SaveCompleted( SvStorage * pNewStor );
     virtual void	        SetVisArea(const Rectangle& rRect);
     virtual Rectangle       GetVisArea(USHORT nAspect) const;
diff --git a/binfilter/inc/bf_sfx2/objsh.hxx b/binfilter/inc/bf_sfx2/objsh.hxx
index 9bf6452..20d3401 100644
--- a/binfilter/inc/bf_sfx2/objsh.hxx
+++ b/binfilter/inc/bf_sfx2/objsh.hxx
@@ -227,7 +227,6 @@ public:
     void                        SetError(sal_uInt32 rErr);
 
     virtual sal_Bool            LoadOwnFormat( SfxMedium& pMedium );
-    virtual sal_Bool            SaveAsOwnFormat( SfxMedium& pMedium );
 
     virtual sal_Bool            DoInitNew( SvStorage * pStor );
     virtual void                DoHandsOff();
commit cd58060e5359f981c8a82ab88dd7dfae5e984323
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Tue Mar 22 18:24:24 2011 +0100

    remove DoSaveAs function within binfilter
    
    and replaced where used with its return value false.

diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
index 7e0b683..e635299 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
@@ -918,28 +918,6 @@ den neuen Storage connected. SaveCompleted tut dann nichts.
     return sal_True;
 }
 
-sal_Bool SfxObjectShell::DoSaveAs( SvStorage * pNewStor )
-{
-    // DoSaveAs wird nur noch ueber OLE aufgerufen
-    sal_Bool bOk;
-    {
-        SfxForceLinkTimer_Impl aFLT( this );
-        ModifyBlocker_Impl aBlock( this );
-        //Abwehr gegen feindlich gesinnte Applikationen.
-        if ( !pNewStor->GetFormat() )
-            SetupStorage( pNewStor );
-
-        pImp->bIsSaving = sal_False;
-        SfxMedium* pNewMed = new SfxMedium( pNewStor );
-        const String aOldURL( ::binfilter::StaticBaseUrl::GetBaseURL() );
-
-        bOk = SaveAsOwnFormat( *pNewMed );
-        ::binfilter::StaticBaseUrl::SetBaseURL( aOldURL );
-        delete pNewMed;
-    }
-    return bOk;
-}
-
 sal_Bool SfxObjectShell::ConvertFrom
 (
     SfxMedium&  /*rMedium*/     /*  <SfxMedium>, welches die Quell-Datei beschreibt
diff --git a/binfilter/bf_so3/source/persist/persist.cxx b/binfilter/bf_so3/source/persist/persist.cxx
index 5db2162..ed36bc4 100644
--- a/binfilter/bf_so3/source/persist/persist.cxx
+++ b/binfilter/bf_so3/source/persist/persist.cxx
@@ -209,7 +209,7 @@ void SvInfoObject::SetDeleted( BOOL bDel )
                 bool bRet;
                 if( aObj->IsModified() )
                 {
-                    bRet = aObj->DoSaveAs( aNewStor );
+                    bRet = false;
                 }
                 else
                 {
@@ -539,7 +539,7 @@ BOOL SvPersist::Move( SvInfoObject * pInfoObj, const String & rStorName, BOOL bC
             DBG_ASSERT( !bCopyStorage, "Impossible to copy storage!" );
             aRealName = ::utl::TempFile().GetURL();
             SvStorageRef aNewStor( new SvStorage( FALSE, aRealName, STREAM_STD_READWRITE, 0 ) );
-            if ( pChild->DoSaveAs( aNewStor ) )
+            if ( false)
             {
                 bRet = false;
                 if ( !bRet )
@@ -589,7 +589,7 @@ SvPersistRef SvPersist::CopyObject( const String& rObjName, const String& rNewNa
             // save in binary format - there is no other format !
             String aRealName = ::utl::TempFile().GetURL();
             SvStorageRef xNewStor( new SvStorage( FALSE, aRealName, STREAM_STD_READWRITE, 0 ) );
-            if ( xOldObject->DoSaveAs( xNewStor ) )
+            if ( false)
             {
                 // was xOldObject->DoSaveCompleted(); but return value is not checked
                 xNewInfo->SetObjName( rNewName );
@@ -728,7 +728,7 @@ BOOL SvPersist::ImplCopy( SvPersist* pSrc, const String& rStorageName, BOOL bMov
 
             if( bSave )
             {
-                bRet = pSrc->DoSaveAs( aNewStor );
+                bRet = false;
                 if ( bRet && !bMoving )
                 {
                     // was pSrc->DoSaveCompleted(); but return value is not checked
@@ -1128,14 +1128,6 @@ BOOL SvPersist::DoLoad
     return DoLoad( xStg );
 }
 
-BOOL SvPersist::DoSaveAs( SvStorage * pStor )
-{
-    EnableSetModified( FALSE );
-    BOOL bRet = SaveAs( pStor );
-    EnableSetModified( TRUE );
-    return bRet;
-}
-
 void SvPersist::DoHandsOff()
 {
     HandsOff();
@@ -1544,7 +1536,7 @@ BOOL SvPersist::SaveElement( SvStorage* pStor, SvInfoObject* pEle )
     if( bSave )
     {
         DBG_ASSERT( bOLESubStorage || ( xPO->GetMiscStatus() & SVOBJ_MISCSTATUS_SPECIALOBJECT ) == 0, "Trying to save special object" );
-        bRet = pEle->GetPersist()->DoSaveAs( aEleStor );
+        bRet = false;
     }
     else
     {
diff --git a/binfilter/bf_svx/source/xml/svx_xmleohlp.cxx b/binfilter/bf_svx/source/xml/svx_xmleohlp.cxx
index 6e6e614..6f4bce5 100644
--- a/binfilter/bf_svx/source/xml/svx_xmleohlp.cxx
+++ b/binfilter/bf_svx/source/xml/svx_xmleohlp.cxx
@@ -88,7 +88,7 @@ public:
 /*N*/ 	SvStorageRef aTempStor = new SvStorage( sal_False, *pStream );
 /*N*/	// the object should not be stored in 5.2 storage since the alien objects are stored in a wrapped way in this case
 /*N*/	aTempStor->SetVersion( SOFFICE_FILEFORMAT_31 );
-/*N*/ 	if( pPersist->DoSaveAs( aTempStor ) )
+/*N*/ 	if( false )
 /*N*/ 	{
 /*N*/ 		aTempStor->Commit();
 /*N*/ 	}
diff --git a/binfilter/inc/bf_sfx2/objsh.hxx b/binfilter/inc/bf_sfx2/objsh.hxx
index 6f16fb7..9bf6452 100644
--- a/binfilter/inc/bf_sfx2/objsh.hxx
+++ b/binfilter/inc/bf_sfx2/objsh.hxx
@@ -239,7 +239,6 @@ public:
                                         StorageMode nStorageMode );
 
     virtual sal_Bool            DoLoad( SfxMedium * pMedium );
-    virtual sal_Bool            DoSaveAs( SvStorage * pNewStor );
 
     virtual sal_Bool            ConvertFrom( SfxMedium &rMedium );
     virtual sal_Bool            ConvertTo( SfxMedium &rMedium );
diff --git a/binfilter/inc/bf_so3/persist.hxx b/binfilter/inc/bf_so3/persist.hxx
index bdffa11..1f288e8 100644
--- a/binfilter/inc/bf_so3/persist.hxx
+++ b/binfilter/inc/bf_so3/persist.hxx
@@ -230,7 +230,6 @@ public:
                             short nStorMode );
     virtual BOOL    DoLoad( SvStorage * );
     BOOL			DoOwnerLoad( SvStorage * );
-    virtual BOOL    DoSaveAs( SvStorage * pNewStg );
     virtual void    DoHandsOff();
     void            CleanUp(BOOL bRecurse=FALSE); //Rekursiv
 
commit 7ca27fb954d2eb8c844a253c704452a4a156bb2a
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Mon Mar 21 21:14:36 2011 +0100

    remove DoSaveCompleted function within binfilter
    
    all implementation of DoSaveCompleted within binfilter are removed.
    Where called, this function is replaced with the return value false,
    and where this is not checked, a comment has been inserted for the time
    being

diff --git a/binfilter/bf_sc/source/core/data/sc_documen5.cxx b/binfilter/bf_sc/source/core/data/sc_documen5.cxx
index 5083dbc..b9cddf1 100644
--- a/binfilter/bf_sc/source/core/data/sc_documen5.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_documen5.cxx
@@ -439,9 +439,10 @@ void ScDocument::UpdateChartListenerCollection()
                                                     // the return value of DoSave() was not checked, this is not a good style...
                                                     // due to the suppression of the function DoSave() this stay here just for
                                                     // pro memoria, waiting that all the if is cleaned out
-                                                    DBG_BF_ASSERT(0, "return value of DoSave() was not checked here!");
+                                                    // the same for DoSaveCompleted()
+                                                    DBG_BF_ASSERT(0, "return value of DoSave() and DoSaveComleted was not checked here!");
                                                     //aIPObj->DoSave();
-                                                aIPObj->DoSaveCompleted();
+                                                    //aIPObj->DoSaveCompleted();
                                             }
                                         }
                                     }
diff --git a/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx b/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx
index ff81191..46a0e11 100644
--- a/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx
+++ b/binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx
@@ -855,19 +855,6 @@ DBG_BF_ASSERT(0, "STRIP");
 /*N*/ }
 
 
-/*N*/ BOOL ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
-/*N*/ {
-/*N*/ 	BOOL bRet = SfxObjectShell::DoSaveCompleted( pNewStor );
-/*N*/
-/*N*/ 	//	SC_HINT_DOC_SAVED fuer Wechsel ReadOnly -> Read/Write
-/*N*/ 	Broadcast( SfxSimpleHint( SC_HINT_DOC_SAVED ) );
-/*N*/ 	return bRet;
-/*N*/ }
-
-
-
-
-
 /*N*/ String ScDocShell::GetOwnFilterName()			// static
 /*N*/ {
 /*N*/ 	return String::CreateFromAscii(pFilterSc50);
diff --git a/binfilter/bf_sc/source/ui/inc/docsh.hxx b/binfilter/bf_sc/source/ui/inc/docsh.hxx
index 9fabdb8..1d587fb 100644
--- a/binfilter/bf_sc/source/ui/inc/docsh.hxx
+++ b/binfilter/bf_sc/source/ui/inc/docsh.hxx
@@ -163,7 +163,6 @@ public:
     virtual BOOL    SaveAs( SvStorage * pNewStor );
 
     virtual BOOL    SaveCompleted( SvStorage * pNewStor );		// SfxInPlaceObject
-    virtual BOOL	DoSaveCompleted( SfxMedium * pNewStor);		// SfxObjectShell
 
 
     virtual void    SetVisArea( const Rectangle & rVisArea );
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
index 0271f11..7e0b683 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
@@ -387,9 +387,9 @@ sal_False           Das Objekt konnte nicht geladen werden
 
                 xPer->DoOwnerLoad(xStor);
                 xPer->CleanUp();
-                        DBG_ASSERT( 0, "DoSave return value is not checed here, seems buggy" );
+                        DBG_ASSERT( 0, "DoSave() and DoSaveCompleted() return value is not checked here, seems buggy" );
                         //xPer->DoSave(); 
-                xPer->DoSaveCompleted( 0 );
+                        //xPer->DoSaveCompleted( 0 );
             }
 
             if ( xStor.Is() )
@@ -940,91 +940,6 @@ sal_Bool SfxObjectShell::DoSaveAs( SvStorage * pNewStor )
     return bOk;
 }
 
-sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium * pNewMed )
-{
-    sal_Bool bOk = sal_True;
-    sal_Bool bMedChanged = pNewMed && pNewMed!=pMedium;
-    DBG_ASSERT( !pNewMed || pNewMed->GetError() == ERRCODE_NONE, "DoSaveCompleted: Medium has error!" );
-    if ( bMedChanged )
-    {
-        delete pMedium;
-        pMedium = pNewMed;
-    }
-
-    const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : 0;
-    if ( pNewMed )
-    {
-        if( bMedChanged )
-        {
-            if( pNewMed->GetName().Len() )
-                bHasName = sal_True;
-            String aBase = GetBaseURL();
-            if( Current() == this && aBase.Len() )
-                ::binfilter::StaticBaseUrl::SetBaseURL( aBase );
-            Broadcast( SfxSimpleHint(SFX_HINT_NAMECHANGED) );
-        }
-
-        SvStorage *pStorage=NULL;
-        if ( !pFilter||sal_True  )
-        {
-            pStorage = pMedium->GetStorage();
-            bOk = SaveCompleted( pStorage );
-        }
-        else
-        {
-            pStorage = GetStorage();
-            if( pFilter->UsesStorage() )
-                pMedium->GetStorage();
-            else if( pMedium->GetOpenMode() & STREAM_WRITE )
-                pMedium->GetInStream();
-        }
-
-        // Set storage in document library containers
-        SfxDialogLibraryContainer* pDialogCont = pImp->pDialogLibContainer;
-        if( pDialogCont )
-            pDialogCont->setStorage( pStorage );
-
-        SfxScriptLibraryContainer* pBasicCont = pImp->pBasicLibContainer;
-        if( pBasicCont )
-            pBasicCont->setStorage( pStorage );
-    }
-    else
-    {
-        if( pMedium )
-        {
-            const SfxFilter* pLclFilter = pMedium->GetFilter();
-            if( pLclFilter && !pLclFilter->IsOwnFormat() &&
-                (pMedium->GetOpenMode() & STREAM_WRITE ))
-                pMedium->ReOpen();
-            else
-                SaveCompleted( 0 );
-        }
-        // entweder Save oder ConvertTo
-        else
-            bOk = SaveCompleted( NULL );
-    }
-
-    if ( bOk && pNewMed )
-    {
-        if( bMedChanged )
-        {
-            // Titel neu setzen
-            if ( pNewMed->GetName().Len() &&
-                SFX_CREATE_MODE_EMBEDDED != eCreateMode )
-                InvalidateName();
-            SetModified(sal_False); // nur bei gesetztem Medium zur"ucksetzen
-            Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
-        }
-    }
-
-    return bOk;
-}
-
-sal_Bool SfxObjectShell::DoSaveCompleted( SvStorage * pNewStor )
-{
-    return DoSaveCompleted(pNewStor? new SfxMedium( pNewStor ): 0);
-}
-
 sal_Bool SfxObjectShell::ConvertFrom
 (
     SfxMedium&  /*rMedium*/     /*  <SfxMedium>, welches die Quell-Datei beschreibt
@@ -1378,7 +1293,7 @@ sal_Bool DocSh::ConvertTo( SfxMedium &rMedium )
 /*N*/         if ( bCopyTo )
 /*N*/ 		{
 /*N*/         	if ( IsHandsOff() )
-/*N*/ 				bOk = DoSaveCompleted( pMedium );
+/*N*/ 				bOk = false;
 /*N*/ 		}
 /*N*/ 		else
 /*N*/ 		{
@@ -1386,7 +1301,7 @@ sal_Bool DocSh::ConvertTo( SfxMedium &rMedium )
 /*N*/ 			if ( bToOwnFormat )
 /*N*/ 				SetFileName( pNewFile->GetPhysicalName() );
 /*N*/
-/*N*/ 			bOk = DoSaveCompleted( pNewFile );
+/*N*/ 			bOk = false;
 /*N*/ 		}
 /*N*/
 /*N*/ 		if( bOk )
@@ -1402,7 +1317,7 @@ sal_Bool DocSh::ConvertTo( SfxMedium &rMedium )
 /*N*/             if ( !bCopyTo )
 /*N*/             {
 /*N*/                 // reconnect to the old medium
-/*?*/                 BOOL bRet = DoSaveCompleted( pMedium );
+/*?*/                 BOOL bRet = false;
 /*?*/                 DBG_ASSERT( bRet, "Error in DoSaveCompleted, can't be handled!");
 /*?*/                 (void)bRet;
 /*N*/             }
@@ -1421,9 +1336,13 @@ sal_Bool DocSh::ConvertTo( SfxMedium &rMedium )
 /*?*/
 /*?*/         // reconnect to the old storage
 /*?*/         if ( IsHandsOff() )
-/*?*/             DoSaveCompleted( pMedium );
+/*?*/             {
+                    // was DoSaveCompleted( pMedium ) but return value is not checked;
+                  }
 /*?*/         else
-/*?*/             DoSaveCompleted( (SvStorage*)0 );
+/*?*/             {
+                    // was DoSaveCompleted( (SvStorage*)0 ); but return value is not checked;
+                  }
 /*?*/
 /*?*/         DELETEZ( pNewFile );
 /*N*/ 	}
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_sfxbasemodel.cxx b/binfilter/bf_sfx2/source/doc/sfx2_sfxbasemodel.cxx
index d680a3c..ae6060b 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_sfxbasemodel.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_sfxbasemodel.cxx
@@ -964,7 +964,9 @@ void SAL_CALL SfxBaseModel::removeCloseListener( const REFERENCE< XCLOSELISTENER
 /*N*/ 		if ( m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
 /*N*/ 		{
 /*N*/ 			if ( false)
-/*N*/ 				m_pData->m_pObjectShell->DoSaveCompleted();
+/*N*/ 			{
+                             // was m_pData->m_pObjectShell->DoSaveCompleted(); but return value not checked
+                        }
 /*N*/ 		}
 /*N*/ 		else
 /*N*/ 			m_pData->m_pObjectShell->Save_Impl();
diff --git a/binfilter/bf_so3/source/inplace/client.cxx b/binfilter/bf_so3/source/inplace/client.cxx
index b2b675b..72d4871 100644
--- a/binfilter/bf_so3/source/inplace/client.cxx
+++ b/binfilter/bf_so3/source/inplace/client.cxx
@@ -481,7 +481,7 @@ BOOL SvEmbeddedClient::SaveObject()
         if( pE )
         {
             bRet = false;
-            pE->DoSaveCompleted();
+            // was pE->DoSaveCompleted(); but return value is not checked
         }
     }
     return bRet;
diff --git a/binfilter/bf_so3/source/persist/persist.cxx b/binfilter/bf_so3/source/persist/persist.cxx
index 1fba5ff..5db2162 100644
--- a/binfilter/bf_so3/source/persist/persist.cxx
+++ b/binfilter/bf_so3/source/persist/persist.cxx
@@ -219,13 +219,15 @@ void SvInfoObject::SetDeleted( BOOL bDel )
                 if( bRet )
                 {
                     aObj->DoHandsOff();
-                    if( aObj->DoSaveCompleted( aNewStor ) )
+                    if(false)
                     {
                         pImp->SetRealStorageName( aNewStor->GetName() );
                         bKill = FALSE;
                     }
                     else
-                        aObj->DoSaveCompleted();
+                    {
+                        // was aObj->DoSaveCompleted(); but return value is not checked
+                    }
                 }
             }
 
@@ -539,9 +541,11 @@ BOOL SvPersist::Move( SvInfoObject * pInfoObj, const String & rStorName, BOOL bC
             SvStorageRef aNewStor( new SvStorage( FALSE, aRealName, STREAM_STD_READWRITE, 0 ) );
             if ( pChild->DoSaveAs( aNewStor ) )
             {
-                bRet = pChild->DoSaveCompleted( aNewStor );
+                bRet = false;
                 if ( !bRet )
-                    pChild->DoSaveCompleted();
+                {
+                    //was pChild->DoSaveCompleted() but return value is not checked;
+                }
             }
         }
         else
@@ -587,7 +591,7 @@ SvPersistRef SvPersist::CopyObject( const String& rObjName, const String& rNewNa
             SvStorageRef xNewStor( new SvStorage( FALSE, aRealName, STREAM_STD_READWRITE, 0 ) );
             if ( xOldObject->DoSaveAs( xNewStor ) )
             {
-                xOldObject->DoSaveCompleted();
+                // was xOldObject->DoSaveCompleted(); but return value is not checked
                 xNewInfo->SetObjName( rNewName );
                 xNewInfo->pImp->aRealStorageName = xNewStor->GetName();
                 GetInfoList()->Append( xNewInfo );
@@ -726,7 +730,9 @@ BOOL SvPersist::ImplCopy( SvPersist* pSrc, const String& rStorageName, BOOL bMov
             {
                 bRet = pSrc->DoSaveAs( aNewStor );
                 if ( bRet && !bMoving )
-                    pSrc->DoSaveCompleted();
+                {
+                    // was pSrc->DoSaveCompleted(); but return value is not checked
+                }
             }
             else
             {
@@ -734,11 +740,15 @@ BOOL SvPersist::ImplCopy( SvPersist* pSrc, const String& rStorageName, BOOL bMov
                 pSrc->DoHandsOff();
                 bRet = xEleStor->CopyTo( aNewStor );
                 if ( !bRet || !bMoving )
-                    pSrc->DoSaveCompleted( xEleStor );
+                {
+                     // was pSrc->DoSaveCompleted( xEleStor ); but return value is not checked
+                }
             }
 
             if ( bRet && bMoving )
-                pSrc->DoSaveCompleted( aNewStor );
+            {
+                // was pSrc->DoSaveCompleted( aNewStor ); but return value is not checked
+            }
         }
     }
 
@@ -1131,10 +1141,6 @@ void SvPersist::DoHandsOff()
     HandsOff();
 }
 
-BOOL SvPersist::DoSaveCompleted( SvStorage * pStor )
-{
-    return SaveCompleted( pStor );
-}
 
 
 SvStorage * SvPersist::GetStorage() const
@@ -1643,7 +1649,7 @@ BOOL SvPersist::SaveCompletedChilds( SvStorage * pStor )
                 {
                     SvStorageRef aEleStor;
                     aEleStor = pStor->OpenStorage( pEle->GetStorageName() );
-                    if( !aEleStor.Is() || !pEle->GetPersist()->DoSaveCompleted( aEleStor ) )
+                    if( !aEleStor.Is() || !false )
                         return FALSE;
 
                     // the object now is definitely part of the container
@@ -1652,7 +1658,7 @@ BOOL SvPersist::SaveCompletedChilds( SvStorage * pStor )
                 else
                 {
                     // set objects on their old storage again
-                    if( !pEle->GetPersist()->DoSaveCompleted() )
+                    if( !false)
                         return FALSE;
                 }
             }
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx b/binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx
index 18e3ab0..340d7f4 100644
--- a/binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx
+++ b/binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx
@@ -639,9 +639,9 @@ BOOL SdrOle2Obj::Unload()
             SvPersist* pO = *ppObjRef;
             if( pO->IsModified() )
             {
-                        DBG_BF_ASSERT(0, "return value of DoSave() is not checked here");
+                        DBG_BF_ASSERT(0, "return value of DoSave() or DoSaveCompleted() is not checked here");
                         //pO->DoSave();
-                    pO->DoSaveCompleted();
+                        //pO->DoSaveCompleted();
             }
             ppObjRef->Clear();
             if (pPersist->Unload(pO))
diff --git a/binfilter/inc/bf_sfx2/objsh.hxx b/binfilter/inc/bf_sfx2/objsh.hxx
index 1eeab1a..6f16fb7 100644
--- a/binfilter/inc/bf_sfx2/objsh.hxx
+++ b/binfilter/inc/bf_sfx2/objsh.hxx
@@ -240,8 +240,6 @@ public:
 
     virtual sal_Bool            DoLoad( SfxMedium * pMedium );
     virtual sal_Bool            DoSaveAs( SvStorage * pNewStor );
-    virtual sal_Bool            DoSaveCompleted( SvStorage * pNewStor = NULL );
-    virtual sal_Bool            DoSaveCompleted( SfxMedium * pNewStor);
 
     virtual sal_Bool            ConvertFrom( SfxMedium &rMedium );
     virtual sal_Bool            ConvertTo( SfxMedium &rMedium );
diff --git a/binfilter/inc/bf_so3/persist.hxx b/binfilter/inc/bf_so3/persist.hxx
index db4fbce..bdffa11 100644
--- a/binfilter/inc/bf_so3/persist.hxx
+++ b/binfilter/inc/bf_so3/persist.hxx
@@ -232,7 +232,6 @@ public:
     BOOL			DoOwnerLoad( SvStorage * );
     virtual BOOL    DoSaveAs( SvStorage * pNewStg );
     virtual void    DoHandsOff();
-    virtual BOOL    DoSaveCompleted( SvStorage * = NULL );
     void            CleanUp(BOOL bRecurse=FALSE); //Rekursiv
 
     const Time &    GetModifyTime() const { return aModifiedTime; }
commit 7b0cf24a04102692d9e5b45afce83be21e671482
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Sat Mar 19 17:03:41 2011 +0100

    cleaning code in binfilter
    
    after deleting / touching some file, there have been cleaned out in
    order to get a better view: only comments removal here

diff --git a/binfilter/bf_sc/source/core/data/sc_documen5.cxx b/binfilter/bf_sc/source/core/data/sc_documen5.cxx
index db5e466..5083dbc 100644
--- a/binfilter/bf_sc/source/core/data/sc_documen5.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_documen5.cxx
@@ -37,8 +37,6 @@
 #pragma optimize("q",off) // p-code off
 #endif
 
-// INCLUDE ---------------------------------------------------------------
-
 #include <bf_sfx2/objsh.hxx>
 #include <bf_svx/svditer.hxx>
 #include <bf_svx/svdoole2.hxx>
@@ -59,474 +57,423 @@ namespace binfilter {
 SO2_DECL_REF(SvInPlaceObject)
 #endif
 
-// -----------------------------------------------------------------------
-
-        // Charts aus altem Dokument updaten
-
-/*N*/ void ScDocument::UpdateAllCharts(BOOL bDoUpdate)
-/*N*/ {
-/*N*/ 	if (!pDrawLayer)
-/*N*/ 		return;
-/*N*/ 
-/*N*/ 	USHORT nDataCount = pChartCollection->GetCount();
-/*N*/ 	if ( !nDataCount )
-/*N*/ 		return ;		// nothing to do
-/*?*/ 
-/*?*/ 	USHORT nPos;
-/*?*/ 
-/*?*/ 	for (USHORT nTab=0; nTab<=MAXTAB; nTab++)
-/*?*/ 	{
-/*?*/ 		if (pTab[nTab])
-/*?*/ 		{
-/*?*/ 			SdrPage* pPage = pDrawLayer->GetPage(nTab);
-/*?*/ 			DBG_ASSERT(pPage,"Page ?");
-/*?*/ 
-/*?*/ 			ScRange aRange;
-/*?*/ 			SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
-/*?*/ 			SdrObject* pObject = aIter.Next();
-/*?*/ 			while (pObject)
-/*?*/ 			{
-/*?*/ 				if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
-/*?*/ 				{
-/*?*/ 					SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
-/*?*/ 					if (aIPObj.Is())
-/*?*/ 					{
-/*?*/ 						// String aIPName = aIPObj->GetName()->GetName();
-/*?*/ 
-/*?*/ 						SvInfoObject* pInfoObj = pShell->Find( aIPObj );
-/*?*/ 						String aIPName;
-/*?*/ 
-/*?*/ 						if ( pInfoObj )
-/*?*/ 							aIPName = pInfoObj->GetObjName();
-/*?*/ 
-/*?*/ 						for (nPos=0; nPos<nDataCount; nPos++)
-/*?*/ 						{
-/*?*/ 							ScChartArray* pChartObj = (*pChartCollection)[nPos];
-/*?*/ 							if (pChartObj->GetName() == aIPName)
-/*?*/ 							{
-/*?*/ 								if (bDoUpdate)
-/*?*/ 								{
-/*?*/ 									SchMemChart* pMemChart = pChartObj->CreateMemChart();
-/*?*/ 									SchDLL::Update( aIPObj, pMemChart );
-/*?*/ 									delete pMemChart;
-/*?*/ 								}
-/*?*/ 								else		// nur Position uebernehmen
-/*?*/ 								{
-/*?*/ 									SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
-/*?*/ 									if (pChartData)
-/*?*/ 									{
-/*?*/ 										pChartObj->SetExtraStrings(*pChartData);
-/*?*/ //										aIPObj->SetModified( TRUE );
-/*?*/ 									}
-/*?*/ 								}
-/*?*/ 								ScChartListener* pCL = new ScChartListener(
-/*?*/ 									aIPName, this, pChartObj->GetRangeList() );
-/*?*/ 								pChartListenerCollection->Insert( pCL );
-/*?*/ 								pCL->StartListeningTo();
-/*?*/ 							}
-/*?*/ 						}
-/*?*/ 					}
-/*?*/ 				}
-/*?*/ 				pObject = aIter.Next();
-/*?*/ 			}
-/*?*/ 		}
-/*?*/ 	}
-/*?*/ 
-/*?*/ 	pChartCollection->FreeAll();
-/*N*/ }
-
-
-/*N*/ void ScDocument::UpdateChartArea( const String& rChartName,
-/*N*/ 			const ScRangeListRef& rNewList, BOOL bColHeaders, BOOL bRowHeaders,
-/*N*/ 			BOOL bAdd, Window* pWindow )
-/*N*/ {
-/*N*/ 	if (!pDrawLayer)
-/*N*/ 		return;
-/*N*/ 
-/*N*/ 	for (USHORT nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++)
-/*N*/ 	{
-/*N*/ 		SdrPage* pPage = pDrawLayer->GetPage(nTab);
-/*N*/ 		DBG_ASSERT(pPage,"Page ?");
-/*N*/ 
-/*N*/ 		SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
-/*N*/ 		SdrObject* pObject = aIter.Next();
-/*N*/ 		while (pObject)
-/*N*/ 		{
-/*N*/ 			if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
-/*N*/ 					((SdrOle2Obj*)pObject)->GetPersistName() == rChartName )
-/*N*/ 			{
-/*N*/ 				SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
-/*N*/ 				if (aIPObj.Is())
-/*N*/ 				{
-/*N*/ 					const SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
-/*N*/ 					if ( pChartData )
-/*N*/ 					{
-/*N*/ 						ScChartArray aArray( this, *pChartData );
-/*N*/ 						if ( bAdd )
-/*N*/ 						{
-/*N*/ 							// bei bAdd werden Header-Angaben ignoriert
-/*N*/ 							aArray.AddToRangeList( rNewList );
-/*N*/ 						}
-/*N*/ 						else
-/*N*/ 						{
-/*N*/ 							aArray.SetRangeList( rNewList );
-/*N*/ 							aArray.SetHeaders( bColHeaders, bRowHeaders );
-/*N*/ 						}
-/*N*/ 						pChartListenerCollection->ChangeListening(
-/*N*/ 							rChartName, aArray.GetRangeList() );
-/*N*/ 
-/*N*/ 
-/*N*/ 						SchMemChart* pMemChart = aArray.CreateMemChart();
-/*N*/ 						ScChartArray::CopySettings( *pMemChart, *pChartData );
-/*N*/ 
-/*N*/ 						SchDLL::Update( aIPObj, pMemChart, pWindow );
-/*N*/ 						delete pMemChart;
-/*N*/ 
-/*N*/ 						// Dies veranlaesst Chart zum sofortigen Update
-/*N*/ 						//SvData aEmpty;
-/*N*/ 						//aIPObj->SendDataChanged( aEmpty );
-/*N*/ 						aIPObj->SendViewChanged();
-/*N*/ 						pObject->SendRepaintBroadcast();
-/*N*/ 
-/*N*/ 						return;			// nicht weitersuchen
-/*N*/ 					}
-/*N*/ 				}
-/*N*/ 			}
-/*N*/ 			pObject = aIter.Next();
-/*N*/ 		}
-/*N*/ 	}
-/*N*/ }
-
-/*N*/ void ScDocument::UpdateChart( const String& rChartName, Window* pWindow )
-/*N*/ {
-/*N*/ 	if (!pDrawLayer || bInDtorClear)
-/*N*/ 		return;
-/*N*/ 
-/*N*/ 	for (USHORT nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++)
-/*N*/ 	{
-/*N*/ 		SdrPage* pPage = pDrawLayer->GetPage(nTab);
-/*N*/ 		DBG_ASSERT(pPage,"Page ?");
-/*N*/ 
-/*N*/ 		SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
-/*N*/ 		SdrObject* pObject = aIter.Next();
-/*N*/ 		while (pObject)
-/*N*/ 		{
-/*N*/ 			if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
-/*N*/ 					((SdrOle2Obj*)pObject)->GetPersistName() == rChartName )
-/*N*/ 			{
-/*N*/ 				SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
-/*N*/ 				if (aIPObj.Is())
-/*N*/ 				{
-/*N*/ 					const SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
-/*N*/ 					if ( pChartData )
-/*N*/ 					{
-/*N*/ 						ScChartArray aArray( this, *pChartData );
-/*N*/ 
-/*N*/ 						SchMemChart* pMemChart = aArray.CreateMemChart();
-/*N*/ 						ScChartArray::CopySettings( *pMemChart, *pChartData );
-/*N*/ 
-/*N*/ 						//	#57655# Chart-Update ohne geaenderte Einstellungen (MemChart)
-/*N*/ 						//	soll das Dokument nicht auf modified setzen (z.B. in frisch
-/*N*/ 						//	geladenem Dokument durch initiales Recalc)
-/*N*/ 
-/*N*/ 						//	#72576# disable SetModified for readonly documents only
-/*N*/ 
-/*N*/ 						BOOL bEnabled = ( ((pShell && pShell->IsReadOnly()) ||
-/*N*/ 											IsImportingXML()) &&
-/*N*/ 											aIPObj->IsEnableSetModified() );
-/*N*/ 						if (bEnabled)
-/*N*/ 							aIPObj->EnableSetModified(FALSE);
-/*N*/ 
-/*N*/ 						SchDLL::Update( aIPObj, pMemChart, pWindow );
-/*N*/ 						delete pMemChart;
-/*N*/ 
-/*N*/ 						// Dies veranlaesst Chart zum sofortigen Update
-/*N*/ 						//SvData aEmpty;
-/*N*/ 						//aIPObj->SendDataChanged( aEmpty );
-/*N*/ 						aIPObj->SendViewChanged();
-/*N*/ 						pObject->SendRepaintBroadcast();
-/*N*/ 
-/*N*/ 						if (bEnabled)
-/*N*/ 							aIPObj->EnableSetModified(TRUE);
-/*N*/ 
-/*N*/ 						return;			// nicht weitersuchen
-/*N*/ 					}
-/*N*/ 				}
-/*N*/ 			}
-/*N*/ 			pObject = aIter.Next();
-/*N*/ 		}
-/*N*/ 	}
-/*N*/ }
-
-/*N*/ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
-/*N*/ 									USHORT nCol1, USHORT nRow1, USHORT nTab1,
-/*N*/ 									USHORT nCol2, USHORT nRow2, USHORT nTab2,
-/*N*/ 									short nDx, short nDy, short nDz )
-/*N*/ {
-/*N*/ 	if (!pDrawLayer)
-/*N*/ 		return;
-/*N*/ 
-/*N*/ 	USHORT nChartCount = pChartListenerCollection->GetCount();
-/*N*/ 	for ( USHORT nIndex = 0; nIndex < nChartCount; nIndex++ )
-/*N*/ 	{
-/*?*/ 		ScChartListener* pChartListener =
-/*?*/ 			(ScChartListener*) (pChartListenerCollection->At(nIndex));
-/*?*/ 		ScRangeListRef aRLR( pChartListener->GetRangeList() );
-/*?*/ 		ScRangeListRef aNewRLR( new ScRangeList );
-/*?*/ 		BOOL bChanged = FALSE;
-/*?*/ 		BOOL bDataChanged = FALSE;
-/*?*/ 		for ( ScRangePtr pR = aRLR->First(); pR; pR = aRLR->Next() )
-/*?*/ 		{
-/*?*/ 			USHORT theCol1 = pR->aStart.Col();
-/*?*/ 			USHORT theRow1 = pR->aStart.Row();
-/*?*/ 			USHORT theTab1 = pR->aStart.Tab();
-/*?*/ 			USHORT theCol2 = pR->aEnd.Col();
-/*?*/ 			USHORT theRow2 = pR->aEnd.Row();
-/*?*/ 			USHORT theTab2 = pR->aEnd.Tab();
-/*?*/ 			ScRefUpdateRes eRes = ScRefUpdate::Update(
-/*?*/ 				this, eUpdateRefMode,
-/*?*/ 				nCol1,nRow1,nTab1, nCol2,nRow2,nTab2,
-/*?*/ 				nDx,nDy,nDz,
-/*?*/ 				theCol1,theRow1,theTab1,
-/*?*/ 				theCol2,theRow2,theTab2 );
-/*?*/ 			if ( eRes != UR_NOTHING )
-/*?*/ 			{
-/*?*/ 				bChanged = TRUE;
-/*?*/ 				aNewRLR->Append( ScRange(
-/*?*/ 					theCol1, theRow1, theTab1,
-/*?*/ 					theCol2, theRow2, theTab2 ));
-/*?*/ 				if ( eUpdateRefMode == URM_INSDEL
-/*?*/ 					&& !bDataChanged
-/*?*/ 					&& (eRes == UR_INVALID ||
-/*?*/ 						((pR->aEnd.Col() - pR->aStart.Col()
-/*?*/ 						!= theCol2 - theCol1)
-/*?*/ 					|| (pR->aEnd.Row() - pR->aStart.Row()
-/*?*/ 						!= theRow2 - theRow1)
-/*?*/ 					|| (pR->aEnd.Tab() - pR->aStart.Tab()
-/*?*/ 						!= theTab2 - theTab1))) )
-/*?*/ 				{
-/*?*/ 					bDataChanged = TRUE;
-/*?*/ 				}
-/*?*/ 			}
-/*?*/ 			else
-/*?*/ 				aNewRLR->Append( *pR );
-/*?*/ 		}
-/*?*/ 		if ( bChanged )
-/*?*/ 		{
-/*?*/ 			DBG_BF_ASSERT(0, "STRIP");
-/*?*/ 		}
-/*N*/ 	}
-/*N*/ }
-
-
-
-
-/*N*/ BOOL ScDocument::HasData( USHORT nCol, USHORT nRow, USHORT nTab )
-/*N*/ {
-/*N*/ 	if (pTab[nTab])
-/*N*/ 		return pTab[nTab]->HasData( nCol, nRow );
-/*N*/ 	else
-/*N*/ 		return FALSE;
-/*N*/ }
-
-/*N*/ SchMemChart* ScDocument::FindChartData(const String&, BOOL)
-/*N*/ {
-/*N*/ 	DBG_BF_ASSERT(0, "STRIP");
-/*N*/ 	return NULL;
-/*N*/ }
-
-
-/*N*/ BOOL lcl_StringInCollection( const StrCollection* pColl, const String& rStr )
-/*N*/ {
-/*N*/ 	if ( !pColl )
-/*N*/ 		return FALSE;
-/*N*/ 
-/*N*/ 	StrData aData( rStr );
-/*N*/ 	USHORT nDummy;
-/*N*/ 	return pColl->Search( &aData, nDummy );
-/*N*/ }
-
-/*N*/ void ScDocument::UpdateChartListenerCollection()
-/*N*/ {
-/*N*/ 	bChartListenerCollectionNeedsUpdate = FALSE;
-/*N*/ 	if (!pDrawLayer)
-/*N*/ 		return;
-/*N*/ 	else
-/*N*/ 	{
-/*N*/ 		ScRange aRange;
-/*N*/ 		// Range fuer Suche unwichtig
-/*N*/ 		ScChartListener aCLSearcher( EMPTY_STRING, this, aRange );
-/*N*/ 		for (USHORT nTab=0; nTab<=MAXTAB; nTab++)
-/*N*/ 		{
-/*N*/ 			if (pTab[nTab])
-/*N*/ 			{
-/*N*/ 				SdrPage* pPage = pDrawLayer->GetPage(nTab);
-/*N*/ 				DBG_ASSERT(pPage,"Page ?");
-/*N*/ 
-/*N*/ 				SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
-/*N*/ 				SdrObject* pObject = aIter.Next();
-/*N*/ 				while (pObject)
-/*N*/ 				{
-/*N*/ 					if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
-/*N*/ 					{
-/*N*/ 						String aObjName = ((SdrOle2Obj*)pObject)->GetPersistName();
-/*N*/ 						aCLSearcher.SetString( aObjName );
-/*N*/ 						USHORT nIndex;
-/*N*/ 						if ( pChartListenerCollection->Search( &aCLSearcher, nIndex ) )
-/*N*/ 						{
-/*N*/ 							((ScChartListener*) (pChartListenerCollection->
-/*N*/ 								At( nIndex )))->SetUsed( TRUE );
-/*N*/ 						}
-/*N*/ 						else if ( lcl_StringInCollection( pOtherObjects, aObjName ) )
-/*N*/ 						{
-/*N*/ 							// non-chart OLE object -> don't touch
-/*N*/ 						}
-/*N*/ 						else
-/*N*/ 						{
-/*N*/ 						    //	SchDLL::GetChartData always loads the chart dll,
-/*N*/ 						    //	so SchModuleDummy::HasID must be tested before
-/*N*/ 
-/*N*/ 						    BOOL bIsChart = FALSE;						        
-/*N*/ 						    USHORT nId;
-/*N*/ 
-/*N*/                             //  Ask the SvPersist for the InfoObject to find out
-/*N*/                             //  whether it is a Chart. The old way with GetObjRef
-/*N*/                             //  loads the object which takes too much unnecessary
-/*N*/                             //  time
-/*N*/                             SvInfoObject* pInfoObj = pShell->Find(aObjName);
-/*N*/                             DBG_ASSERT(pInfoObj, "Why isn't here a SvInfoObject?");
-/*N*/ 						    if ( pInfoObj &&
-/*N*/ 							     ((nId = SchModuleDummy::HasID(pInfoObj->GetClassName()) ) != 0) )
-/*N*/ 						    {
-/*N*/                                 SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
-/*N*/                                 DBG_ASSERT(aIPObj.Is(), "no SvInPlaceObject given");
-/*N*/                                 if (aIPObj.Is())
-/*N*/                                 {
-/*N*/ 							        BOOL bSO6 = (nId >= SOFFICE_FILEFORMAT_60);
-/*N*/ 							        SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
-/*N*/ 							        // #84359# manually inserted OLE object
-/*N*/ 							        // => no listener at ScAddress(0,0,0)
-/*N*/ 							        // >=SO6: if no series set
-/*N*/ 							        // < SO6: if no SomeData set
-/*N*/ 							        if ( pChartData &&
-/*N*/ 								        ((!bSO6 && pChartData->SomeData1().Len()) ||
-/*N*/                                         (bSO6 && pChartData->GetChartRange().maRanges.size())) )
-/*N*/ 							        {
-/*N*/                                         if ( PastingDrawFromOtherDoc() )
-/*N*/                                         {
-/*?*/                                             // #89247# Remove series ranges from
-/*?*/                                             // charts not originating from the
-/*?*/                                             // same document, they become true OLE
-/*?*/                                             // objects.
-/*?*/                                             pChartData->SomeData1().Erase();
-/*?*/                                             pChartData->SomeData2().Erase();
-/*?*/                                             pChartData->SomeData3().Erase();
-/*?*/                                             pChartData->SomeData4().Erase();
-/*?*/                                             SchChartRange aChartRange;
-/*?*/                                             pChartData->SetChartRange( aChartRange );
-/*?*/                                             pChartData->SetReadOnly( FALSE );
-/*?*/                                             SchDLL::Update( aIPObj, pChartData );
-/*N*/                                         }
-/*N*/                                         else
-/*N*/                                         {
-/*N*/                                             bIsChart = TRUE;
-/*N*/ 
-/*N*/                                             ScChartArray aArray( this, *pChartData );
-/*N*/                                             ScChartListener* pCL = new ScChartListener(
-/*N*/                                                 aObjName,
-/*N*/                                                 this, aArray.GetRangeList() );
-/*N*/                                             pChartListenerCollection->Insert( pCL );
-/*N*/                                             pCL->StartListeningTo();
-/*N*/                                             pCL->SetUsed( TRUE );
-/*N*/ 
-/*N*/                                             BOOL bForceSave = FALSE;
-/*N*/ 
-/*N*/                                             //  Set ReadOnly flag at MemChart, so Chart knows
-/*N*/                                             //  about the external data in a freshly loaded document.
-/*N*/                                             //  #73642# only if the chart really has external data
-/*N*/                                             if ( aArray.IsValid() )
-/*N*/                                             {
-/*N*/                                                 pChartData->SetReadOnly( TRUE );
-/*N*/ 
-/*N*/                                                 //  #81525# re-create series ranges from old extra string
-/*N*/                                                 //  if not set (after loading)
-/*N*/                                                 if ( !bSO6 )
-/*N*/                                                 {
-/*N*/                                                     String aOldData3 = pChartData->SomeData3();
-/*N*/                                                     aArray.SetExtraStrings( *pChartData );
-/*N*/                                                     if ( aOldData3 != pChartData->SomeData3() )
-/*N*/                                                     {
-/*N*/                                                         //  #96148# ChartRange isn't saved in binary format anyway,
-/*N*/                                                         //  but SomeData3 (sheet names) has to survive swapping out,
-/*N*/                                                         //  or the chart can't be saved to 6.0 format.
-/*N*/ 
-/*N*/                                                         bForceSave = TRUE;
-/*N*/                                                     }
-/*N*/                                                 }
-/*N*/                                             }
-/*N*/ 
-/*N*/     #if 1
-/*N*/     // #74046# initially loaded charts need the number formatter standard precision
-/*N*/                                             BOOL bEnabled = aIPObj->IsEnableSetModified();
-/*N*/                                             if (bEnabled)
-/*N*/                                                 aIPObj->EnableSetModified(FALSE);
-/*N*/                                             pChartData->SetNumberFormatter( GetFormatTable() );
-/*N*/                                             SchDLL::Update( aIPObj, pChartData );
-/*N*/                                             //! pChartData got deleted, don't use it anymore
-/*N*/                                             if (bEnabled)
-/*N*/                                                 aIPObj->EnableSetModified(TRUE);
-/*N*/     #ifdef DBG_UTIL
-/*N*/     //                                          static BOOL bShown74046 = 0;
-/*N*/     //                                          if ( !bShown74046 && SOFFICE_FILEFORMAT_NOW > SOFFICE_FILEFORMAT_50 )
-/*N*/     //                                          {
-/*N*/     //                                              bShown74046 = 1;
-/*N*/     //                                              DBG_ERRORFILE( "on incompatible file format save number formatter standard precision in chart" );
-/*N*/     //                                          }
-/*N*/     #endif
-/*N*/     #endif
-/*N*/                                             if ( bForceSave )
-/*N*/                                             {
-                                                      // the return value of DoSave() was not checked, this is not a good style...
-                                                      // due to the suppression of the function DoSave() this stay here just for
-                                                      // pro memoria, waiting that all the if is cleaned out
-                                                      DBG_BF_ASSERT(0, "return value of DoSave() was not checked here!");
-                                                      //aIPObj->DoSave();
-/*N*/                                                 aIPObj->DoSaveCompleted();
-/*N*/                                             }
-/*N*/                                         }
-/*N*/ 							        }
-/*N*/                                 }
-/*N*/ 						    }
-/*N*/ 						    if (!bIsChart)
-/*N*/ 						    {
-/*N*/ 							    //	put into list of other ole objects, so the object doesn't have to
-/*N*/ 							    //	be swapped in the next time UpdateChartListenerCollection is called
-/*N*/ 							    //!	remove names when objects are no longer there?
-/*N*/ 							    //	(object names aren't used again before reloading the document)
-/*N*/ 
-/*N*/ 							    if (!pOtherObjects)
-/*N*/ 								    pOtherObjects = new StrCollection;
-/*N*/ 							    pOtherObjects->Insert( new StrData( aObjName ) );
-/*N*/ 						    }
-/*N*/ 						}
-/*N*/ 					}
-/*N*/ 					pObject = aIter.Next();
-/*N*/ 				}
-/*N*/ 			}
-/*N*/ 		}
-/*N*/ 		// alle nicht auf SetUsed gesetzten loeschen
-/*N*/ 		pChartListenerCollection->FreeUnused();
-/*N*/ 	}
-/*N*/ }
-
-/*N*/ void ScDocument::AddOLEObjectToCollection(const String& rName)
-/*N*/ {
-/*N*/ 	if (!pOtherObjects)
-/*N*/ 		pOtherObjects = new StrCollection;
-/*N*/ 	pOtherObjects->Insert( new StrData( rName ) );
-/*N*/ }
+// Charts aus altem Dokument updaten
+void ScDocument::UpdateAllCharts(BOOL bDoUpdate)
+{
+    if (!pDrawLayer)
+        return;
+
+    USHORT nDataCount = pChartCollection->GetCount();
+    if ( !nDataCount )
+        return ;        // nothing to do
+
+    USHORT nPos;
+
+    for (USHORT nTab=0; nTab<=MAXTAB; nTab++)
+    {
+        if (pTab[nTab])
+        {
+            SdrPage* pPage = pDrawLayer->GetPage(nTab);
+            DBG_ASSERT(pPage,"Page ?");
+
+            ScRange aRange;
+            SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+            SdrObject* pObject = aIter.Next();
+            while (pObject)
+            {
+                if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
+                {
+                    SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
+                    if (aIPObj.Is())
+                    {
+                        SvInfoObject* pInfoObj = pShell->Find( aIPObj );
+                        String aIPName;
+
+                        if ( pInfoObj )
+                            aIPName = pInfoObj->GetObjName();
+
+                        for (nPos=0; nPos<nDataCount; nPos++)
+                        {
+                            ScChartArray* pChartObj = (*pChartCollection)[nPos];
+                            if (pChartObj->GetName() == aIPName)
+                            {
+                                if (bDoUpdate)
+                                {
+                                    SchMemChart* pMemChart = pChartObj->CreateMemChart();
+                                    SchDLL::Update( aIPObj, pMemChart );
+                                    delete pMemChart;
+                                }
+                                else        // nur Position uebernehmen
+                                {
+                                    SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
+                                    if (pChartData)
+                                    {
+                                        pChartObj->SetExtraStrings(*pChartData);
+                                    }
+                                }
+                                ScChartListener* pCL = new ScChartListener(
+                                    aIPName, this, pChartObj->GetRangeList() );
+                                pChartListenerCollection->Insert( pCL );
+                                pCL->StartListeningTo();
+                            }
+                        }
+                    }
+                }
+                pObject = aIter.Next();
+            }
+        }
+    }
+
+    pChartCollection->FreeAll();
+}
+
+void ScDocument::UpdateChartArea( const String& rChartName,
+            const ScRangeListRef& rNewList, BOOL bColHeaders, BOOL bRowHeaders,
+            BOOL bAdd, Window* pWindow )
+{
+    if (!pDrawLayer)
+        return;
+
+    for (USHORT nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++)
+    {
+        SdrPage* pPage = pDrawLayer->GetPage(nTab);
+        DBG_ASSERT(pPage,"Page ?");
+
+        SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+        SdrObject* pObject = aIter.Next();
+        while (pObject)
+        {
+            if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
+                    ((SdrOle2Obj*)pObject)->GetPersistName() == rChartName )
+            {
+                SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
+                if (aIPObj.Is())
+                {
+                    const SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
+                    if ( pChartData )
+                    {
+                        ScChartArray aArray( this, *pChartData );
+                        if ( bAdd )
+                        {
+                            // bei bAdd werden Header-Angaben ignoriert
+                            aArray.AddToRangeList( rNewList );
+                        }
+                        else
+                        {
+                            aArray.SetRangeList( rNewList );
+                            aArray.SetHeaders( bColHeaders, bRowHeaders );
+                        }
+                        pChartListenerCollection->ChangeListening(
+                            rChartName, aArray.GetRangeList() );
+
+                        SchMemChart* pMemChart = aArray.CreateMemChart();
+                        ScChartArray::CopySettings( *pMemChart, *pChartData );
+
+                        SchDLL::Update( aIPObj, pMemChart, pWindow );
+                        delete pMemChart;
+
+                        // Dies veranlaesst Chart zum sofortigen Update
+                        aIPObj->SendViewChanged();
+                        pObject->SendRepaintBroadcast();
+
+                        return;            // nicht weitersuchen
+                    }
+                }
+            }
+            pObject = aIter.Next();
+        }
+    }
+}
+
+void ScDocument::UpdateChart( const String& rChartName, Window* pWindow )
+{
+    if (!pDrawLayer || bInDtorClear)
+        return;
+
+    for (USHORT nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++)
+    {
+        SdrPage* pPage = pDrawLayer->GetPage(nTab);
+        DBG_ASSERT(pPage,"Page ?");
+
+        SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+        SdrObject* pObject = aIter.Next();
+        while (pObject)
+        {
+            if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
+                    ((SdrOle2Obj*)pObject)->GetPersistName() == rChartName )
+            {
+                SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
+                if (aIPObj.Is())
+                {
+                    const SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
+                    if ( pChartData )
+                    {
+                        ScChartArray aArray( this, *pChartData );
+
+                        SchMemChart* pMemChart = aArray.CreateMemChart();
+                        ScChartArray::CopySettings( *pMemChart, *pChartData );
+
+                        BOOL bEnabled = ( ((pShell && pShell->IsReadOnly()) ||
+                                            IsImportingXML()) &&
+                                            aIPObj->IsEnableSetModified() );
+                        if (bEnabled)
+                            aIPObj->EnableSetModified(FALSE);
 
+                        SchDLL::Update( aIPObj, pMemChart, pWindow );
+                        delete pMemChart;
 
+                        // Dies veranlaesst Chart zum sofortigen Update
+                        aIPObj->SendViewChanged();
+                        pObject->SendRepaintBroadcast();
+
+                        if (bEnabled)
+                            aIPObj->EnableSetModified(TRUE);
+
+                        return;            // nicht weitersuchen
+                    }
+                }
+            }
+            pObject = aIter.Next();
+        }
+    }
+}
+
+void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
+                                    USHORT nCol1, USHORT nRow1, USHORT nTab1,
+                                    USHORT nCol2, USHORT nRow2, USHORT nTab2,
+                                    short nDx, short nDy, short nDz )
+{
+    if (!pDrawLayer)
+        return;
+
+    USHORT nChartCount = pChartListenerCollection->GetCount();
+    for ( USHORT nIndex = 0; nIndex < nChartCount; nIndex++ )
+    {
+        ScChartListener* pChartListener =
+            (ScChartListener*) (pChartListenerCollection->At(nIndex));
+        ScRangeListRef aRLR( pChartListener->GetRangeList() );
+        ScRangeListRef aNewRLR( new ScRangeList );
+        BOOL bChanged = FALSE;
+        BOOL bDataChanged = FALSE;
+        for ( ScRangePtr pR = aRLR->First(); pR; pR = aRLR->Next() )
+        {
+            USHORT theCol1 = pR->aStart.Col();
+            USHORT theRow1 = pR->aStart.Row();
+            USHORT theTab1 = pR->aStart.Tab();
+            USHORT theCol2 = pR->aEnd.Col();
+            USHORT theRow2 = pR->aEnd.Row();
+            USHORT theTab2 = pR->aEnd.Tab();
+            ScRefUpdateRes eRes = ScRefUpdate::Update(
+                this, eUpdateRefMode,
+                nCol1,nRow1,nTab1, nCol2,nRow2,nTab2,
+                nDx,nDy,nDz,
+                theCol1,theRow1,theTab1,
+                theCol2,theRow2,theTab2 );
+            if ( eRes != UR_NOTHING )
+            {
+                bChanged = TRUE;
+                aNewRLR->Append( ScRange(
+                    theCol1, theRow1, theTab1,
+                    theCol2, theRow2, theTab2 ));
+                if ( eUpdateRefMode == URM_INSDEL
+                    && !bDataChanged
+                    && (eRes == UR_INVALID ||
+                        ((pR->aEnd.Col() - pR->aStart.Col()
+                        != theCol2 - theCol1)
+                    || (pR->aEnd.Row() - pR->aStart.Row()
+                        != theRow2 - theRow1)
+                    || (pR->aEnd.Tab() - pR->aStart.Tab()
+                        != theTab2 - theTab1))) )
+                {
+                    bDataChanged = TRUE;
+                }
+            }
+            else
+                aNewRLR->Append( *pR );
+        }
+        if ( bChanged )
+        {
+            DBG_BF_ASSERT(0, "STRIP");
+        }
+    }
+}
+
+BOOL ScDocument::HasData( USHORT nCol, USHORT nRow, USHORT nTab )
+{
+    if (pTab[nTab])
+        return pTab[nTab]->HasData( nCol, nRow );
+    else
+        return FALSE;
+}
+
+SchMemChart* ScDocument::FindChartData(const String&, BOOL)
+{
+    DBG_BF_ASSERT(0, "STRIP");
+    return NULL;
+}
+
+BOOL lcl_StringInCollection( const StrCollection* pColl, const String& rStr )
+{
+    if ( !pColl )
+        return FALSE;
+
+    StrData aData( rStr );
+    USHORT nDummy;
+    return pColl->Search( &aData, nDummy );
+}
+
+void ScDocument::UpdateChartListenerCollection()
+{
+    bChartListenerCollectionNeedsUpdate = FALSE;
+    if (!pDrawLayer)
+        return;
+    else
+    {
+        ScRange aRange;
+        // Range fuer Suche unwichtig
+        ScChartListener aCLSearcher( EMPTY_STRING, this, aRange );
+        for (USHORT nTab=0; nTab<=MAXTAB; nTab++)
+        {
+            if (pTab[nTab])
+            {
+                SdrPage* pPage = pDrawLayer->GetPage(nTab);
+                DBG_ASSERT(pPage,"Page ?");
+
+                SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+                SdrObject* pObject = aIter.Next();
+                while (pObject)
+                {
+                    if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
+                    {
+                        String aObjName = ((SdrOle2Obj*)pObject)->GetPersistName();
+                        aCLSearcher.SetString( aObjName );
+                        USHORT nIndex;
+                        if ( pChartListenerCollection->Search( &aCLSearcher, nIndex ) )
+                        {
+                            ((ScChartListener*) (pChartListenerCollection->
+                                At( nIndex )))->SetUsed( TRUE );
+                        }
+                        else if ( lcl_StringInCollection( pOtherObjects, aObjName ) )
+                        {
+                            // non-chart OLE object -> don't touch
+                        }
+                        else
+                        {
+                            //    SchDLL::GetChartData always loads the chart dll,
+                            //    so SchModuleDummy::HasID must be tested before
+                            BOOL bIsChart = FALSE;
+                            USHORT nId;
+
+                            //  Ask the SvPersist for the InfoObject to find out
+                            //  whether it is a Chart. The old way with GetObjRef
+                            //  loads the object which takes too much unnecessary
+                            //  time
+                            SvInfoObject* pInfoObj = pShell->Find(aObjName);
+                            DBG_ASSERT(pInfoObj, "Why isn't here a SvInfoObject?");
+                            if ( pInfoObj &&
+                                ((nId = SchModuleDummy::HasID(pInfoObj->GetClassName()) ) != 0) )
+                            {
+                                SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
+                                DBG_ASSERT(aIPObj.Is(), "no SvInPlaceObject given");
+                                if (aIPObj.Is())
+                                {
+                                    BOOL bSO6 = (nId >= SOFFICE_FILEFORMAT_60);
+                                    SchMemChart* pChartData = SchDLL::GetChartData(aIPObj);
+                                    if ( pChartData &&
+                                        ((!bSO6 && pChartData->SomeData1().Len()) ||
+                                        (bSO6 && pChartData->GetChartRange().maRanges.size())) )
+                                    {
+                                        if ( PastingDrawFromOtherDoc() )
+                                        {
+                                            pChartData->SomeData1().Erase();
+                                            pChartData->SomeData2().Erase();
+                                            pChartData->SomeData3().Erase();
+                                            pChartData->SomeData4().Erase();
+                                            SchChartRange aChartRange;
+                                            pChartData->SetChartRange( aChartRange );
+                                            pChartData->SetReadOnly( FALSE );
+                                            SchDLL::Update( aIPObj, pChartData );
+                                        }
+                                        else
+                                        {
+                                            bIsChart = TRUE;
+
+                                            ScChartArray aArray( this, *pChartData );
+                                            ScChartListener* pCL = new ScChartListener(
+                                                aObjName,
+                                                this, aArray.GetRangeList() );
+                                            pChartListenerCollection->Insert( pCL );
+                                            pCL->StartListeningTo();
+                                            pCL->SetUsed( TRUE );
+
+                                            BOOL bForceSave = FALSE;
+
+                                            //  Set ReadOnly flag at MemChart, so Chart knows
+                                            //  about the external data in a freshly loaded document.
+                                            //  #73642# only if the chart really has external data
+                                            if ( aArray.IsValid() )
+                                            {
+                                                pChartData->SetReadOnly( TRUE );
+                                                if ( !bSO6 )
+                                                {
+                                                    String aOldData3 = pChartData->SomeData3();
+                                                    aArray.SetExtraStrings( *pChartData );
+                                                    if ( aOldData3 != pChartData->SomeData3() )
+                                                    {
+                                                        bForceSave = TRUE;
+                                                    }
+                                                }
+                                            }
+    #if 1
+                                            BOOL bEnabled = aIPObj->IsEnableSetModified();
+                                            if (bEnabled)
+                                                aIPObj->EnableSetModified(FALSE);
+                                            pChartData->SetNumberFormatter( GetFormatTable() );
+                                            SchDLL::Update( aIPObj, pChartData );
+                                            //! pChartData got deleted, don't use it anymore
+                                            if (bEnabled)
+                                                aIPObj->EnableSetModified(TRUE);
+    #endif
+                                            if ( bForceSave )
+                                            {
+                                                    // the return value of DoSave() was not checked, this is not a good style...
+                                                    // due to the suppression of the function DoSave() this stay here just for
+                                                    // pro memoria, waiting that all the if is cleaned out
+                                                    DBG_BF_ASSERT(0, "return value of DoSave() was not checked here!");
+                                                    //aIPObj->DoSave();
+                                                aIPObj->DoSaveCompleted();
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                            if (!bIsChart)
+                            {
+                                //    put into list of other ole objects, so the object doesn't have to
+                                //    be swapped in the next time UpdateChartListenerCollection is called
+                                //!    remove names when objects are no longer there?
+                                //    (object names aren't used again before reloading the document)
+                                if (!pOtherObjects)
+                                    pOtherObjects = new StrCollection;
+                                pOtherObjects->Insert( new StrData( aObjName ) );
+                            }
+                        }
+                    }
+                    pObject = aIter.Next();
+                }
+            }
+        }
+        // alle nicht auf SetUsed gesetzten loeschen
+        pChartListenerCollection->FreeUnused();
+    }
+}
+
+void ScDocument::AddOLEObjectToCollection(const String& rName)
+{
+    if (!pOtherObjects)
+        pOtherObjects = new StrCollection;
+    pOtherObjects->Insert( new StrData( rName ) );
+}
 
 }
 
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
index 4237534..0271f11 100644

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list