Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
82453a8c
Kaydet (Commit)
82453a8c
authored
Eyl 24, 2001
tarafından
Kai Ahrens
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#80266#: added D&D functionality for slide view
üst
3df221c8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
217 deletions
+144
-217
fudraw.cxx
sd/source/ui/func/fudraw.cxx
+2
-51
fupoor.cxx
sd/source/ui/func/fupoor.cxx
+3
-4
bmcache.cxx
sd/source/ui/view/bmcache.cxx
+64
-73
sdview2.cxx
sd/source/ui/view/sdview2.cxx
+38
-85
sdview3.cxx
sd/source/ui/view/sdview3.cxx
+37
-4
No files found.
sd/source/ui/func/fudraw.cxx
Dosyayı görüntüle @
82453a8c
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: fudraw.cxx,v $
* $RCSfile: fudraw.cxx,v $
*
*
* $Revision: 1.
5
$
* $Revision: 1.
6
$
*
*
* last change: $Author:
dl $ $Date: 2001-07-17 06:51:5
2 $
* last change: $Author:
ka $ $Date: 2001-09-24 13:41:2
2 $
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -979,55 +979,6 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
...
@@ -979,55 +979,6 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
pViewShell
->
GetViewFrame
()
->
GetDispatcher
()
->
Execute
(
SID_OBJECT_SELECT
,
SFX_CALLMODE_ASYNCHRON
|
SFX_CALLMODE_RECORD
);
pViewShell
->
GetViewFrame
()
->
GetDispatcher
()
->
Execute
(
SID_OBJECT_SELECT
,
SFX_CALLMODE_ASYNCHRON
|
SFX_CALLMODE_RECORD
);
}
}
/*************************************************************************
|*
|* Command-event
|*
\************************************************************************/
BOOL
FuDraw
::
Command
(
const
CommandEvent
&
rCEvt
)
{
BOOL
bReturn
=
FALSE
;
if
(
rCEvt
.
GetCommand
()
==
COMMAND_STARTDRAG
)
{
USHORT
nHitLog
=
USHORT
(
pWindow
->
PixelToLogic
(
Size
(
HITPIX
,
0
)).
Width
()
);
// MouseButtonDown will not called
aMDPos
=
pWindow
->
PixelToLogic
(
rCEvt
.
GetMousePosPixel
()
);
if
(
pView
->
IsMarkedHit
(
aMDPos
,
nHitLog
)
&&
!
bIsInDragMode
)
{
// hit handle or marked object
if
(
!
pView
->
IsAction
()
)
{
SdrHdl
*
pHdl
=
pView
->
HitHandle
(
aMDPos
,
*
pWindow
);
USHORT
nDrgLog
=
USHORT
(
pWindow
->
PixelToLogic
(
Size
(
DRGPIX
,
0
)).
Width
()
);
pView
->
BegDragObj
(
aMDPos
,
(
OutputDevice
*
)
NULL
,
pHdl
,
nDrgLog
);
if
(
!
pHdl
&&
!
pView
->
IsPresObjSelected
(
FALSE
,
TRUE
)
)
{
pWindow
->
ReleaseMouse
();
bIsInDragMode
=
TRUE
;
pView
->
BeginDrag
(
pWindow
,
aMDPos
);
bIsInDragMode
=
FALSE
;
}
}
bReturn
=
TRUE
;
}
}
if
(
!
bReturn
)
{
bReturn
=
FuPoor
::
Command
(
rCEvt
);
}
return
bReturn
;
}
/*************************************************************************
/*************************************************************************
|*
|*
|* Help-event
|* Help-event
...
...
sd/source/ui/func/fupoor.cxx
Dosyayı görüntüle @
82453a8c
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: fupoor.cxx,v $
* $RCSfile: fupoor.cxx,v $
*
*
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
*
* last change: $Author: ka $ $Date: 2001-0
1-11 16:19:17
$
* last change: $Author: ka $ $Date: 2001-0
9-24 13:41:22
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -585,8 +585,7 @@ IMPL_LINK( FuPoor, DragHdl, Timer *, pTimer )
...
@@ -585,8 +585,7 @@ IMPL_LINK( FuPoor, DragHdl, Timer *, pTimer )
{
{
pWindow
->
ReleaseMouse
();
pWindow
->
ReleaseMouse
();
bIsInDragMode
=
TRUE
;
bIsInDragMode
=
TRUE
;
pView
->
StartDrag
(
aMDPos
,
pWindow
);
pView
->
BeginDrag
(
pWindow
,
aMDPos
);
}
}
return
0
;
return
0
;
}
}
...
...
sd/source/ui/view/bmcache.cxx
Dosyayı görüntüle @
82453a8c
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: bmcache.cxx,v $
* $RCSfile: bmcache.cxx,v $
*
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
*
* last change: $Author:
hr $ $Date: 2000-09-18 16:48:43
$
* last change: $Author:
ka $ $Date: 2001-09-24 13:38:09
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -61,24 +61,19 @@
...
@@ -61,24 +61,19 @@
#pragma hdrstop
#pragma hdrstop
#include <limits.h> // LONG_MAX
#include <limits.h> // LONG_MAX
#ifndef _SOLAR_H
#include <tools/solar.h>
#include <tools/solar.h>
#endif
#include <goodies/grfmgr.hxx>
#ifndef _SV_BITMAP_HXX
#include <vcl/bitmap.hxx>
#endif
#include "bmcache.hxx"
#include "bmcache.hxx"
// eine Struktur fuer die Cache-Eintraege
// eine Struktur fuer die Cache-Eintraege
typedef
struct
struct
BitmapCacheEntry
{
{
const
SdPage
*
pPage
;
const
SdPage
*
pPage
;
Bitmap
*
pBitmap
;
GraphicObject
*
pGraphicObject
;
long
nZoom
;
sal_uInt32
nSizeBytes
;
}
BitmapCacheEntry
;
long
nZoom
;
};
/*************************************************************************
/*************************************************************************
|*
|*
...
@@ -88,12 +83,10 @@ typedef struct
...
@@ -88,12 +83,10 @@ typedef struct
BitmapCache
::~
BitmapCache
()
BitmapCache
::~
BitmapCache
()
{
{
BitmapCacheEntry
*
pEntry
=
NULL
;
for
(
void
*
pEntry
=
aEntries
.
First
();
pEntry
;
pEntry
=
aEntries
.
Next
()
)
while
(
aEntries
.
Count
()
>
0
)
{
{
pEntry
=
(
BitmapCacheEntry
*
)
aEntries
.
Remove
((
ULONG
)
0
);
delete
static_cast
<
BitmapCacheEntry
*
>
(
pEntry
)
->
pGraphicObject
;
delete
pEntry
->
pBitmap
;
delete
static_cast
<
BitmapCacheEntry
*
>
(
pEntry
);
delete
pEntry
;
}
}
}
}
...
@@ -103,36 +96,38 @@ BitmapCache::~BitmapCache()
...
@@ -103,36 +96,38 @@ BitmapCache::~BitmapCache()
|*
|*
\************************************************************************/
\************************************************************************/
void
BitmapCache
::
Add
(
const
SdPage
*
pPage
,
Bitmap
*
pBitma
p
,
long
nZoom
)
void
BitmapCache
::
Add
(
const
SdPage
*
pPage
,
const
Bitmap
&
rBm
p
,
long
nZoom
)
{
{
BitmapCacheEntry
*
pEntry
=
NULL
;
BitmapCacheEntry
*
pEntry
=
NULL
;
ULONG
nSizeOfBitmap
=
rBmp
.
GetSizeBytes
();
ULONG
nSizeOfBitmap
=
pBitmap
->
GetSizeBytes
();
if
(
nSizeOfBitmap
<
nMaxSize
)
if
(
nSizeOfBitmap
<
nMaxSize
)
{
{
while
(
nCurSize
+
nSizeOfBitmap
>
nMaxSize
)
while
(
nCurSize
+
nSizeOfBitmap
>
nMaxSize
)
{
if
(
aEntries
.
Count
()
)
{
{
if
(
aEntries
.
Count
()
)
pEntry
=
(
BitmapCacheEntry
*
)
aEntries
.
Remove
(
aEntries
.
Count
()
-
1
);
if
(
pEntry
&&
pEntry
->
pGraphicObject
)
{
{
pEntry
=
(
BitmapCacheEntry
*
)
aEntries
.
Remove
(
aEntries
.
Count
()
-
1
);
nCurSize
-=
pEntry
->
nSizeBytes
;
if
(
pEntry
&&
pEntry
->
pBitmap
!=
NULL
)
delete
pEntry
->
pGraphicObject
;
{
nCurSize
-=
pEntry
->
pBitmap
->
GetSizeBytes
();
delete
pEntry
->
pBitmap
;
}
delete
pEntry
;
}
}
else
break
;
delete
pEntry
;
}
}
else
break
;
}
pEntry
=
new
BitmapCacheEntry
;
pEntry
=
new
BitmapCacheEntry
;
pEntry
->
pPage
=
pPage
;
pEntry
->
pPage
=
pPage
;
pEntry
->
pBitmap
=
pBitmap
;
pEntry
->
pGraphicObject
=
new
GraphicObject
(
rBmp
);
pEntry
->
nZoom
=
nZoom
;
pEntry
->
nSizeBytes
=
nSizeOfBitmap
;
pEntry
->
nZoom
=
nZoom
;
aEntries
.
Insert
(
pEntry
,
(
ULONG
)
0
);
aEntries
.
Insert
(
pEntry
,
(
ULONG
)
0
);
nCurSize
+=
nSizeOfBitmap
;
nCurSize
+=
nSizeOfBitmap
;
}
}
}
}
...
@@ -150,74 +145,70 @@ void BitmapCache::Add(const SdPage* pPage, Bitmap* pBitmap, long nZoom)
...
@@ -150,74 +145,70 @@ void BitmapCache::Add(const SdPage* pPage, Bitmap* pBitmap, long nZoom)
|*
|*
\************************************************************************/
\************************************************************************/
const
Bitmap
*
BitmapCache
::
Get
(
const
SdPage
*
pPage
,
long
&
rZoomPercent
,
const
GraphicObject
*
BitmapCache
::
Get
(
const
SdPage
*
pPage
,
long
&
rZoomPercent
,
long
nZoomTolerancePercent
)
long
nZoomTolerancePercent
)
{
{
BitmapCacheEntry
*
pEntry
=
NULL
;
BitmapCacheEntry
*
pEntry
=
NULL
;
Bitmap
*
pBitmap
=
NULL
;
GraphicObject
*
pGraphicObject
=
NULL
;
// "best fit"-Suche
if
(
nZoomTolerancePercent
<
0
)
if
(
nZoomTolerancePercent
<
0
)
{
{
// "best fit"-Suche
long
nTolerance
=
-
nZoomTolerancePercent
;
long
nTolerance
=
-
nZoomTolerancePercent
;
BitmapCacheEntry
*
pBest
=
NULL
;
BitmapCacheEntry
*
pBest
=
NULL
;
long
nBest
=
LONG_MAX
;
long
nBest
=
LONG_MAX
;
long
nTest
=
0L
;
long
nTest
=
0L
;
for
(
ULONG
nPos
=
0
;
nPos
<
aEntries
.
Count
();
nPos
++
)
for
(
ULONG
nPos
=
0
;
nPos
<
aEntries
.
Count
();
nPos
++
)
{
{
pEntry
=
(
BitmapCacheEntry
*
)
aEntries
.
GetObject
(
nPos
);
pEntry
=
(
BitmapCacheEntry
*
)
aEntries
.
GetObject
(
nPos
);
if
(
pEntry
->
pPage
==
pPage
)
if
(
pEntry
->
pPage
==
pPage
)
{
{
nTest
=
rZoomPercent
-
pEntry
->
nZoom
;
nTest
=
rZoomPercent
-
pEntry
->
nZoom
;
if
(
nTest
>=
0
&&
nTest
<
nBest
&&
nTest
<=
nTolerance
)
{
if
(
nTest
>=
0
&&
nTest
<
nBest
&&
nTest
<=
nTolerance
)
pBest
=
pEntry
;
pBest
=
pEntry
;
}
}
}
}
}
pEntry
=
pBest
;
pEntry
=
pBest
;
}
}
// "first fit"-suche
else
else
{
{
for
(
ULONG
nPos
=
0
;
nPos
<
aEntries
.
Count
();
nPos
++
)
// "first fit"-suche
for
(
ULONG
nPos
=
0
;
nPos
<
aEntries
.
Count
();
nPos
++
)
{
{
pEntry
=
(
BitmapCacheEntry
*
)
aEntries
.
GetObject
(
nPos
);
pEntry
=
(
BitmapCacheEntry
*
)
aEntries
.
GetObject
(
nPos
);
if
(
pEntry
->
pPage
==
pPage
&&
Abs
(
pEntry
->
nZoom
-
rZoomPercent
)
<=
nZoomTolerancePercent
)
if
(
pEntry
->
pPage
==
pPage
&&
Abs
(
pEntry
->
nZoom
-
rZoomPercent
)
<=
nZoomTolerancePercent
)
{
break
;
break
;
}
else
else
{
pEntry
=
NULL
;
pEntry
=
NULL
;
}
}
}
}
}
// was passendes gefunden?
// was passendes gefunden?
if
(
pEntry
)
if
(
pEntry
)
{
{
p
Bitmap
=
pEntry
->
pBitmap
;
p
GraphicObject
=
pEntry
->
pGraphicObject
;
aEntries
.
Remove
(
pEntry
);
aEntries
.
Remove
(
pEntry
);
aEntries
.
Insert
(
pEntry
,
(
ULONG
)
0
);
aEntries
.
Insert
(
pEntry
,
(
ULONG
)
0
);
rZoomPercent
=
pEntry
->
nZoom
;
rZoomPercent
=
pEntry
->
nZoom
;
}
}
return
pBitmap
;
return
pGraphicObject
;
}
}
void
BitmapCache
::
Remove
(
const
SdPage
*
pPage
)
void
BitmapCache
::
Remove
(
const
SdPage
*
pPage
)
{
{
for
(
ULONG
nPos
=
0
;
nPos
<
aEntries
.
Count
();
)
for
(
ULONG
nPos
=
0
;
nPos
<
aEntries
.
Count
();
)
{
{
BitmapCacheEntry
*
pCand
=
(
BitmapCacheEntry
*
)
aEntries
.
GetObject
(
nPos
);
BitmapCacheEntry
*
pCand
=
(
BitmapCacheEntry
*
)
aEntries
.
GetObject
(
nPos
);
if
(
pCand
->
pPage
==
pPage
)
if
(
pCand
->
pPage
==
pPage
)
{
{
pCand
=
(
BitmapCacheEntry
*
)
aEntries
.
Remove
((
ULONG
)
nPos
);
pCand
=
(
BitmapCacheEntry
*
)
aEntries
.
Remove
((
ULONG
)
nPos
);
delete
pCand
->
p
Bitmap
;
delete
pCand
->
p
GraphicObject
;
delete
pCand
;
delete
pCand
;
}
}
else
else
...
...
sd/source/ui/view/sdview2.cxx
Dosyayı görüntüle @
82453a8c
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: sdview2.cxx,v $
* $RCSfile: sdview2.cxx,v $
*
*
* $Revision: 1.2
1
$
* $Revision: 1.2
2
$
*
*
* last change: $Author: ka $ $Date: 2001-09-
13 11:06:40
$
* last change: $Author: ka $ $Date: 2001-09-
24 13:38:09
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -185,11 +185,14 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
...
@@ -185,11 +185,14 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
String
aDisplayName
;
String
aDisplayName
;
SdrOle2Obj
*
pSdrOleObj
=
NULL
;
SdrOle2Obj
*
pSdrOleObj
=
NULL
;
SdrPageView
*
pPgView
=
GetPageViewPvNum
(
0
);
SdrPageView
*
pPgView
=
GetPageViewPvNum
(
0
);
SdPage
*
p
Page
=
(
SdPage
*
)
pPgView
->
GetPage
()
;
SdPage
*
p
OldPage
=
pPgView
?
(
(
SdPage
*
)
pPgView
->
GetPage
()
)
:
NULL
;
SdPage
*
pNewPage
=
(
SdPage
*
)
pTransferable
->
GetWorkDocument
()
->
GetPage
(
0
);
SdPage
*
pNewPage
=
(
SdPage
*
)
pTransferable
->
GetWorkDocument
()
->
GetPage
(
0
);
pNewPage
->
SetSize
(
pPage
->
GetSize
()
);
if
(
pOldPage
)
pNewPage
->
SetLayoutName
(
pPage
->
GetLayoutName
()
);
{
pNewPage
->
SetSize
(
pOldPage
->
GetSize
()
);
pNewPage
->
SetLayoutName
(
pOldPage
->
GetLayoutName
()
);
}
if
(
aMark
.
GetMarkCount
()
==
1
)
if
(
aMark
.
GetMarkCount
()
==
1
)
{
{
...
@@ -383,85 +386,33 @@ void __EXPORT SdView::DoPaste( Window* pWindow )
...
@@ -383,85 +386,33 @@ void __EXPORT SdView::DoPaste( Window* pWindow )
}
}
else
else
{
{
Point
aPos
;
TransferableDataHelper
aDataHelper
(
TransferableDataHelper
::
CreateFromSystemClipboard
(
pViewSh
->
GetActiveWindow
()
)
);
BOOL
bPagesInserted
=
FALSE
;
SdTransferable
*
pTransferClip
=
SD_MOD
()
->
pTransferClip
;
if
(
pWindow
)
if
(
aDataHelper
.
GetTransferable
().
is
()
)
aPos
=
pWindow
->
PixelToLogic
(
Rectangle
(
aPos
,
pWindow
->
GetOutputSizePixel
()
).
Center
()
);
if
(
pTransferClip
&&
pTransferClip
->
GetDocShell
()
)
{
{
// Eigenes Format: Ganze Seiten einfuegen?
Point
aPos
;
SvEmbeddedObject
*
pObj
=
pTransferClip
->
GetDocShell
();
sal_Int8
nDnDAction
=
DND_ACTION_COPY
;
SdDrawDocShell
*
pDataDocSh
=
(
SdDrawDocShell
*
)
pObj
;
SdDrawDocument
*
pDataDoc
=
pDataDocSh
->
GetDoc
();
if
(
pDataDoc
&&
pDataDoc
->
GetSdPageCount
(
PK_STANDARD
)
>
1
)
{
// Dokument hat mehrere Seiten -> Seiten einfuegen
bPagesInserted
=
TRUE
;
USHORT
nInsertPgCnt
=
pDataDoc
->
GetSdPageCount
(
PK_STANDARD
);
USHORT
nInsertPos
=
pDoc
->
GetSdPageCount
(
PK_STANDARD
)
*
2
+
1
;
USHORT
nPgCnt
=
pDoc
->
GetSdPageCount
(
PK_STANDARD
);
BOOL
bMergeMasterPages
=
TRUE
;
for
(
USHORT
nPage
=
0
;
nPage
<
nPgCnt
;
nPage
++
)
{
SdPage
*
pPage
=
pDoc
->
GetSdPage
(
nPage
,
PK_STANDARD
);
if
(
pPage
->
IsSelected
()
)
nInsertPos
=
nPage
*
2
+
3
;
}
if
(
pTransferClip
->
HasSourceDoc
(
pDoc
)
)
bMergeMasterPages
=
FALSE
;
pDoc
->
InsertBookmarkAsPage
(
NULL
,
NULL
,
FALSE
,
FALSE
,
nInsertPos
,
FALSE
,
pDataDocSh
,
TRUE
,
bMergeMasterPages
);
if
(
this
->
ISA
(
SdSlideView
)
)
{
// Alle Seiten deselektieren
for
(
USHORT
nPage
=
0
,
nPgCnt
=
pDoc
->
GetSdPageCount
(
PK_STANDARD
);
nPage
<
nPgCnt
;
nPage
++
)
pDoc
->
GetSdPage
(
nPage
,
PK_STANDARD
)
->
SetSelected
(
FALSE
);
// Die letzte eingefuegte Seite selektieren
if
(
pWindow
)
SdPage
*
pPage
=
pDoc
->
GetSdPage
(
nInsertPos
/
2
+
nInsertPgCnt
-
1
,
PK_STANDARD
);
aPos
=
pWindow
->
PixelToLogic
(
Rectangle
(
aPos
,
pWindow
->
GetOutputSizePixel
()
).
Center
()
);
if
(
pPage
)
if
(
!
InsertData
(
aDataHelper
,
aPos
,
nDnDAction
,
FALSE
)
)
pPage
->
SetSelected
(
TRUE
);
}
}
}
if
(
!
bPagesInserted
&&
this
->
ISA
(
SdDrawView
)
)
{
TransferableDataHelper
aDataHelper
(
TransferableDataHelper
::
CreateFromSystemClipboard
(
pViewSh
->
GetActiveWindow
()
)
);
if
(
aDataHelper
.
GetTransferable
().
is
()
)
{
{
sal_Int8
nDnDAction
=
DND_ACTION_COPY
;
SdDrawViewShell
*
pDrViewSh
=
(
SdDrawViewShell
*
)
pDocSh
->
GetViewShell
()
;
if
(
!
InsertData
(
aDataHelper
,
aPos
,
nDnDAction
,
FALSE
)
)
if
(
pDrViewSh
)
{
{
SdDrawViewShell
*
pDrViewSh
=
(
SdDrawViewShell
*
)
pDocSh
->
GetViewShell
();
String
aEmptyStr
;
INetBookmark
aINetBookmark
(
aEmptyStr
,
aEmptyStr
);
if
(
pDrViewSh
)
if
(
(
aDataHelper
.
HasFormat
(
SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK
)
&&
aDataHelper
.
GetINetBookmark
(
SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK
,
aINetBookmark
)
)
||
(
aDataHelper
.
HasFormat
(
SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR
)
&&
aDataHelper
.
GetINetBookmark
(
SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR
,
aINetBookmark
)
)
||
(
aDataHelper
.
HasFormat
(
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR
)
&&
aDataHelper
.
GetINetBookmark
(
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR
,
aINetBookmark
)
)
)
{
{
String
aEmptyStr
;
pDrViewSh
->
InsertURLField
(
aINetBookmark
.
GetURL
(),
aINetBookmark
.
GetDescription
(),
aEmptyStr
,
NULL
);
INetBookmark
aINetBookmark
(
aEmptyStr
,
aEmptyStr
);
if
(
(
aDataHelper
.
HasFormat
(
SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK
)
&&
aDataHelper
.
GetINetBookmark
(
SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK
,
aINetBookmark
)
)
||
(
aDataHelper
.
HasFormat
(
SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR
)
&&
aDataHelper
.
GetINetBookmark
(
SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR
,
aINetBookmark
)
)
||
(
aDataHelper
.
HasFormat
(
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR
)
&&
aDataHelper
.
GetINetBookmark
(
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR
,
aINetBookmark
)
)
)
{
pDrViewSh
->
InsertURLField
(
aINetBookmark
.
GetURL
(),
aINetBookmark
.
GetDescription
(),
aEmptyStr
,
NULL
);
}
}
}
}
}
}
}
...
@@ -471,11 +422,9 @@ void __EXPORT SdView::DoPaste( Window* pWindow )
...
@@ -471,11 +422,9 @@ void __EXPORT SdView::DoPaste( Window* pWindow )
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
BOOL
SdView
::
BeginDrag
(
Window
*
pWindow
,
Point
aStartPos
)
void
SdView
::
StartDrag
(
const
Point
&
rStartPos
,
Window
*
pWindow
)
{
{
BOOL
bRet
=
HasMarkedObj
()
&&
IsAction
()
&&
pViewSh
&&
pWindow
;
if
(
HasMarkedObj
()
&&
IsAction
()
&&
pViewSh
&&
pWindow
)
if
(
bRet
)
{
{
BrkAction
();
BrkAction
();
...
@@ -499,10 +448,8 @@ BOOL SdView::BeginDrag(Window* pWindow, Point aStartPos)
...
@@ -499,10 +448,8 @@ BOOL SdView::BeginDrag(Window* pWindow, Point aStartPos)
aStr
+=
sal_Unicode
(
' '
);
aStr
+=
sal_Unicode
(
' '
);
aStr
+=
pDragSrcMarkList
->
GetMarkDescription
();
aStr
+=
pDragSrcMarkList
->
GetMarkDescription
();
BegUndo
(
aStr
);
BegUndo
(
aStr
);
CreateDragDataObject
(
this
,
*
pWindow
,
a
StartPos
);
CreateDragDataObject
(
this
,
*
pWindow
,
r
StartPos
);
}
}
return
bRet
;
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
@@ -600,9 +547,15 @@ sal_Int8 SdView::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTar
...
@@ -600,9 +547,15 @@ sal_Int8 SdView::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTar
if
(
pSourceView
)
if
(
pSourceView
)
{
{
if
(
!
(
nDropAction
&
DND_ACTION_LINK
)
||
pSourceView
->
GetDocSh
()
->
GetMedium
()
->
GetName
().
Len
()
)
if
(
!
(
nDropAction
&
DND_ACTION_LINK
)
||
pSourceView
->
GetDocSh
()
->
GetMedium
()
->
GetName
().
Len
()
||
pDragTransferable
->
IsPageTransferable
()
)
{
nRet
=
nDropAction
;
nRet
=
nDropAction
;
}
}
}
else
if
(
pDragTransferable
->
IsPageTransferable
()
)
nRet
=
nDropAction
;
}
}
else
else
{
{
...
...
sd/source/ui/view/sdview3.cxx
Dosyayı görüntüle @
82453a8c
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: sdview3.cxx,v $
* $RCSfile: sdview3.cxx,v $
*
*
* $Revision: 1.3
1
$
* $Revision: 1.3
2
$
*
*
* last change: $Author: ka $ $Date: 2001-09-
05 08:54:48
$
* last change: $Author: ka $ $Date: 2001-09-
24 13:38:09
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -248,10 +248,43 @@ BOOL SdView::InsertData( const TransferableDataHelper& rDataHelper,
...
@@ -248,10 +248,43 @@ BOOL SdView::InsertData( const TransferableDataHelper& rDataHelper,
if
(
pOwnData
&&
!
nFormat
)
if
(
pOwnData
&&
!
nFormat
)
{
{
// own data
const
SdView
*
pSourceView
=
pOwnData
->
GetView
();
const
SdView
*
pSourceView
=
pOwnData
->
GetView
();
if
(
pSourceView
)
if
(
pOwnData
->
GetDocShell
()
&&
pOwnData
->
IsPageTransferable
()
&&
ISA
(
SdView
)
)
{
USHORT
nInsertPgCnt
,
nInsertPos
=
pDoc
->
GetSdPageCount
(
PK_STANDARD
)
*
2
+
1
;
USHORT
nPgCnt
=
pDoc
->
GetSdPageCount
(
PK_STANDARD
);
BOOL
bMergeMasterPages
=
!
pOwnData
->
HasSourceDoc
(
pDoc
);
for
(
USHORT
nPage
=
0
;
nPage
<
nPgCnt
;
nPage
++
)
{
SdPage
*
pPage
=
pDoc
->
GetSdPage
(
nPage
,
PK_STANDARD
);
if
(
pPage
->
IsSelected
()
)
nInsertPos
=
nPage
*
2
+
3
;
}
if
(
pOwnData
->
HasPageBookmarks
()
)
{
const
List
&
rBookmarkList
=
pOwnData
->
GetPageBookmarks
();
nInsertPgCnt
=
(
USHORT
)
rBookmarkList
.
Count
();
pDoc
->
InsertBookmarkAsPage
(
const_cast
<
List
*
>
(
&
rBookmarkList
),
NULL
,
FALSE
,
FALSE
,
nInsertPos
,
TRUE
,
pOwnData
->
GetPageDocShell
(),
TRUE
,
bMergeMasterPages
);
}
else
{
SvEmbeddedObject
*
pObj
=
pOwnData
->
GetDocShell
();
SdDrawDocShell
*
pDataDocSh
=
(
SdDrawDocShell
*
)
pObj
;
SdDrawDocument
*
pDataDoc
=
pDataDocSh
->
GetDoc
();
if
(
pDataDoc
&&
pDataDoc
->
GetSdPageCount
(
PK_STANDARD
)
)
{
nInsertPgCnt
=
pDataDoc
->
GetSdPageCount
(
PK_STANDARD
);
pDoc
->
InsertBookmarkAsPage
(
NULL
,
NULL
,
FALSE
,
FALSE
,
nInsertPos
,
TRUE
,
pDataDocSh
,
TRUE
,
bMergeMasterPages
);
}
}
}
else
if
(
pSourceView
)
{
{
if
(
pSourceView
==
this
)
if
(
pSourceView
==
this
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment