summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorKai Ahrens <ka@openoffice.org>2001-03-08 10:12:28 +0000
committerKai Ahrens <ka@openoffice.org>2001-03-08 10:12:28 +0000
commita6f7ed7c814f45345b26cdc7dc12d2b9d4ddbca7 (patch)
tree0dd0527f70496ffc89535ca722f14eeaddbbaa8c /sd/source/ui/func
parentf7f9114e5179ff8357901b44b6185bb86085e7b1 (diff)
new Drag&Drop interface/cleanup
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fucopy.cxx10
-rw-r--r--sd/source/ui/func/fuinsert.cxx15
-rw-r--r--sd/source/ui/func/fumorph.cxx8
-rw-r--r--sd/source/ui/func/fuzoom.cxx6
4 files changed, 19 insertions, 20 deletions
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index ae34773e79f2..2e5f8bc7dafd 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fucopy.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:48:35 $
+ * last change: $Author: ka $ $Date: 2001-03-08 11:08:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -332,9 +332,9 @@ FuCopy::FuCopy(SdViewShell* pViewSh, SdWindow* pWin, SdView* pView,
{
// Koennte man sicher noch optimieren, wuerde aber u.U.
// zu Rundungsfehlern fuehren
- USHORT nRed = aStartColor.GetRed() + (USHORT) ( ( (long) aEndColor.GetRed() - (long) aStartColor.GetRed() ) * (long) i / (long) nNumber );
- USHORT nGreen = aStartColor.GetGreen() + (USHORT) ( ( (long) aEndColor.GetGreen() - (long) aStartColor.GetGreen() ) * (long) i / (long) nNumber );
- USHORT nBlue = aStartColor.GetBlue() + (USHORT) ( ( (long) aEndColor.GetBlue() - (long) aStartColor.GetBlue() ) * (long) i / (long) nNumber );
+ BYTE nRed = aStartColor.GetRed() + (BYTE) ( ( (long) aEndColor.GetRed() - (long) aStartColor.GetRed() ) * (long) i / (long) nNumber );
+ BYTE nGreen = aStartColor.GetGreen() + (BYTE) ( ( (long) aEndColor.GetGreen() - (long) aStartColor.GetGreen() ) * (long) i / (long) nNumber );
+ BYTE nBlue = aStartColor.GetBlue() + (BYTE) ( ( (long) aEndColor.GetBlue() - (long) aStartColor.GetBlue() ) * (long) i / (long) nNumber );
Color aNewColor( nRed, nGreen, nBlue );
SfxItemSet aNewSet( pViewSh->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L );
aNewSet.Put( XFillStyleItem( XFILL_SOLID ) );
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 1ad2ae60888a..b53d7b996750 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fuinsert.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: ka $ $Date: 2001-02-13 12:14:55 $
+ * last change: $Author: ka $ $Date: 2001-03-08 11:08:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -200,7 +200,7 @@ FuInsertGraphic::FuInsertGraphic(SdViewShell* pViewSh, SdWindow* pWin, SdView* p
if ( nError == 0 && pViewSh->ISA(SdDrawViewShell) )
{
- DropAction eAction = DROP_COPY; // Objekt einfuegen
+ sal_Int8 nAction = DND_ACTION_COPY;
SdrGrafObj* pEmptyGrafObj = NULL;
if ( pView->HasMarkedObj() )
@@ -218,7 +218,7 @@ FuInsertGraphic::FuInsertGraphic(SdViewShell* pViewSh, SdWindow* pWin, SdView* p
if (pObj->GetObjInventor() == SdrInventor &&
pObj->GetObjIdentifier() == OBJ_GRAF)
{
- eAction = DROP_LINK; // Attribute austauschen
+ nAction = DND_ACTION_LINK;
pEmptyGrafObj = (SdrGrafObj*) pObj;
}
}
@@ -228,8 +228,7 @@ FuInsertGraphic::FuInsertGraphic(SdViewShell* pViewSh, SdWindow* pWin, SdView* p
Rectangle aRect(aPos, pWindow->GetOutputSizePixel() );
aPos = aRect.Center();
aPos = pWindow->PixelToLogic(aPos);
- SdrGrafObj* pGrafObj = pView->InsertGraphic(aGraphic, eAction, aPos,
- pEmptyGrafObj, NULL);
+ SdrGrafObj* pGrafObj = pView->InsertGraphic(aGraphic, nAction, aPos, pEmptyGrafObj, NULL);
if (pGrafObj && pDlg->AsLink())
{
@@ -299,11 +298,11 @@ FuInsertClipboard::FuInsertClipboard(SdViewShell* pViewSh, SdWindow* pWin, SdVie
if( aDataHelper.GetTransferable().is() )
{
- DropAction eAction = DROP_COPY;
+ sal_Int8 nAction = DND_ACTION_COPY;
pView->InsertData( aDataHelper.GetTransferable(),
pWindow->PixelToLogic( Rectangle( Point(), pWindow->GetOutputSizePixel() ).Center() ),
- eAction, FALSE, nFormatId );
+ nAction, FALSE, nFormatId );
}
}
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 8e2ddb0e87da..ab4799ff6ce0 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fumorph.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $
+ * last change: $Author: ka $ $Date: 2001-03-08 11:08:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -157,9 +157,9 @@ FuMorph::FuMorph(SdViewShell* pViewSh, SdWindow* pWin, SdView* pView,
aPolyPoly2.FlipDirections();
// force same point counts
- for(sal_uInt32 a(0L); a < aPolyPoly1.Count(); a++)
+ for( USHORT a = 0; a < aPolyPoly1.Count(); a++ )
{
- if(aPolyPoly1[a].GetPointCount() < aPolyPoly2[a].GetPointCount())
+ if(aPolyPoly1[ a].GetPointCount() < aPolyPoly2[ a].GetPointCount())
ImpEqualizePolyPointCount(aPolyPoly1[a], aPolyPoly2[a]);
else if(aPolyPoly2[a].GetPointCount() < aPolyPoly1[a].GetPointCount())
ImpEqualizePolyPointCount(aPolyPoly2[a], aPolyPoly1[a]);
diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx
index 27cfcc3a06b9..12d0da1b6109 100644
--- a/sd/source/ui/func/fuzoom.cxx
+++ b/sd/source/ui/func/fuzoom.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fuzoom.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ka $ $Date: 2000-09-21 16:11:55 $
+ * last change: $Author: ka $ $Date: 2001-03-08 11:09:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -259,7 +259,7 @@ BOOL FuZoom::MouseButtonUp(const MouseEvent& rMEvt)
Size aZoomSizePixel = pWindow->LogicToPixel(aZoomRect).GetSize();
ULONG nTol = DRGPIX + DRGPIX;
- if ( aZoomSizePixel.Width() < nTol && aZoomSizePixel.Height() < nTol )
+ if ( aZoomSizePixel.Width() < (long) nTol && aZoomSizePixel.Height() < (long) nTol )
{
// Klick auf der Stelle: Zoomfaktor verdoppeln
Point aPos = pWindow->PixelToLogic(aPosPix);