summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdview2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/sdview2.cxx')
-rw-r--r--sd/source/ui/view/sdview2.cxx126
1 files changed, 63 insertions, 63 deletions
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 1cfb24535fa9..766d49680ba4 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -103,8 +103,8 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
{
DropTargetHelper& mrTargetHelper;
::sd::Window* mpTargetWindow;
- USHORT mnPage;
- USHORT mnLayer;
+ USHORT mnPage;
+ USHORT mnLayer;
SdNavigatorDropEvent (
const ExecuteDropEvent& rEvt,
@@ -135,13 +135,13 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
pTransferable->SetWorkDocument( (SdDrawDocument*) GetAllMarkedModel() );
mpDoc->CreatingDataObj( NULL );
- const Rectangle aMarkRect( GetAllMarkedRect() );
- TransferableObjectDescriptor aObjDesc;
- String aDisplayName;
- SdrOle2Obj* pSdrOleObj = NULL;
- SdrPageView* pPgView = GetSdrPageView();
- SdPage* pOldPage = pPgView ? ( (SdPage*) pPgView->GetPage() ) : NULL;
- SdPage* pNewPage = (SdPage*) pTransferable->GetWorkDocument()->GetPage( 0 );
+ const Rectangle aMarkRect( GetAllMarkedRect() );
+ TransferableObjectDescriptor aObjDesc;
+ String aDisplayName;
+ SdrOle2Obj* pSdrOleObj = NULL;
+ SdrPageView* pPgView = GetSdrPageView();
+ SdPage* pOldPage = pPgView ? ( (SdPage*) pPgView->GetPage() ) : NULL;
+ SdPage* pNewPage = (SdPage*) pTransferable->GetWorkDocument()->GetPage( 0 );
if( pOldPage )
{
@@ -193,9 +193,9 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
SD_MOD()->pTransferDrag = pTransferable;
- TransferableObjectDescriptor aObjDesc;
- String aDisplayName;
- SdrOle2Obj* pSdrOleObj = NULL;
+ TransferableObjectDescriptor aObjDesc;
+ String aDisplayName;
+ SdrOle2Obj* pSdrOleObj = NULL;
if( GetMarkedObjectCount() == 1 )
{
@@ -241,9 +241,9 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
{
SdTransferable* pTransferable = new SdTransferable( mpDoc, pWorkView, TRUE );
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xRet( pTransferable );
- TransferableObjectDescriptor aObjDesc;
- const Rectangle aMarkRect( GetAllMarkedRect() );
- String aDisplayName;
+ TransferableObjectDescriptor aObjDesc;
+ const Rectangle aMarkRect( GetAllMarkedRect() );
+ String aDisplayName;
SD_MOD()->pTransferSelection = pTransferable;
@@ -326,9 +326,9 @@ void View::DoPaste (::Window* pWindow)
{
const_cast< OutlinerView* >(pOLV)->PasteSpecial();
- SdrObject* pObj = GetTextEditObject();
- SdPage* pPage = (SdPage*)( pObj ? pObj->GetPage() : NULL );
- ::Outliner* pOutliner = pOLV->GetOutliner();
+ SdrObject* pObj = GetTextEditObject();
+ SdPage* pPage = (SdPage*)( pObj ? pObj->GetPage() : NULL );
+ ::Outliner* pOutliner = pOLV->GetOutliner();
if( pOutliner)
{
@@ -377,7 +377,7 @@ void View::DoPaste (::Window* pWindow)
{
if( !InsertData( aDataHelper, aPos, nDnDAction, FALSE ) )
{
- INetBookmark aINetBookmark( aEmptyStr, aEmptyStr );
+ INetBookmark aINetBookmark( aEmptyStr, aEmptyStr );
if( ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) &&
aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) ||
@@ -471,7 +471,7 @@ void View::DragFinished( sal_Int8 nDropAction )
if( pObj && pObj->GetPage() )
{
#ifdef DBG_UTIL
- SdrObject* pChkObj =
+ SdrObject* pChkObj =
#endif
pObj->GetPage()->RemoveObject(nOrdNum);
DBG_ASSERT(pChkObj==pObj,"pChkObj!=pObj beim RemoveObject()");
@@ -497,10 +497,10 @@ void View::DragFinished( sal_Int8 nDropAction )
sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
::sd::Window*, USHORT, USHORT nLayer )
{
- String aLayerName( GetActiveLayer() );
- SdrPageView* pPV = GetSdrPageView();
- sal_Int8 nDropAction = rEvt.mnAction;
- sal_Int8 nRet = DND_ACTION_NONE;
+ String aLayerName( GetActiveLayer() );
+ SdrPageView* pPV = GetSdrPageView();
+ sal_Int8 nDropAction = rEvt.mnAction;
+ sal_Int8 nRet = DND_ACTION_NONE;
if( nLayer != SDRLAYER_NOTFOUND )
{
@@ -511,7 +511,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
if( mbIsDropAllowed && !pPV->IsLayerLocked( aLayerName ) && pPV->IsLayerVisible( aLayerName ) )
{
const OutlinerView* pOLV = GetTextEditOutlinerView();
- BOOL bIsInsideOutlinerView = FALSE;
+ BOOL bIsInsideOutlinerView = FALSE;
if( pOLV )
{
@@ -555,10 +555,10 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
{
const BOOL bDrawing = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_DRAWING );
const BOOL bGraphic = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB );
- const BOOL bMtf = rTargetHelper.IsDropFormatSupported( FORMAT_GDIMETAFILE );
- const BOOL bBitmap = rTargetHelper.IsDropFormatSupported( FORMAT_BITMAP );
- BOOL bBookmark = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
- BOOL bXFillExchange = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_XFA );
+ const BOOL bMtf = rTargetHelper.IsDropFormatSupported( FORMAT_GDIMETAFILE );
+ const BOOL bBitmap = rTargetHelper.IsDropFormatSupported( FORMAT_BITMAP );
+ BOOL bBookmark = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
+ BOOL bXFillExchange = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_XFA );
// check handle insert
if( !nRet && ( (bXFillExchange && ( SDRDRAG_GRADIENT == GetDragMode() )) || ( SDRDRAG_TRANSPARENCE == GetDragMode() ) ) )
@@ -587,11 +587,11 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
// check object insert
if( !nRet && ( bXFillExchange || ( ( bDrawing || bGraphic || bMtf || bBitmap || bBookmark ) && ( nDropAction & DND_ACTION_LINK ) ) ) )
{
- SdrObject* pPickObj = NULL;
- SdrPageView* pPageView = NULL;
+ SdrObject* pPickObj = NULL;
+ SdrPageView* pPageView = NULL;
::sd::Window* pWindow = mpViewSh->GetActiveWindow();
- Point aPos( pWindow->PixelToLogic( rEvt.maPosPixel ) );
- const BOOL bHasPickObj = PickObj( aPos, getHitTolLog(), pPickObj, pPageView );
+ Point aPos( pWindow->PixelToLogic( rEvt.maPosPixel ) );
+ const BOOL bHasPickObj = PickObj( aPos, getHitTolLog(), pPickObj, pPageView );
BOOL bIsPresTarget = FALSE;
if( bHasPickObj && pPickObj && ( pPickObj->IsEmptyPresObj() || pPickObj->GetUserCall() ) )
@@ -609,7 +609,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
{
mpDropMarkerObj = pPickObj;
ImplClearDrawDropMarker();
-
+
if(mpDropMarkerObj)
{
mpDropMarker = new SdrDropMarkerOverlay(*this, *mpDropMarkerObj);
@@ -672,10 +672,10 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow, USHORT nPage, USHORT nLayer )
{
- SdrPageView* pPV = GetSdrPageView();
- String aActiveLayer = GetActiveLayer();
- sal_Int8 nDropAction = rEvt.mnAction;
- sal_Int8 nRet = DND_ACTION_NONE;
+ SdrPageView* pPV = GetSdrPageView();
+ String aActiveLayer = GetActiveLayer();
+ sal_Int8 nDropAction = rEvt.mnAction;
+ sal_Int8 nRet = DND_ACTION_NONE;
// destroy drop marker if it is shown
if( mpDropMarker )
@@ -687,7 +687,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
if( !pPV->IsLayerLocked( aActiveLayer ) )
{
const OutlinerView* pOLV = GetTextEditOutlinerView();
- BOOL bIsInsideOutlinerView = FALSE;
+ BOOL bIsInsideOutlinerView = FALSE;
if( pOLV )
{
@@ -710,8 +710,8 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
if( !bIsInsideOutlinerView )
{
- Point aPos;
- TransferableDataHelper aDataHelper( rEvt.maDropEvent.Transferable );
+ Point aPos;
+ TransferableDataHelper aDataHelper( rEvt.maDropEvent.Transferable );
if( pTargetWindow )
aPos = pTargetWindow->PixelToLogic( rEvt.maPosPixel );
@@ -752,8 +752,8 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
// special insert?
if( !nRet && mpViewSh )
{
- String aTmpString1, aTmpString2;
- INetBookmark aINetBookmark( aTmpString1, aTmpString2 );
+ String aTmpString1, aTmpString2;
+ INetBookmark aINetBookmark( aTmpString1, aTmpString2 );
// insert bookmark
if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) &&
@@ -773,15 +773,15 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
}
else
{
- SdrObject* pPickObj = NULL;
- SdrPageView* pPageView = NULL;
+ SdrObject* pPickObj = NULL;
+ SdrPageView* pPageView = NULL;
if( PickObj( aPos, getHitTolLog(), pPickObj, pPageView ) )
{
// insert as clip action => jump
- rtl::OUString aBookmark( aINetBookmark.GetURL() );
- SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo( pPickObj );
- BOOL bCreated = FALSE;
+ rtl::OUString aBookmark( aINetBookmark.GetURL() );
+ SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo( pPickObj );
+ BOOL bCreated = FALSE;
if( aBookmark.getLength() )
{
@@ -821,7 +821,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
pAction->SetPathObj(pInfo->mpPathObj, pInfo->mpPathObj);
pAction->SetClickAction(pInfo->meClickAction, eClickAction);
pAction->SetBookmark(pInfo->GetBookmark(), aBookmark);
-// pAction->SetInvisibleInPres(pInfo->mbInvisibleInPresentation, TRUE);
+// pAction->SetInvisibleInPres(pInfo->mbInvisibleInPresentation, TRUE);
pAction->SetVerb(pInfo->mnVerb, pInfo->mnVerb);
pAction->SetSecondEffect(pInfo->meSecondEffect, pInfo->meSecondEffect);
pAction->SetSecondSpeed(pInfo->meSecondSpeed, pInfo->meSecondSpeed);
@@ -857,17 +857,17 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEvent )
{
- TransferableDataHelper aDataHelper( pSdNavigatorDropEvent->maDropEvent.Transferable );
+ TransferableDataHelper aDataHelper( pSdNavigatorDropEvent->maDropEvent.Transferable );
SdPageObjsTLB::SdPageObjsTransferable* pPageObjsTransferable = SdPageObjsTLB::SdPageObjsTransferable::getImplementation( aDataHelper.GetXTransferable() );
- INetBookmark aINetBookmark;
+ INetBookmark aINetBookmark;
if( pPageObjsTransferable && aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) )
{
- Point aPos;
- List aBookmarkList;
- String aBookmark;
- SdPage* pPage = (SdPage*) GetSdrPageView()->GetPage();
- USHORT nPgPos = 0xFFFF;
+ Point aPos;
+ List aBookmarkList;
+ String aBookmark;
+ SdPage* pPage = (SdPage*) GetSdrPageView()->GetPage();
+ USHORT nPgPos = 0xFFFF;
if( pSdNavigatorDropEvent->mpTargetWindow )
aPos = pSdNavigatorDropEvent->mpTargetWindow->PixelToLogic( pSdNavigatorDropEvent->maPosPixel );
@@ -889,10 +889,10 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv
// Um zu gewaehrleisten, dass alle Seitennamen eindeutig sind, werden
// die einzufuegenden geprueft und gegebenenfalls in einer Ersatzliste
// aufgenommen (bNameOK == FALSE -> Benutzer hat abgebrochen)
- List* pExchangeList = NULL;
- BOOL bLink = ( NAVIGATOR_DRAGTYPE_LINK == pPageObjsTransferable->GetDragType() ? TRUE : FALSE );
- BOOL bNameOK = GetExchangeList( pExchangeList, &aBookmarkList, 2 );
- BOOL bReplace = FALSE;
+ List* pExchangeList = NULL;
+ BOOL bLink = ( NAVIGATOR_DRAGTYPE_LINK == pPageObjsTransferable->GetDragType() ? TRUE : FALSE );
+ BOOL bNameOK = GetExchangeList( pExchangeList, &aBookmarkList, 2 );
+ BOOL bReplace = FALSE;
// Da man hier nicht weiss, ob es sich um eine Seite oder ein Objekt handelt,
// wird eine Liste sowohl mit Seiten, als auch mit Objekten gefuellt.
@@ -936,7 +936,7 @@ BOOL View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT n
DBG_ASSERT( !rpExchangeList, "ExchangeList muss NULL sein!");
BOOL bListIdentical = TRUE; // BookmarkList und ExchangeList sind gleich
- BOOL bNameOK = TRUE; // Name ist eindeutig
+ BOOL bNameOK = TRUE; // Name ist eindeutig
rpExchangeList = new List();
@@ -951,7 +951,7 @@ BOOL View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT n
if( nType == 0 || nType == 2 )
bNameOK = mpDocSh->CheckPageName (
mpViewSh->GetActiveWindow(), *pNewName);
-
+
if( bNameOK && ( nType == 1 || nType == 2 ) )
{
if( mpDoc->GetObj( *pNewName ) )