summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdview3.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:11:31 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:11:31 +0200
commit4f30c816fa0fb66e650d4e85304292b5ec72b22d (patch)
tree2c6ae8d7c2f6eb55686bb306afe1b1fce5172be8 /sd/source/ui/view/sdview3.cxx
parent2ebf6456709b2345fcd340137b10ff7bb47a3263 (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit 40849a63d4ca6da479ef28e129b15109a42e8617 (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:18 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit 2764d5adfcd646794593cda200fca9d4988d0d06 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:37 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
Notes: split repo tag: impress_libreoffice-3.3.0.4
Diffstat (limited to 'sd/source/ui/view/sdview3.cxx')
-rw-r--r--sd/source/ui/view/sdview3.cxx124
1 files changed, 62 insertions, 62 deletions
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 779ef01d1562..2f874a705cbd 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.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
@@ -112,8 +112,8 @@ namespace sd {
// #83525#
struct ImpRememberOrigAndClone
{
- SdrObject* pOrig;
- SdrObject* pClone;
+ SdrObject* pOrig;
+ SdrObject* pClone;
};
SdrObject* ImpGetClone(Container& aConnectorContainer, SdrObject* pConnObj)
@@ -166,9 +166,9 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo
return false;
/*
-SvFileStream aSvOutputStream( String( RTL_CONSTASCII_USTRINGPARAM( "/tmp/test.png" ) ), STREAM_WRITE | STREAM_TRUNC );
-Graphic aMtfGraphic( aMtf );
-Size aPreviewSizePixel( OutputDevice::LogicToLogic( aMtf.GetPrefSize(), aMtf.GetPrefMapMode(), MAP_PIXEL ) );
+SvFileStream aSvOutputStream( String( RTL_CONSTASCII_USTRINGPARAM( "/tmp/test.png" ) ), STREAM_WRITE | STREAM_TRUNC );
+Graphic aMtfGraphic( aMtf );
+Size aPreviewSizePixel( OutputDevice::LogicToLogic( aMtf.GetPrefSize(), aMtf.GetPrefMapMode(), MAP_PIXEL ) );
if( aPreviewSizePixel.Width() && aPreviewSizePixel.Height() )
{
@@ -299,14 +299,14 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
mnAction = rDnDAction;
mbIsDropAllowed = FALSE;
- TransferableDataHelper aDataHelper( rDataHelper );
- SdrObject* pPickObj = NULL;
- SdPage* pPage = NULL;
- ImageMap* pImageMap = NULL;
- BOOL bReturn = FALSE;
- BOOL bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 );
- BOOL bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink );
- ULONG nPasteOptions = SDRINSERT_SETDEFLAYER;
+ TransferableDataHelper aDataHelper( rDataHelper );
+ SdrObject* pPickObj = NULL;
+ SdPage* pPage = NULL;
+ ImageMap* pImageMap = NULL;
+ BOOL bReturn = FALSE;
+ BOOL bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 );
+ BOOL bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink );
+ ULONG nPasteOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh != NULL)
{
@@ -398,10 +398,10 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( nLayer != SDRLAYER_NOTFOUND )
{
// drop on layer tab bar
- SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
- SdrLayer* pLayer = rLayerAdmin.GetLayerPerID( nLayer );
- SdrPageView* pPV = GetSdrPageView();
- String aLayer( pLayer->GetName() );
+ SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
+ SdrLayer* pLayer = rLayerAdmin.GetLayerPerID( nLayer );
+ SdrPageView* pPV = GetSdrPageView();
+ String aLayer( pLayer->GetName() );
if( !pPV->IsLayerLocked( aLayer ) )
{
@@ -410,8 +410,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
for( ULONG nM = 0; nM < GetMarkedObjectCount(); nM++ )
{
- SdrMark* pM = GetSdrMarkByIndex( nM );
- SdrObject* pO = pM->GetMarkedSdrObj();
+ SdrMark* pM = GetSdrMarkByIndex( nM );
+ SdrObject* pO = pM->GetMarkedSdrObj();
if( pO )
{
@@ -432,8 +432,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
}
else
{
- SdrPageView* pPV = GetSdrPageView();
- BOOL bDropOnTabBar = TRUE;
+ SdrPageView* pPV = GetSdrPageView();
+ BOOL bDropOnTabBar = TRUE;
if( !pPage && pPV->GetPage()->GetPageNum() != mnDragSrcPgNum )
{
@@ -465,9 +465,9 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
pMarkList->ForceSort();
// #83525# stuff to remember originals and clones
- Container aConnectorContainer(0);
- sal_uInt32 a, nConnectorCount(0L);
- Point aCurPos;
+ Container aConnectorContainer(0);
+ sal_uInt32 a, nConnectorCount(0L);
+ Point aCurPos;
// calculate real position of current
// source objects, if necessary (#103207)
@@ -650,8 +650,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
}
else
{
- SdDrawDocument* pWorkModel = (SdDrawDocument*) pOwnData->GetWorkDocument();
- SdPage* pWorkPage = (SdPage*) pWorkModel->GetSdPage( 0, PK_STANDARD );
+ SdDrawDocument* pWorkModel = (SdDrawDocument*) pOwnData->GetWorkDocument();
+ SdPage* pWorkPage = (SdPage*) pWorkModel->GetSdPage( 0, PK_STANDARD );
pWorkPage->SetRectsDirty();
@@ -711,20 +711,20 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pModel->GetSdPage( 0, PK_STANDARD )->GetObjCount() == 1 )
{
// only one object
- SdrObject* pObj = pModel->GetSdPage( 0, PK_STANDARD )->GetObj( 0 );
- SdrObject* pPickObj2 = NULL;
- SdrPageView* pPV = NULL;
+ SdrObject* pObj = pModel->GetSdPage( 0, PK_STANDARD )->GetObj( 0 );
+ SdrObject* pPickObj2 = NULL;
+ SdrPageView* pPV = NULL;
PickObj( rPos, getHitTolLog(), pPickObj2, pPV );
if( ( mnAction & DND_ACTION_MOVE ) && pPickObj2 && pObj )
{
// replace object
- SdrObject* pNewObj = pObj->Clone();
- Rectangle aPickObjRect( pPickObj2->GetCurrentBoundRect() );
- Size aPickObjSize( aPickObjRect.GetSize() );
- Point aVec( aPickObjRect.TopLeft() );
- Rectangle aObjRect( pNewObj->GetCurrentBoundRect() );
- Size aObjSize( aObjRect.GetSize() );
+ SdrObject* pNewObj = pObj->Clone();
+ Rectangle aPickObjRect( pPickObj2->GetCurrentBoundRect() );
+ Size aPickObjSize( aPickObjRect.GetSize() );
+ Point aVec( aPickObjRect.TopLeft() );
+ Rectangle aObjRect( pNewObj->GetCurrentBoundRect() );
+ Size aObjSize( aObjRect.GetSize() );
Fraction aScaleWidth( aPickObjSize.Width(), aObjSize.Width() );
Fraction aScaleHeight( aPickObjSize.Height(), aObjSize.Height() );
@@ -832,8 +832,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pObj )
{
- Rectangle aRect( pObj->GetLogicRect() );
- Size aSize( aRect.GetSize() );
+ Rectangle aRect( pObj->GetLogicRect() );
+ Size aSize( aRect.GetSize() );
maDropPos.X() -= ( aSize.Width() >> 1 );
maDropPos.Y() -= ( aSize.Height() >> 1 );
@@ -852,7 +852,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
{
//TODO/LATER: is it possible that this format is binary?! (from old versions of SO)
uno::Reference < io::XInputStream > xStm;
- TransferableObjectDescriptor aObjDesc;
+ TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) &&
( aDataHelper.GetInputStream( nFormat ? nFormat : SOT_FORMATSTR_ID_EMBED_SOURCE, xStm ) ||
@@ -867,8 +867,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
SfxMedium *pMedium = new SfxMedium( xStore, String() );
if( xDocShRef->DoLoad( pMedium ) )
{
- SdDrawDocument* pModel = (SdDrawDocument*) xDocShRef->GetDoc();
- SdPage* pWorkPage = (SdPage*) pModel->GetSdPage( 0, PK_STANDARD );
+ SdDrawDocument* pModel = (SdDrawDocument*) xDocShRef->GetDoc();
+ SdPage* pWorkPage = (SdPage*) pModel->GetSdPage( 0, PK_STANDARD );
pWorkPage->SetRectsDirty();
@@ -1021,7 +1021,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( (nFormat != 0) || !aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) )
{
uno::Reference < io::XInputStream > xStm;
- TransferableObjectDescriptor aObjDesc;
+ TransferableObjectDescriptor aObjDesc;
if ( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE, aObjDesc ) )
{
@@ -1182,8 +1182,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pOwnData && pOwnData->GetWorkDocument() )
{
- const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
- SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ?
+ const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
+ SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ?
pWorkModel->GetSdPage( 0, PK_STANDARD ) :
pWorkModel->GetPage( 0 ) );
@@ -1213,8 +1213,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pOwnData && pOwnData->GetWorkDocument() )
{
- const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
- SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ?
+ const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
+ SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ?
pWorkModel->GetSdPage( 0, PK_STANDARD ) :
pWorkModel->GetPage( 0 ) );
@@ -1239,8 +1239,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pOwnData && pOwnData->GetWorkDocument() )
{
- const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
- SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ?
+ const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
+ SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ?
pWorkModel->GetSdPage( 0, PK_STANDARD ) :
pWorkModel->GetPage( 0 ) );
@@ -1278,26 +1278,26 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
EndUndo();
}
- XFillAttrSetItem* pSetItem = aFillData.GetXFillAttrSetItem();
- SfxItemSet rSet = pSetItem->GetItemSet();
- XFillStyle eFill= ( (XFillStyleItem&) rSet.Get( XATTR_FILLSTYLE ) ).GetValue();
+ XFillAttrSetItem* pSetItem = aFillData.GetXFillAttrSetItem();
+ SfxItemSet rSet = pSetItem->GetItemSet();
+ XFillStyle eFill= ( (XFillStyleItem&) rSet.Get( XATTR_FILLSTYLE ) ).GetValue();
if( eFill == XFILL_SOLID || eFill == XFILL_NONE )
{
- const XFillColorItem& rColItem = (XFillColorItem&) rSet.Get( XATTR_FILLCOLOR );
- Color aColor( rColItem.GetColorValue() );
- String aName( rColItem.GetName() );
- SfxItemSet aSet( mpDoc->GetPool() );
- BOOL bClosed = pPickObj->IsClosedObj();
+ const XFillColorItem& rColItem = (XFillColorItem&) rSet.Get( XATTR_FILLCOLOR );
+ Color aColor( rColItem.GetColorValue() );
+ String aName( rColItem.GetName() );
+ SfxItemSet aSet( mpDoc->GetPool() );
+ BOOL bClosed = pPickObj->IsClosedObj();
::sd::Window* pWin = mpViewSh->GetActiveWindow();
USHORT nHitLog = (USHORT) pWin->PixelToLogic(
Size(FuPoor::HITPIX, 0 ) ).Width();
- const long n2HitLog = nHitLog << 1;
- Point aHitPosR( rPos );
- Point aHitPosL( rPos );
- Point aHitPosT( rPos );
- Point aHitPosB( rPos );
- const SetOfByte* pVisiLayer = &GetSdrPageView()->GetVisibleLayers();
+ const long n2HitLog = nHitLog << 1;
+ Point aHitPosR( rPos );
+ Point aHitPosL( rPos );
+ Point aHitPosT( rPos );
+ Point aHitPosB( rPos );
+ const SetOfByte* pVisiLayer = &GetSdrPageView()->GetVisibleLayers();
aHitPosR.X() += n2HitLog;
aHitPosL.X() -= n2HitLog;