summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdview3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/sdview3.cxx')
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdview3.cxx120
1 files changed, 60 insertions, 60 deletions
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 53c0d3636d82..ad3197a07b2e 100644..100755
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -290,22 +290,22 @@ if( aPreviewSizePixel.Width() && aPreviewSizePixel.Height() )
return true;
}
-BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
- const Point& rPos, sal_Int8& rDnDAction, BOOL bDrag,
- ULONG nFormat, USHORT nPage, USHORT nLayer )
+sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
+ const Point& rPos, sal_Int8& rDnDAction, sal_Bool bDrag,
+ sal_uLong nFormat, sal_uInt16 nPage, sal_uInt16 nLayer )
{
maDropPos = rPos;
mnAction = rDnDAction;
- mbIsDropAllowed = FALSE;
+ mbIsDropAllowed = sal_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;
+ sal_Bool bReturn = sal_False;
+ sal_Bool bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 );
+ sal_Bool bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink );
+ sal_uLong nPasteOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh != NULL)
{
@@ -404,10 +404,10 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( !pPV->IsLayerLocked( aLayer ) )
{
- pOwnData->SetInternalMove( TRUE );
+ pOwnData->SetInternalMove( sal_True );
SortMarkedObjects();
- for( ULONG nM = 0; nM < GetMarkedObjectCount(); nM++ )
+ for( sal_uLong nM = 0; nM < GetMarkedObjectCount(); nM++ )
{
SdrMark* pM = GetSdrMarkByIndex( nM );
SdrObject* pO = pM->GetMarkedSdrObj();
@@ -426,18 +426,18 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else
{
SdrPageView* pPV = GetSdrPageView();
- BOOL bDropOnTabBar = TRUE;
+ sal_Bool bDropOnTabBar = sal_True;
if( !pPage && pPV->GetPage()->GetPageNum() != mnDragSrcPgNum )
{
pPage = (SdPage*) pPV->GetPage();
- bDropOnTabBar = FALSE;
+ bDropOnTabBar = sal_False;
}
if( pPage )
@@ -530,7 +530,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
SdrEdgeObj* pCloneEdge = (SdrEdgeObj*)pRem->pClone;
// test first connection
- SdrObjConnection& rConn0 = pOrigEdge->GetConnection(FALSE);
+ SdrObjConnection& rConn0 = pOrigEdge->GetConnection(sal_False);
SdrObject* pConnObj = rConn0.GetObject();
if(pConnObj)
{
@@ -538,8 +538,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if(pConnClone)
{
// if dest obj was cloned, too, re-establish connection
- pCloneEdge->ConnectToNode(FALSE, pConnClone);
- pCloneEdge->GetConnection(FALSE).SetConnectorId(rConn0.GetConnectorId());
+ pCloneEdge->ConnectToNode(sal_False, pConnClone);
+ pCloneEdge->GetConnection(sal_False).SetConnectorId(rConn0.GetConnectorId());
}
else
{
@@ -555,14 +555,14 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
aPosition.X() += aVector.A();
aPosition.Y() += aVector.B();
- pCloneEdge->SetTailPoint(FALSE, aPosition);
+ pCloneEdge->SetTailPoint(sal_False, aPosition);
}
}
}
}
// test second connection
- SdrObjConnection& rConn1 = pOrigEdge->GetConnection(TRUE);
+ SdrObjConnection& rConn1 = pOrigEdge->GetConnection(sal_True);
pConnObj = rConn1.GetObject();
if(pConnObj)
{
@@ -570,8 +570,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if(pConnClone)
{
// if dest obj was cloned, too, re-establish connection
- pCloneEdge->ConnectToNode(TRUE, pConnClone);
- pCloneEdge->GetConnection(TRUE).SetConnectorId(rConn1.GetConnectorId());
+ pCloneEdge->ConnectToNode(sal_True, pConnClone);
+ pCloneEdge->GetConnection(sal_True).SetConnectorId(rConn1.GetConnectorId());
}
else
{
@@ -587,7 +587,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
aPosition.X() += aVector.A();
aPosition.Y() += aVector.B();
- pCloneEdge->SetTailPoint(TRUE, aPosition);
+ pCloneEdge->SetTailPoint(sal_True, aPosition);
}
}
}
@@ -603,21 +603,21 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pMarkList != mpDragSrcMarkList )
delete pMarkList;
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
maDropErrorTimer.Start();
- bReturn = FALSE;
+ bReturn = sal_False;
}
}
}
else
{
- pOwnData->SetInternalMove( TRUE );
+ pOwnData->SetInternalMove( sal_True );
MoveAllMarked( Size( maDropPos.X() - pOwnData->GetStartPos().X(),
maDropPos.Y() - pOwnData->GetStartPos().Y() ), bCopy );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -637,13 +637,13 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
String aLayout( pPage->GetLayoutName() );
aLayout.Erase( aLayout.SearchAscii( SD_LT_SEPARATOR ) );
- pPage->SetPresentationLayout( aLayout, FALSE, FALSE );
+ pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
pSourceDoc->CreatingDataObj( NULL );
}
else
{
maDropErrorTimer.Start();
- bReturn = FALSE;
+ bReturn = sal_False;
}
}
}
@@ -663,10 +663,10 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// delete pages, that are not of any interest for us
for( long i = ( pWorkModel->GetPageCount() - 1 ); i >= 0; i-- )
{
- SdPage* pP = static_cast< SdPage* >( pWorkModel->GetPage( (USHORT) i ) );
+ SdPage* pP = static_cast< SdPage* >( pWorkModel->GetPage( (sal_uInt16) i ) );
if( pP->GetPageKind() != PK_STANDARD )
- pWorkModel->DeletePage( (USHORT) i );
+ pWorkModel->DeletePage( (sal_uInt16) i );
}
bReturn = Paste( *pWorkModel, maDropPos, pPage, nPasteOptions );
@@ -676,7 +676,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
String aLayout(pPage->GetLayoutName());
aLayout.Erase(aLayout.SearchAscii(SD_LT_SEPARATOR));
- pPage->SetPresentationLayout( aLayout, FALSE, FALSE );
+ pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
}
}
else if( CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_DRAWING ) )
@@ -685,7 +685,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ) )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
DrawDocShellRef xShell = new DrawDocShell(SFX_CREATE_MODE_INTERNAL);
xShell->DoInitNew(0);
@@ -754,7 +754,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
{
SdrObject::Free(pPickObj2 );
}
- bChanged = TRUE;
+ bChanged = sal_True;
mnAction = DND_ACTION_COPY;
}
else if( ( mnAction & DND_ACTION_LINK ) && pPickObj && pObj && !pPickObj->ISA( SdrGrafObj ) && !pPickObj->ISA( SdrOle2Obj ) )
@@ -788,13 +788,13 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
aNewSet.Put( pObj->GetMergedItemSet() );
if( bUndo )
- AddUndo( new E3dAttributesUndoAction( *mpDoc, this, (E3dObject*) pPickObj, aNewSet, aOldSet, FALSE ) );
+ AddUndo( new E3dAttributesUndoAction( *mpDoc, this, (E3dObject*) pPickObj, aNewSet, aOldSet, sal_False ) );
pPickObj->SetMergedItemSetAndBroadcast( aNewSet );
}
if( bUndo )
EndUndo();
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -840,7 +840,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
aRect.SetPos( maDropPos );
pObj->SetLogicRect( aRect );
InsertObjectAtView( pObj, *GetSdrPageView(), SDRINSERT_SETDEFLAYER );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -860,7 +860,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( mpDoc->GetDocSh() && ( mpDoc->GetDocSh()->GetClassName() == aObjDesc.maClassName ) )
{
uno::Reference < embed::XStorage > xStore( ::comphelper::OStorageHelper::GetStorageFromInputStream( xStm ) );
- ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SFX_CREATE_MODE_EMBEDDED, TRUE, mpDoc->GetDocumentType() ) );
+ ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SFX_CREATE_MODE_EMBEDDED, sal_True, mpDoc->GetDocumentType() ) );
// mba: BaseURL doesn't make sense for clipboard functionality
SfxMedium *pMedium = new SfxMedium( xStore, String() );
@@ -883,10 +883,10 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// delete pages, that are not of any interest for us
for( long i = ( pModel->GetPageCount() - 1 ); i >= 0; i-- )
{
- SdPage* pP = static_cast< SdPage* >( pModel->GetPage( (USHORT) i ) );
+ SdPage* pP = static_cast< SdPage* >( pModel->GetPage( (sal_uInt16) i ) );
if( pP->GetPageKind() != PK_STANDARD )
- pModel->DeletePage( (USHORT) i );
+ pModel->DeletePage( (sal_uInt16) i );
}
bReturn = Paste( *pModel, maDropPos, pPage, nPasteOptions );
@@ -896,7 +896,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
String aLayout(pPage->GetLayoutName());
aLayout.Erase(aLayout.SearchAscii(SD_LT_SEPARATOR));
- pPage->SetPresentationLayout( aLayout, FALSE, FALSE );
+ pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
}
xDocShRef->DoClose();
@@ -913,7 +913,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -990,7 +990,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Rectangle aRect( maDropPos, aSize );
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect );
SdrPageView* pPV = GetSdrPageView();
- ULONG nOptions = SDRINSERT_SETDEFLAYER;
+ sal_uLong nOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh!=NULL)
{
@@ -1006,7 +1006,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pImageMap )
pObj->InsertUserData( new SdIMapInfo( *pImageMap ) );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -1063,7 +1063,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -1139,7 +1139,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Rectangle aRect( maDropPos, aSize );
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect );
SdrPageView* pPV = GetSdrPageView();
- ULONG nOptions = SDRINSERT_SETDEFLAYER;
+ sal_uLong nOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh!=NULL)
{
@@ -1157,7 +1157,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// let the object stay in loaded state after insertion
pObj->Unload();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -1202,7 +1202,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea());
InsertGraphic( aGraphic, mnAction, aInsertPos, NULL, pImageMap );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else if( ( !bLink || pPickObj ) && CHECK_FORMAT_TRANS( FORMAT_GDIMETAFILE ) )
@@ -1226,7 +1226,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
}
- bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 ? true : false ) ? TRUE : FALSE;
+ bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 ? true : false ) ? sal_True : sal_False;
}
else if( ( !bLink || pPickObj ) && CHECK_FORMAT_TRANS( FORMAT_BITMAP ) )
{
@@ -1257,7 +1257,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea());
InsertGraphic( aBmp, mnAction, aInsertPos, NULL, pImageMap );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else if( pPickObj && CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_XFA ) )
@@ -1287,9 +1287,9 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Color aColor( rColItem.GetColorValue() );
String aName( rColItem.GetName() );
SfxItemSet aSet( mpDoc->GetPool() );
- BOOL bClosed = pPickObj->IsClosedObj();
+ sal_Bool bClosed = pPickObj->IsClosedObj();
::sd::Window* pWin = mpViewSh->GetActiveWindow();
- USHORT nHitLog = (USHORT) pWin->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pWin->PixelToLogic(
Size(FuPoor::HITPIX, 0 ) ).Width();
const long n2HitLog = nHitLog << 1;
Point aHitPosR( rPos );
@@ -1352,8 +1352,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) )
{
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pOLV->Read( *xStm, String(), EE_FORMAT_BIN, FALSE, mpDocSh->GetHeaderAttributes() );
- bReturn = TRUE;
+ pOLV->Read( *xStm, String(), EE_FORMAT_BIN, sal_False, mpDocSh->GetHeaderAttributes() );
+ bReturn = sal_True;
}
}
@@ -1386,8 +1386,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) )
{
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pOLV->Read( *xStm, String(), EE_FORMAT_RTF, FALSE, mpDocSh->GetHeaderAttributes() );
- bReturn = TRUE;
+ pOLV->Read( *xStm, String(), EE_FORMAT_RTF, sal_False, mpDocSh->GetHeaderAttributes() );
+ bReturn = sal_True;
}
}
@@ -1405,13 +1405,13 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
{
maDropFileVector.clear();
- for( ULONG i = 0, nCount = aDropFileList.Count(); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = aDropFileList.Count(); i < nCount; i++ )
maDropFileVector.push_back( aDropFileList.GetFile( i ) );
maDropInsertFileTimer.Start();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if( CHECK_FORMAT_TRANS( FORMAT_FILE ) )
{
@@ -1424,7 +1424,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
maDropInsertFileTimer.Start();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if( !bLink && CHECK_FORMAT_TRANS( FORMAT_STRING ) )
{
@@ -1442,7 +1442,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pOLV )
{
pOLV->InsertText( aOUString );
- bReturn = TRUE;
+ bReturn = sal_True;
}
if( !bReturn )
@@ -1452,7 +1452,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
}
MarkListHasChanged();
- mbIsDropAllowed = TRUE;
+ mbIsDropAllowed = sal_True;
rDnDAction = mnAction;
delete pImageMap;
@@ -1461,7 +1461,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
extern void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel );
-bool View::PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, ULONG nPasteOptions )
+bool View::PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, sal_uLong nPasteOptions )
{
SdDrawDocument* pModel = new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh );
pModel->NewOrLoadCompleted(NEW_DOC);