View | Details | Raw Unified | Return to issue 108867
Collapse All | Expand All

(-)./old/sc/inc/document.hxx (-2 / +2 lines)
Lines 2-8 Link Here
2
 *
2
 *
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
 *
4
 *
5
 * Copyright 2008 by Sun Microsystems, Inc.
5
 * Copyright 2008, 2010 by Sun Microsystems, Inc.
6
 *
6
 *
7
 * OpenOffice.org - a multi-platform office productivity suite
7
 * OpenOffice.org - a multi-platform office productivity suite
8
 *
8
 *
Lines 968-974 Link Here
968
    SC_DLLPUBLIC void			ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
968
    SC_DLLPUBLIC void			ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
969
	SC_DLLPUBLIC void			ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
969
	SC_DLLPUBLIC void			ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
970
	void			SetCutMode( BOOL bCut );
970
	void			SetCutMode( BOOL bCut );
971
	BOOL			IsCutMode();
971
	SC_DLLPUBLIC BOOL			IsCutMode();
972
	void			SetClipArea( const ScRange& rArea, BOOL bCut = FALSE );
972
	void			SetClipArea( const ScRange& rArea, BOOL bCut = FALSE );
973
973
974
	SC_DLLPUBLIC BOOL			IsDocVisible() const						{ return bIsVisible; }
974
	SC_DLLPUBLIC BOOL			IsDocVisible() const						{ return bIsVisible; }
(-)./old/sc/source/ui/vba/vbaapplication.cxx (-16 / +70 lines)
Lines 2-8 Link Here
2
 *
2
 *
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
 * 
4
 * 
5
 * Copyright 2008 by Sun Microsystems, Inc.
5
 * Copyright 2008, 2010 by Sun Microsystems, Inc.
6
 *
6
 *
7
 * OpenOffice.org - a multi-platform office productivity suite
7
 * OpenOffice.org - a multi-platform office productivity suite
8
 *
8
 *
Lines 29-40 Link Here
29
 ************************************************************************/
29
 ************************************************************************/
30
#include <stdio.h>
30
#include <stdio.h>
31
31
32
32
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
33
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
33
#include<com/sun/star/sheet/XSpreadsheetView.hpp>
34
#include<com/sun/star/sheet/XSpreadsheetView.hpp>
34
#include <com/sun/star/sheet/XSpreadsheets.hpp>
35
#include <com/sun/star/sheet/XSpreadsheets.hpp>
35
#include<com/sun/star/view/XSelectionSupplier.hpp>
36
#include<com/sun/star/view/XSelectionSupplier.hpp>
36
#include <com/sun/star/lang/XServiceInfo.hpp>
37
#include <com/sun/star/lang/XServiceInfo.hpp>
37
#include<ooo/vba/excel/XlCalculation.hpp>
38
#include<ooo/vba/excel/XlCalculation.hpp>
39
#include<ooo/vba/excel/XlCutCopyMode.hpp>
38
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
40
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
39
#include <com/sun/star/sheet/XCalculatable.hpp>
41
#include <com/sun/star/sheet/XCalculatable.hpp>
40
#include <com/sun/star/frame/XLayoutManager.hpp>
42
#include <com/sun/star/frame/XLayoutManager.hpp>
Lines 89-94 Link Here
89
#include <basic/sbuno.hxx>
91
#include <basic/sbuno.hxx>
90
#include <basic/sbmeth.hxx>
92
#include <basic/sbmeth.hxx>
91
93
94
#include "transobj.hxx"
92
#include "convuno.hxx"
95
#include "convuno.hxx"
93
#include "cellsuno.hxx"
96
#include "cellsuno.hxx"
94
#include "miscuno.hxx"
97
#include "miscuno.hxx"
Lines 327-342 Link Here
327
uno::Any SAL_CALL 
330
uno::Any SAL_CALL 
328
ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
331
ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
329
{
332
{
330
	//# FIXME TODO, implementation
331
	uno::Any result;
333
	uno::Any result;
332
	result <<= sal_False;
334
	ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
335
	ScDocument* pDoc = pOwnClip ? pOwnClip->GetDocument() : NULL;
336
	if ( pDoc )
337
	{
338
		if ( pDoc->IsCutMode() )
339
		{
340
			result <<= excel::XlCutCopyMode::xlCut;
341
		}
342
		else
343
		{
344
			result <<= excel::XlCutCopyMode::xlCopy;
345
		}
346
	}
347
	else
348
	{
349
		result <<= sal_False;
350
	}
333
	return result;
351
	return result;
334
}
352
}
335
353
336
void SAL_CALL 
354
void SAL_CALL 
337
ScVbaApplication::setCutCopyMode( const uno::Any& /*_cutcopymode*/ ) throw (uno::RuntimeException)
355
ScVbaApplication::setCutCopyMode( const uno::Any& _cutcopymode ) throw (uno::RuntimeException)
338
{
356
{
339
	//# FIXME TODO, implementation
357
	// According to Excel's behavior, no matter what is the value of _cutcopymode, always releases the clip object.
358
	sal_Bool bCutCopyMode = sal_False;
359
	if ( ( _cutcopymode >>= bCutCopyMode ) )
360
	{
361
		ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
362
		if ( pOwnClip )
363
		{
364
			pOwnClip->ObjectReleased();
365
			ScTabViewShell* pTabViewShell = excel::getBestViewShell( getCurrentDocument() );
366
			if ( pTabViewShell )
367
			{
368
				ScViewData* pView = pTabViewShell->GetViewData();	
369
				Window* pWindow = pView ? pView->GetActiveWin() : NULL;
370
				if ( pWindow )
371
				{
372
					Reference< datatransfer::clipboard::XClipboard > xClipboard = pWindow->GetClipboard();
373
					Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY );
374
					if ( xClipboard.is() )
375
					{
376
						xClipboard->setContents( NULL, NULL );
377
						if ( xFlushableClipboard.is() )
378
						{
379
							const sal_uInt32 nRef = Application::ReleaseSolarMutex();
380
							try
381
							{
382
								xFlushableClipboard->flushClipboard();
383
							}
384
							catch( const uno::Exception& )
385
							{
386
							}
387
							Application::AcquireSolarMutex( nRef );
388
						}
389
					}
390
				}
391
			}
392
		}
393
	}
340
}
394
}
341
395
342
uno::Any SAL_CALL
396
uno::Any SAL_CALL
Lines 697-712 Link Here
697
	return sal_True;
751
	return sal_True;
698
}
752
}
699
753
700
sal_Bool SAL_CALL
754
sal_Bool SAL_CALL
701
ScVbaApplication::getVisible() throw (uno::RuntimeException)
755
ScVbaApplication::getVisible() throw (uno::RuntimeException)
702
{
756
{
703
	sal_Bool bVisible = sal_True;	
757
	sal_Bool bVisible = sal_True;	
704
	return bVisible;
758
	return bVisible;
705
}
759
}
706
760
707
void SAL_CALL
761
void SAL_CALL
708
ScVbaApplication::setVisible(sal_Bool bVisible) throw (uno::RuntimeException)
762
ScVbaApplication::setVisible(sal_Bool bVisible) throw (uno::RuntimeException)
709
{
763
{
710
}
764
}
711
765
712
void SAL_CALL
766
void SAL_CALL

Return to issue 108867