summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objcont.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-11-25 09:31:42 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-11-25 09:31:42 +0100
commit0aa4ddde0b8c0d0540e2dd4f2af98401bd5df43b (patch)
treef3f6e243c3d7dcd59a303ac39d8b4daa8a67634c /sfx2/source/doc/objcont.cxx
parentc8303bb35f1aab7c89e7cfa4168b3e4d5f5c0187 (diff)
move LoadView_Impl from SfxObjectShell to SfxTopFrame
Diffstat (limited to 'sfx2/source/doc/objcont.cxx')
-rw-r--r--sfx2/source/doc/objcont.cxx65
1 files changed, 0 insertions, 65 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index f15660538b..7b30345ff8 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -52,7 +52,6 @@
#include <svtools/ctloptions.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/namedvaluecollection.hxx>
#include <svtools/securityoptions.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
@@ -89,8 +88,6 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-using ::com::sun::star::document::XViewDataSupplier;
-using ::com::sun::star::container::XIndexAccess;
//====================================================================
@@ -193,68 +190,6 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHig
//====================================================================
-bool SfxObjectShell::LoadView_Impl( SfxTopFrame& rTargetFrame )
-{
- DBG_ASSERT( GetMedium(), "A Medium should exist here!");
- if ( !GetMedium() )
- return false;
-
- // obtain view data
- Reference< XViewDataSupplier > xViewDataSupplier( GetModel(), UNO_QUERY );
- Reference< XIndexAccess > xViewData;
- if ( xViewDataSupplier.is() )
- xViewData = xViewDataSupplier->getViewData();
-
- if ( !xViewData.is() || ( xViewData->getCount() == 0 ) )
- return false;
-
- // obtain the ViewID from the view data
- USHORT nViewId = 0;
- SEQUENCE < PROPERTYVALUE > aUserData;
- if ( xViewData->getByIndex( 0 ) >>= aUserData )
- {
- ::comphelper::NamedValueCollection aNamedUserData( aUserData );
- ::rtl::OUString sViewId = aNamedUserData.getOrDefault( "ViewId", ::rtl::OUString() );
- if ( sViewId.getLength() )
- {
- sViewId = sViewId.copy( 4 ); // format is like in "view3"
- nViewId = USHORT( sViewId.toInt32() );
- }
- }
-
- SfxItemSet* pSet = GetMedium()->GetItemSet();
- pSet->ClearItem( SID_USER_DATA );
- pSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
-
- OSL_ENSURE( rTargetFrame.GetCurrentViewFrame() == NULL,
- "SfxObjectShell::LoadView_Impl: no support (anymore) for loading into a non-empty frame!" );
- // Since some refactoring in CWS autorecovery, this shouldn't happen anymore. Frame re-usage is nowadays
- // done in higher layers, namely in the framework.
-
- rTargetFrame.InsertDocument_Impl( *this );
- SfxViewFrame* pViewFrame = rTargetFrame.GetCurrentViewFrame();
-
- // only temporary data, don't hold it in the itemset
- pSet->ClearItem( SID_VIEW_POS_SIZE );
- pSet->ClearItem( SID_WIN_POSSIZE );
- pSet->ClearItem( SID_VIEW_ZOOM_MODE );
-
- // UserData hier einlesen, da es ansonsten immer mit bBrowse=TRUE
- // aufgerufen wird, beim Abspeichern wurde aber bBrowse=FALSE verwendet
- if ( pViewFrame && pViewFrame->GetViewShell() && aUserData.getLength() )
- {
- pViewFrame->GetViewShell()->ReadUserDataSequence( aUserData, TRUE );
- }
-
- if ( pViewFrame )
- // activate frame
- pViewFrame->MakeActive_Impl( TRUE );
-
- return true;
-}
-
-//====================================================================
-
void SfxObjectShell::UpdateDocInfoForSave()
{
uno::Reference<document::XDocumentProperties> xDocProps(getDocProperties());