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
3df221c8
Kaydet (Commit)
3df221c8
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
1d2cb239
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
113 deletions
+150
-113
sdxfer.cxx
sd/source/ui/app/sdxfer.cxx
+78
-45
bmcache.hxx
sd/source/ui/inc/bmcache.hxx
+12
-14
fudraw.hxx
sd/source/ui/inc/fudraw.hxx
+2
-3
fuslsel.hxx
sd/source/ui/inc/fuslsel.hxx
+41
-42
sdxfer.hxx
sd/source/ui/inc/sdxfer.hxx
+17
-9
No files found.
sd/source/ui/app/sdxfer.cxx
Dosyayı görüntüle @
3df221c8
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: sdxfer.cxx,v $
*
* $Revision: 1.1
7
$
* $Revision: 1.1
8
$
*
* last change: $Author: ka $ $Date: 2001-09-
13 11:04:32
$
* last change: $Author: ka $ $Date: 2001-09-
24 13:17:13
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -167,6 +167,7 @@ using namespace ::com::sun::star::datatransfer::clipboard;
SdTransferable
::
SdTransferable
(
SdDrawDocument
*
pSrcDoc
,
SdView
*
pWorkView
,
BOOL
bInitOnGetData
)
:
pObjDesc
(
NULL
),
pPageDocShell
(
NULL
),
pSourceDoc
(
pSrcDoc
),
pSdViewIntern
(
pWorkView
),
pSdView
(
pWorkView
),
...
...
@@ -180,7 +181,9 @@ SdTransferable::SdTransferable( SdDrawDocument* pSrcDoc, SdView* pWorkView, BOOL
pBookmark
(
NULL
),
pGraphic
(
NULL
),
pImageMap
(
NULL
),
bLateInit
(
bInitOnGetData
)
bLateInit
(
bInitOnGetData
),
bPageTransferable
(
FALSE
),
bPageTransferablePersistent
(
FALSE
)
{
if
(
!
bLateInit
)
CreateData
();
...
...
@@ -194,6 +197,9 @@ SdTransferable::~SdTransferable()
ObjectReleased
();
for
(
void
*
p
=
aPageBookmarks
.
First
();
p
;
p
=
aPageBookmarks
.
Next
()
)
delete
static_cast
<
String
*
>
(
p
);
if
(
bOwnView
)
delete
pSdViewIntern
;
...
...
@@ -389,48 +395,51 @@ void SdTransferable::CreateData()
void
SdTransferable
::
AddSupportedFormats
()
{
if
(
pOLEDataHelper
)
if
(
!
bPageTransferable
||
bPageTransferablePersistent
)
{
AddFormat
(
SOT_FORMATSTR_ID_EMBED_SOURCE
);
AddFormat
(
SOT_FORMATSTR_ID_OBJECTDESCRIPTOR
);
if
(
pOLEDataHelper
)
{
AddFormat
(
SOT_FORMATSTR_ID_EMBED_SOURCE
);
AddFormat
(
SOT_FORMATSTR_ID_OBJECTDESCRIPTOR
);
DataFlavorExVector
aVector
(
pOLEDataHelper
->
GetDataFlavorExVector
()
);
DataFlavorExVector
::
iterator
aIter
(
aVector
.
begin
()
),
aEnd
(
aVector
.
end
()
);
DataFlavorExVector
aVector
(
pOLEDataHelper
->
GetDataFlavorExVector
()
);
DataFlavorExVector
::
iterator
aIter
(
aVector
.
begin
()
),
aEnd
(
aVector
.
end
()
);
while
(
aIter
!=
aEnd
)
AddFormat
(
*
aIter
++
);
}
else
if
(
pGraphic
)
{
AddFormat
(
SOT_FORMATSTR_ID_SVXB
);
while
(
aIter
!=
aEnd
)
AddFormat
(
*
aIter
++
);
}
else
if
(
pGraphic
)
{
AddFormat
(
SOT_FORMATSTR_ID_SVXB
);
if
(
pGraphic
->
GetType
()
==
GRAPHIC_BITMAP
)
if
(
pGraphic
->
GetType
()
==
GRAPHIC_BITMAP
)
{
AddFormat
(
SOT_FORMAT_BITMAP
);
AddFormat
(
SOT_FORMAT_GDIMETAFILE
);
}
else
{
AddFormat
(
SOT_FORMAT_GDIMETAFILE
);
AddFormat
(
SOT_FORMAT_BITMAP
);
}
}
else
if
(
pBookmark
)
{
AddFormat
(
SOT_FORMAT
_BITMAP
);
AddFormat
(
SOT_FORMAT_GDIMETAFILE
);
AddFormat
(
SOT_FORMAT
STR_ID_NETSCAPE_BOOKMARK
);
AddFormat
(
FORMAT_STRING
);
}
else
{
AddFormat
(
SOT_FORMATSTR_ID_EMBED_SOURCE
);
AddFormat
(
SOT_FORMATSTR_ID_OBJECTDESCRIPTOR
);
AddFormat
(
SOT_FORMATSTR_ID_DRAWING
);
AddFormat
(
SOT_FORMAT_GDIMETAFILE
);
AddFormat
(
SOT_FORMAT_BITMAP
);
}
}
else
if
(
pBookmark
)
{
AddFormat
(
SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK
);
AddFormat
(
FORMAT_STRING
);
}
else
{
AddFormat
(
SOT_FORMATSTR_ID_EMBED_SOURCE
);
AddFormat
(
SOT_FORMATSTR_ID_OBJECTDESCRIPTOR
);
AddFormat
(
SOT_FORMATSTR_ID_DRAWING
);
AddFormat
(
SOT_FORMAT_GDIMETAFILE
);
AddFormat
(
SOT_FORMAT_BITMAP
);
}
if
(
pImageMap
)
AddFormat
(
SOT_FORMATSTR_ID_SVIM
);
if
(
pImageMap
)
AddFormat
(
SOT_FORMATSTR_ID_SVIM
);
}
}
// -----------------------------------------------------------------------------
...
...
@@ -617,22 +626,46 @@ void SdTransferable::SetObjectDescriptor( const TransferableObjectDescriptor& rO
// -----------------------------------------------------------------------------
void
SdTransferable
::
ResetPageView
(
)
void
SdTransferable
::
SetPageBookmarks
(
const
List
&
rPageBookmarks
,
BOOL
bPersistent
)
{
if
(
pSdViewIntern
)
pSdViewIntern
->
HideAllPages
();
}
if
(
pSourceDoc
)
{
if
(
pSdViewIntern
)
pSdViewIntern
->
HideAllPages
();
// -----------------------------------------------------------------------------
pSdDrawDocument
->
Clear
();
pPageDocShell
=
NULL
;
void
SdTransferable
::
UpdatePageView
()
{
if
(
pSdViewIntern
&&
pSdDrawDocument
)
{
SdPage
*
pPage
=
pSdDrawDocument
->
GetSdPage
(
0
,
PK_STANDARD
);
for
(
void
*
p
=
aPageBookmarks
.
First
();
p
;
p
=
aPageBookmarks
.
Next
()
)
delete
static_cast
<
String
*
>
(
p
);
if
(
bPersistent
)
{
pSdDrawDocument
->
CreateFirstPages
();
pSdDrawDocument
->
InsertBookmarkAsPage
(
const_cast
<
List
*
>
(
&
rPageBookmarks
),
NULL
,
FALSE
,
TRUE
,
1
,
TRUE
,
pSourceDoc
->
GetDocSh
(),
TRUE
,
TRUE
);
}
else
{
pPageDocShell
=
pSourceDoc
->
GetDocSh
();
for
(
ULONG
i
=
0
;
i
<
rPageBookmarks
.
Count
();
i
++
)
aPageBookmarks
.
Insert
(
new
String
(
*
static_cast
<
String
*
>
(
rPageBookmarks
.
GetObject
(
i
)
)
),
LIST_APPEND
);
}
if
(
pSdViewIntern
&&
pSdDrawDocument
)
{
SdPage
*
pPage
=
pSdDrawDocument
->
GetSdPage
(
0
,
PK_STANDARD
);
if
(
pPage
)
{
(
(
SdrMarkView
*
)
pSdViewIntern
)
->
MarkAll
(
(
SdrPageView
*
)
pSdViewIntern
->
ShowPage
(
pPage
,
Point
()
)
);
}
}
if
(
pPage
)
(
(
SdrMarkView
*
)
pSdViewIntern
)
->
MarkAll
(
(
SdrPageView
*
)
pSdViewIntern
->
ShowPage
(
pPage
,
Point
()
)
);
// set flags for page transferable; if ( bPageTransferablePersistent == FALSE ),
// don't offer any formats => it's just for internal puposes
bPageTransferable
=
TRUE
;
bPageTransferablePersistent
=
bPersistent
;
}
}
...
...
sd/source/ui/inc/bmcache.hxx
Dosyayı görüntüle @
3df221c8
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: bmcache.hxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author:
hr $ $Date: 2000-09-18 16:48:37
$
* last change: $Author:
ka $ $Date: 2001-09-24 13:18:14
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -68,24 +68,22 @@
class
SdPage
;
class
Bitmap
;
class
GraphicObject
;
class
BitmapCache
{
ULONG
nMaxSize
;
ULONG
nCurSize
;
List
aEntries
;
ULONG
nMaxSize
;
ULONG
nCurSize
;
List
aEntries
;
public
:
BitmapCache
(
ULONG
nMaxSizeKB
)
:
nMaxSize
(
nMaxSizeKB
),
nCurSize
(
0
)
{}
virtual
~
BitmapCache
();
BitmapCache
(
ULONG
nMaxSizeKB
)
:
nMaxSize
(
nMaxSizeKB
),
nCurSize
(
0
)
{}
virtual
~
BitmapCache
();
void
Add
(
const
SdPage
*
pPage
,
Bitmap
*
pBitmap
,
long
nZoomPercent
);
const
Bitmap
*
Get
(
const
SdPage
*
pPage
,
long
&
rZoomPercent
,
long
nZoomTolerancePercent
);
void
Remove
(
const
SdPage
*
pPage
);
void
Add
(
const
SdPage
*
pPage
,
const
Bitmap
&
rBmp
,
long
nZoomPercent
);
const
GraphicObject
*
Get
(
const
SdPage
*
pPage
,
long
&
rZoomPercent
,
long
nZoomTolerancePercent
);
void
Remove
(
const
SdPage
*
pPage
);
};
#endif // _SD_BMCACHE_HXX
...
...
sd/source/ui/inc/fudraw.hxx
Dosyayı görüntüle @
3df221c8
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: fudraw.hxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author:
hr $ $Date: 2000-09-18 16:48:38
$
* last change: $Author:
ka $ $Date: 2001-09-24 13:20:01
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -101,7 +101,6 @@ class FuDraw : public FuPoor
virtual
BOOL
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
BOOL
MouseButtonUp
(
const
MouseEvent
&
rMEvt
);
virtual
BOOL
MouseButtonDown
(
const
MouseEvent
&
rMEvt
);
virtual
BOOL
Command
(
const
CommandEvent
&
rCEvt
);
virtual
BOOL
RequestHelp
(
const
HelpEvent
&
rHEvt
);
virtual
void
ScrollStart
();
...
...
sd/source/ui/inc/fuslsel.hxx
Dosyayı görüntüle @
3df221c8
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: fuslsel.hxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author:
hr $ $Date: 2000-09-18 16:48:39
$
* last change: $Author:
ka $ $Date: 2001-09-24 13:20:01
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -80,58 +80,57 @@ struct FSS_IsShowingEffectInfo
class
FuSlideSelection
:
public
FuSlide
{
BOOL
bSubstShown
;
BOOL
bPageHit
;
List
aSubstList
;
// Liste mit Ertsatzdarstellungen
Point
aDragPos
;
// hier wird die Seite angefasst
BOOL
bDragSelection
;
Point
aDragSelRectAnchor
;
// fester Punkt des Selektionsrechtecks
Rectangle
aDragSelRect
;
Point
aPosOfInsertMarker
;
Sound
*
pSound
;
private
:
BOOL
bSubstShown
;
BOOL
bPageHit
;
List
aSubstList
;
// Liste mit Ertsatzdarstellungen
Point
aDragPos
;
// hier wird die Seite angefasst
BOOL
bDragSelection
;
Point
aDragSelRectAnchor
;
// fester Punkt des Selektionsrechtecks
Rectangle
aDragSelRect
;
Point
aPosOfInsertMarker
;
Sound
*
pSound
;
FSS_IsShowingEffectInfo
*
pIsShowingEffectInfo
;
void
DrawInsertMarker
(
BOOL
bShow
);
Point
CalcPosOfInsertMarker
(
const
Point
&
rPoint
);
void
DrawInsertMarker
(
BOOL
bShow
);
Point
CalcPosOfInsertMarker
(
const
Point
&
rPoint
);
USHORT
GetTargetPage
(
const
Point
&
rPoint
)
const
;
BOOL
MovePages
(
USHORT
nTargetPage
)
const
;
USHORT
GetTargetPage
(
const
Point
&
rPoint
)
const
;
BOOL
MovePages
(
USHORT
nTargetPage
)
const
;
void
CreateSubst
();
void
DeleteSubst
();
void
DrawSubst
()
const
;
void
ChangeSubstPos
(
const
Point
&
rVector
);
void
CreateSubst
();
void
DeleteSubst
();
void
DrawSubst
()
const
;
void
ChangeSubstPos
(
const
Point
&
rVector
);
void
DrawDragSelectionRect
()
const
;
void
ShowEffect
(
USHORT
nPageNo
);
void
DrawDragSelectionRect
()
const
;
DECL_LINK
(
DragSlideHdl
,
Timer
*
)
;
void
ShowEffect
(
USHORT
nPageNo
);
public
:
public
:
TYPEINFO
();
TYPEINFO
();
FuSlideSelection
(
SdSlideViewShell
*
pViewSh
,
SdWindow
*
pWin
,
SdSlideView
*
pView
,
SdDrawDocument
*
pDoc
,
SfxRequest
&
rReq
);
FuSlideSelection
(
SdSlideViewShell
*
pViewSh
,
SdWindow
*
pWin
,
SdSlideView
*
pView
,
SdDrawDocument
*
pDoc
,
SfxRequest
&
rReq
);
virtual
~
FuSlideSelection
();
// Mouse- & Key-Events
virtual
BOOL
KeyInput
(
const
KeyEvent
&
rKEvt
);
virtual
BOOL
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
BOOL
MouseButtonUp
(
const
MouseEvent
&
rMEvt
);
virtual
BOOL
MouseButtonDown
(
const
MouseEvent
&
rMEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
,
SdWindow
*
pWin
);
virtual
~
FuSlideSelection
();
// Mouse- & Key-Events
virtual
BOOL
KeyInput
(
const
KeyEvent
&
rKEvt
);
virtual
BOOL
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
BOOL
MouseButtonUp
(
const
MouseEvent
&
rMEvt
);
virtual
BOOL
MouseButtonDown
(
const
MouseEvent
&
rMEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
,
SdWindow
*
pWin
);
virtual
void
Activate
();
// Function aktivieren
virtual
void
Deactivate
();
// Function deaktivieren
virtual
void
Activate
();
// Function aktivieren
virtual
void
Deactivate
();
// Function deaktivieren
virtual
void
ScrollStart
();
virtual
void
ScrollEnd
();
virtual
void
ScrollStart
();
virtual
void
ScrollEnd
();
BOOL
IsShowingEffect
()
const
{
return
pIsShowingEffectInfo
&&
pIsShowingEffectInfo
->
bIsShowingEffect
;
}
BOOL
IsShowingEffect
()
const
{
return
pIsShowingEffectInfo
&&
pIsShowingEffectInfo
->
bIsShowingEffect
;
}
};
...
...
sd/source/ui/inc/sdxfer.hxx
Dosyayı görüntüle @
3df221c8
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: sdxfer.hxx,v $
*
* $Revision: 1.
8
$
* $Revision: 1.
9
$
*
* last change: $Author: ka $ $Date: 2001-0
8-29 12:22:35
$
* last change: $Author: ka $ $Date: 2001-0
9-24 13:15:58
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -81,12 +81,15 @@ class SdDrawDocument;
class
INetBookmark
;
class
ImageMap
;
class
VirtualDevice
;
class
SdDrawDocShell
;
class
SdTransferable
:
public
TransferableHelper
{
private
:
SvEmbeddedObjectRef
aDocShellRef
;
SdDrawDocShell
*
pPageDocShell
;
List
aPageBookmarks
;
TransferableDataHelper
*
pOLEDataHelper
;
TransferableObjectDescriptor
*
pObjDesc
;
const
SdView
*
pSdView
;
...
...
@@ -100,10 +103,12 @@ private:
ImageMap
*
pImageMap
;
Rectangle
aVisArea
;
Point
aStartPos
;
BOOL
bInternalMove
:
1
;
BOOL
bOwnDocument
:
1
;
BOOL
bOwnView
:
1
;
BOOL
bLateInit
:
1
;
BOOL
bInternalMove
:
1
;
BOOL
bOwnDocument
:
1
;
BOOL
bOwnView
:
1
;
BOOL
bLateInit
:
1
;
BOOL
bPageTransferable
:
1
;
BOOL
bPageTransferablePersistent
:
1
;
// not available
SdTransferable
();
...
...
@@ -137,9 +142,6 @@ public:
void
SetObjectDescriptor
(
const
TransferableObjectDescriptor
&
rObjDesc
);
void
ResetPageView
();
void
UpdatePageView
();
void
SetStartPos
(
const
Point
&
rStartPos
)
{
aStartPos
=
rStartPos
;
}
const
Point
&
GetStartPos
()
const
{
return
aStartPos
;
}
...
...
@@ -148,6 +150,12 @@ public:
BOOL
HasSourceDoc
(
const
SdDrawDocument
*
pDoc
)
const
{
return
(
pSourceDoc
==
pDoc
);
}
void
SetPageBookmarks
(
const
List
&
rPageBookmarks
,
BOOL
bPersistent
);
BOOL
IsPageTransferable
()
const
{
return
bPageTransferable
;
}
BOOL
HasPageBookmarks
()
const
{
return
(
pPageDocShell
&&
(
aPageBookmarks
.
Count
()
>
0
)
);
}
const
List
&
GetPageBookmarks
()
const
{
return
aPageBookmarks
;
}
SdDrawDocShell
*
GetPageDocShell
()
const
{
return
pPageDocShell
;
}
public
:
static
SdTransferable
*
getImplementation
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>&
rxData
)
throw
();
...
...
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