*** orig/sc/source/ui/unoobj/docuno.cxx Thu Jan 10 21:17:54 2008 --- new/sc/source/ui/unoobj/docuno.cxx Tue May 27 11:23:35 2008 *************** *** 100,105 **** --- 100,111 ---- #ifndef _SC_VIEWSETTINGSSEQUENCEDEFINES_HXX #include "ViewSettingsSequenceDefines.hxx" #endif + #include "viewdata.hxx" + #include "drawview.hxx" + + #ifndef _SVX_UNOSHAPE_HXX + #include + #endif using namespace com::sun::star; *************** *** 608,614 **** if ( xInterface.is() ) { ScCellRangesBase* pSelObj = ScCellRangesBase::getImplementation( xInterface ); ! if ( pSelObj && pSelObj->GetDocShell() == pDocShell ) { BOOL bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL ); BOOL bCursor = pSelObj->IsCursorOnly(); --- 614,641 ---- if ( xInterface.is() ) { ScCellRangesBase* pSelObj = ScCellRangesBase::getImplementation( xInterface ); ! uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY ); ! ! if( xShapes.is() ) ! { ! ScViewData* pViewData= ScDocShell::GetViewData(); ! ScDrawView* pView = pViewData->GetScDrawView(); ! ScDocument* pDoc = pDocShell->GetDocument(); ! if( pDoc && pView ) ! { ! Rectangle aRect = pView->GetMarkedObjBoundRect(); ! SCTAB nCurrentTab = ScDocShell::GetCurTab(); ! ScRange aRange = pDoc->GetRange( nCurrentTab, aRect ); ! rMark.SetMarkArea( aRange ); ! ! if( rMark.IsMarked() ) ! { ! rStatus.SetMode( SC_PRINTSEL_RANGE ); ! bDone = TRUE; ! } ! } ! } ! else if ( pSelObj && pSelObj->GetDocShell() == pDocShell ) { BOOL bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL ); BOOL bCursor = pSelObj->IsCursorOnly();