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
f1d26564
Kaydet (Commit)
f1d26564
authored
Mar 08, 2001
tarafından
jp
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
change: old data transfer API to the new
üst
99559346
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
121 additions
and
273 deletions
+121
-273
linkmgr.hxx
svx/inc/linkmgr.hxx
+17
-15
svdograf.cxx
svx/source/svdraw/svdograf.cxx
+32
-70
svdogrp.cxx
svx/source/svdraw/svdogrp.cxx
+28
-18
svdoole2.cxx
svx/source/svdraw/svdoole2.cxx
+4
-139
svdotxln.cxx
svx/source/svdraw/svdotxln.cxx
+26
-17
fileobj.cxx
svx/source/svxlink/fileobj.cxx
+0
-0
fileobj.hxx
svx/source/svxlink/fileobj.hxx
+14
-14
linkmgr.cxx
svx/source/svxlink/linkmgr.cxx
+0
-0
No files found.
svx/inc/linkmgr.hxx
Dosyayı görüntüle @
f1d26564
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: linkmgr.hxx,v $
* $RCSfile: linkmgr.hxx,v $
*
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
*
* last change: $Author: jp $ $Date: 2001-0
1-19 09:41:21
$
* last change: $Author: jp $ $Date: 2001-0
3-08 21:14:34
$
*
*
* 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
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
#define _SVXLINKMGR_HXX
#define _SVXLINKMGR_HXX
#ifndef _LINKMGR_HXX
//autogen
#ifndef _LINKMGR_HXX
#include <so3/linkmgr.hxx>
#include <so3/linkmgr.hxx>
#endif
#endif
...
@@ -80,38 +80,38 @@ enum LinkState
...
@@ -80,38 +80,38 @@ enum LinkState
STATE_LOAD_ABORT
STATE_LOAD_ABORT
};
};
class
SvxLinkManager
:
public
SvLinkManager
class
SvxLinkManager
:
public
so3
::
SvLinkManager
{
{
SvxLinkManager
(
const
SvLinkManager
&
);
SvxLinkManager
(
const
Sv
x
LinkManager
&
);
SvxLinkManager
&
operator
=
(
const
SvLinkManager
&
);
SvxLinkManager
&
operator
=
(
const
Sv
x
LinkManager
&
);
public
:
public
:
SvxLinkManager
(
SvPersist
*
pCacheCont
);
SvxLinkManager
(
SvPersist
*
pCacheCont
);
// den Link mit einem PseudoObject verbinden und in die Liste eintragen
// den Link mit einem PseudoObject verbinden und in die Liste eintragen
BOOL
InsertFileLink
(
SvBaseLink
&
,
BOOL
InsertFileLink
(
so3
::
SvBaseLink
&
,
USHORT
nFileType
,
USHORT
nFileType
,
const
String
&
rTxt
,
const
String
&
rTxt
,
const
String
*
pFilterNm
=
0
,
const
String
*
pFilterNm
=
0
,
const
String
*
pRange
=
0
);
const
String
*
pRange
=
0
);
// falls am Link schon alles eingestellt ist !
// falls am Link schon alles eingestellt ist !
BOOL
InsertFileLink
(
SvBaseLink
&
);
BOOL
InsertFileLink
(
so3
::
SvBaseLink
&
);
// erfrage die Strings fuer den Dialog
// erfrage die Strings fuer den Dialog
virtual
BOOL
GetDisplayNames
(
const
SvBaseLink
&
,
virtual
BOOL
GetDisplayNames
(
const
so3
::
SvBaseLink
*
,
String
*
pType
,
String
*
pType
,
String
*
pFile
=
0
,
String
*
pFile
=
0
,
String
*
pLink
=
0
,
String
*
pLink
=
0
,
String
*
pFilter
=
0
)
const
;
String
*
pFilter
=
0
)
const
;
virtual
SvPseudoObjectRef
CreateObj
(
SvBaseLink
&
);
virtual
so3
::
SvLinkSourceRef
CreateObj
(
so3
::
SvBaseLink
*
);
// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
// (ist zur Zeit nur fuer die FileLinks interressant!)
// (ist zur Zeit nur fuer die FileLinks interressant!)
void
CancelTransfers
();
void
CancelTransfers
();
static
void
SetTransferPriority
(
SvBaseLink
&
rLink
,
USHORT
nPrio
);
static
void
SetTransferPriority
(
so3
::
SvBaseLink
&
rLink
,
USHORT
nPrio
);
// um Status Informationen aus dem FileObject an den BaseLink zu
// um Status Informationen aus dem FileObject an den BaseLink zu
// senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
// senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
...
@@ -119,12 +119,14 @@ public:
...
@@ -119,12 +119,14 @@ public:
// Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
// Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
// - das braucht Informationen ueber Load/Abort/Error
// - das braucht Informationen ueber Load/Abort/Error
static
ULONG
RegisterStatusInfoId
();
static
ULONG
RegisterStatusInfoId
();
};
// siehe im Cache nach, ob diese Graphic schon existiert
// if the mimetype says graphic/bitmap/gdimetafile then get the
BOOL
GetCacheGraphic
(
const
String
&
rName
,
Graphic
*
pGrf
,
Size
*
pSize
);
// graphic from the Any. Return says no errors
static
BOOL
GetGraphicFromAny
(
const
String
&
rMimeType
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
,
Graphic
&
rGrf
);
};
#endif
#endif
...
...
svx/source/svdraw/svdograf.cxx
Dosyayı görüntüle @
f1d26564
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: svdograf.cxx,v $
* $RCSfile: svdograf.cxx,v $
*
*
* $Revision: 1.2
1
$
* $Revision: 1.2
2
$
*
*
* last change: $Author:
sj $ $Date: 2001-03-08 16:36:12
$
* last change: $Author:
jp $ $Date: 2001-03-08 21:15:38
$
*
*
* 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
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
// - SdrGraphicLink -
// - SdrGraphicLink -
// ------------------
// ------------------
class
SdrGraphicLink
:
public
SvBaseLink
class
SdrGraphicLink
:
public
so3
::
SvBaseLink
{
{
SdrGrafObj
*
pGrafObj
;
SdrGrafObj
*
pGrafObj
;
...
@@ -124,19 +124,20 @@ public:
...
@@ -124,19 +124,20 @@ public:
virtual
~
SdrGraphicLink
();
virtual
~
SdrGraphicLink
();
virtual
void
Closed
();
virtual
void
Closed
();
virtual
void
DataChanged
(
SvData
&
rData
);
virtual
void
DataChanged
(
const
String
&
rMimeType
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
);
BOOL
Connect
()
{
return
0
!=
SvBaseLink
::
GetRealObject
();
}
BOOL
Connect
()
{
return
0
!=
GetRealObject
();
}
void
UpdateSynchron
();
void
UpdateSynchron
();
};
};
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
SdrGraphicLink
::
SdrGraphicLink
(
SdrGrafObj
*
pObj
)
:
SdrGraphicLink
::
SdrGraphicLink
(
SdrGrafObj
*
pObj
)
:
SvBaseLink
(
LINKUPDATE_ONCALL
,
SOT_FORMATSTR_ID_SVXB
),
so3
::
SvBaseLink
(
LINKUPDATE_ONCALL
,
SOT_FORMATSTR_ID_SVXB
),
pGrafObj
(
pObj
)
pGrafObj
(
pObj
)
{
{
SetSynchron
(
FALSE
);
SetSynchron
(
FALSE
);
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
@@ -147,71 +148,32 @@ SdrGraphicLink::~SdrGraphicLink()
...
@@ -147,71 +148,32 @@ SdrGraphicLink::~SdrGraphicLink()
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
SdrGraphicLink
::
DataChanged
(
SvData
&
rData
)
void
SdrGraphicLink
::
DataChanged
(
const
String
&
rMimeType
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
)
{
{
SdrModel
*
pModel
=
pGrafObj
==
NULL
?
NULL
:
pGrafObj
->
GetModel
()
;
SdrModel
*
pModel
=
pGrafObj
?
pGrafObj
->
GetModel
()
:
0
;
SvxLinkManager
*
pLinkManager
=
pModel
==
NULL
?
NULL
:
pModel
->
GetLinkManager
()
;
SvxLinkManager
*
pLinkManager
=
pModel
?
pModel
->
GetLinkManager
()
:
0
;
if
(
pLinkManager
!=
NULL
)
if
(
pLinkManager
&&
rValue
.
hasValue
()
)
{
{
const
ULONG
nFormat
=
rData
.
GetFormat
();
pLinkManager
->
GetDisplayNames
(
this
,
0
,
&
pGrafObj
->
aFileName
,
GraphicType
eOldGraphicType
=
pGrafObj
->
GetGraphicType
();
// kein Hereinswappen
0
,
&
pGrafObj
->
aFilterName
);
BOOL
bIsChanged
=
pModel
->
IsChanged
();
pLinkManager
->
GetDisplayNames
(
*
this
,
NULL
,
&
pGrafObj
->
aFileName
,
NULL
,
&
pGrafObj
->
aFilterName
);
if
(
nFormat
==
SOT_FORMATSTR_ID_SVXB
)
Graphic
aGraphic
;
if
(
SvxLinkManager
::
GetGraphicFromAny
(
rMimeType
,
rValue
,
aGraphic
))
{
{
Graphic
*
pGraphic
=
NULL
;
GraphicType
eOldGraphicType
=
pGrafObj
->
GetGraphicType
();
// kein Hereinswappen
BOOL
bIsChanged
=
pModel
->
IsChanged
();
if
(
rData
.
GetData
((
SvDataCopyStream
**
)
&
pGraphic
,
Graphic
::
StaticType
(),
TRANSFER_REFERENCE
))
{
pGrafObj
->
SetGraphic
(
*
pGraphic
);
if
(
eOldGraphicType
!=
GRAPHIC_NONE
)
pGrafObj
->
SetChanged
();
else
pModel
->
SetChanged
(
bIsChanged
);
}
}
else
if
(
rData
.
GetFormat
()
!=
SvxLinkManager
::
RegisterStatusInfoId
())
{
switch
(
nFormat
)
{
case
FORMAT_GDIMETAFILE
:
{
GDIMetaFile
*
pMetaFile
=
NULL
;
if
(
rData
.
GetData
(
&
pMetaFile
,
TRANSFER_REFERENCE
))
{
pGrafObj
->
SetGraphic
(
*
pMetaFile
);
if
(
eOldGraphicType
!=
GRAPHIC_NONE
)
pGrafObj
->
SetChanged
();
else
pModel
->
SetChanged
(
bIsChanged
);
}
}
break
;
case
FORMAT_BITMAP
:
{
Bitmap
*
pBmp
=
NULL
;
if
(
rData
.
GetData
(
&
pBmp
,
TRANSFER_REFERENCE
))
{
pGrafObj
->
SetGraphic
(
*
pBmp
);
if
(
eOldGraphicType
!=
GRAPHIC_NONE
)
pGrafObj
->
SetChanged
();
else
pModel
->
SetChanged
(
bIsChanged
);
}
}
break
;
default
:
pGrafObj
->
SetGraphic
(
aGraphic
);
pGrafObj
->
SendRepaintBroadcast
();
if
(
GRAPHIC_NONE
!=
eOldGraphicType
)
break
;
pGrafObj
->
SetChanged
();
}
else
pModel
->
SetChanged
(
bIsChanged
);
}
}
else
if
(
SotExchange
::
GetFormatIdFromMimeType
(
rMimeType
)
!=
SvxLinkManager
::
RegisterStatusInfoId
()
)
pGrafObj
->
SendRepaintBroadcast
();
}
}
}
}
...
@@ -232,10 +194,10 @@ void SdrGraphicLink::UpdateSynchron()
...
@@ -232,10 +194,10 @@ void SdrGraphicLink::UpdateSynchron()
{
{
if
(
GetObj
()
)
if
(
GetObj
()
)
{
{
S
vData
aData
(
GetContentType
()
);
S
tring
aMimeType
(
SotExchange
::
GetFormatMimeType
(
GetContentType
()
)
);
aData
.
SetAspect
(
ASPECT_DOCPRINT
)
;
::
com
::
sun
::
star
::
uno
::
Any
aValue
;
GetObj
()
->
GetData
(
&
aData
);
GetObj
()
->
GetData
(
aValue
,
aMimeType
,
TRUE
);
DataChanged
(
a
Data
);
DataChanged
(
a
MimeType
,
aValue
);
}
}
}
}
...
@@ -545,7 +507,7 @@ void SdrGrafObj::ImpLinkAbmeldung()
...
@@ -545,7 +507,7 @@ void SdrGrafObj::ImpLinkAbmeldung()
if
(
pLinkManager
!=
NULL
&&
pGraphicLink
!=
NULL
)
if
(
pLinkManager
!=
NULL
&&
pGraphicLink
!=
NULL
)
{
{
// Bei Remove wird *pGraphicLink implizit deleted
// Bei Remove wird *pGraphicLink implizit deleted
pLinkManager
->
Remove
(
*
pGraphicLink
);
pLinkManager
->
Remove
(
pGraphicLink
);
pGraphicLink
=
NULL
;
pGraphicLink
=
NULL
;
}
}
...
...
svx/source/svdraw/svdogrp.cxx
Dosyayı görüntüle @
f1d26564
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: svdogrp.cxx,v $
* $RCSfile: svdogrp.cxx,v $
*
*
* $Revision: 1.1
2
$
* $Revision: 1.1
3
$
*
*
* last change: $Author:
aw $ $Date: 2001-02-15 16:11:33
$
* last change: $Author:
jp $ $Date: 2001-03-08 21:15:38
$
*
*
* 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
...
@@ -134,14 +134,20 @@
...
@@ -134,14 +134,20 @@
//
//
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
class
ImpSdrObjGroupLink
:
public
SvBaseLink
{
class
ImpSdrObjGroupLink
:
public
so3
::
SvBaseLink
{
SdrObject
*
pSdrObj
;
SdrObject
*
pSdrObj
;
public
:
public
:
ImpSdrObjGroupLink
(
SdrObject
*
pObj1
)
:
SvBaseLink
(
LINKUPDATE_ONCALL
,
FORMAT_FILE
),
pSdrObj
(
pObj1
)
{}
ImpSdrObjGroupLink
(
SdrObject
*
pObj1
)
:
::
so3
::
SvBaseLink
(
so3
::
LINKUPDATE_ONCALL
,
FORMAT_FILE
),
pSdrObj
(
pObj1
)
{}
virtual
~
ImpSdrObjGroupLink
();
virtual
~
ImpSdrObjGroupLink
();
virtual
void
Closed
();
virtual
void
Closed
();
virtual
void
DataChanged
(
SvData
&
rData
);
virtual
void
DataChanged
(
const
String
&
rMimeType
,
FASTBOOL
Connect
()
{
return
0
!=
SvBaseLink
::
GetRealObject
();
}
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
);
FASTBOOL
Connect
()
{
return
0
!=
GetRealObject
();
}
};
};
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
...
@@ -165,19 +171,24 @@ void ImpSdrObjGroupLink::Closed()
...
@@ -165,19 +171,24 @@ void ImpSdrObjGroupLink::Closed()
}
}
void
ImpSdrObjGroupLink
::
DataChanged
(
SvData
&
rData
)
void
ImpSdrObjGroupLink
::
DataChanged
(
const
String
&
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
)
{
{
FASTBOOL
bForceReload
=
FALSE
;
FASTBOOL
bForceReload
=
FALSE
;
SdrModel
*
pModel
=
pSdrObj
==
NULL
?
NULL
:
pSdrObj
->
GetModel
();
SdrModel
*
pModel
=
pSdrObj
?
pSdrObj
->
GetModel
()
:
0
;
SvxLinkManager
*
pLinkManager
=
pModel
==
NULL
?
NULL
:
pModel
->
GetLinkManager
();
SvxLinkManager
*
pLinkManager
=
pModel
?
pModel
->
GetLinkManager
()
:
0
;
if
(
pLinkManager
!=
NULL
)
{
if
(
pLinkManager
)
ImpSdrObjGroupLinkUserData
*
pData
=
((
SdrObjGroup
*
)
pSdrObj
)
->
GetLinkUserData
();
{
if
(
pData
!=
NULL
)
{
ImpSdrObjGroupLinkUserData
*
pData
=
((
SdrObjGroup
*
)
pSdrObj
)
->
GetLinkUserData
();
if
(
pData
)
{
String
aFile
;
String
aFile
;
String
aName
;
String
aName
;
pLinkManager
->
GetDisplayNames
(
*
this
,
NULL
,
&
aFile
,
&
aName
,
NULL
);
pLinkManager
->
GetDisplayNames
(
this
,
0
,
&
aFile
,
&
aName
,
0
);
if
(
!
pData
->
aFileName
.
Equals
(
aFile
)
||
!
pData
->
aObjName
.
Equals
(
aName
))
if
(
!
pData
->
aFileName
.
Equals
(
aFile
)
||
!
pData
->
aObjName
.
Equals
(
aName
))
{
{
pData
->
aFileName
=
aFile
;
pData
->
aFileName
=
aFile
;
pData
->
aObjName
=
aName
;
pData
->
aObjName
=
aName
;
...
@@ -186,9 +197,8 @@ void ImpSdrObjGroupLink::DataChanged(SvData& rData)
...
@@ -186,9 +197,8 @@ void ImpSdrObjGroupLink::DataChanged(SvData& rData)
}
}
}
}
}
}
if
(
pSdrObj
!=
NULL
)
{
if
(
pSdrObj
)
((
SdrObjGroup
*
)
pSdrObj
)
->
ReloadLinkedGroup
(
bForceReload
);
((
SdrObjGroup
*
)
pSdrObj
)
->
ReloadLinkedGroup
(
bForceReload
);
}
}
}
#endif // SVX_LIGHT
#endif // SVX_LIGHT
...
@@ -592,7 +602,7 @@ void SdrObjGroup::ImpLinkAbmeldung()
...
@@ -592,7 +602,7 @@ void SdrObjGroup::ImpLinkAbmeldung()
SvxLinkManager
*
pLinkManager
=
pModel
!=
NULL
?
pModel
->
GetLinkManager
()
:
NULL
;
SvxLinkManager
*
pLinkManager
=
pModel
!=
NULL
?
pModel
->
GetLinkManager
()
:
NULL
;
if
(
pLinkManager
!=
NULL
&&
pData
!=
NULL
&&
pData
->
pLink
!=
NULL
)
{
// Nicht 2x Abmelden
if
(
pLinkManager
!=
NULL
&&
pData
!=
NULL
&&
pData
->
pLink
!=
NULL
)
{
// Nicht 2x Abmelden
// Bei Remove wird *pLink implizit deleted
// Bei Remove wird *pLink implizit deleted
pLinkManager
->
Remove
(
*
pData
->
pLink
);
pLinkManager
->
Remove
(
pData
->
pLink
);
pData
->
pLink
=
NULL
;
pData
->
pLink
=
NULL
;
}
}
#endif // SVX_LIGHT
#endif // SVX_LIGHT
...
...
svx/source/svdraw/svdoole2.cxx
Dosyayı görüntüle @
f1d26564
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: svdoole2.cxx,v $
* $RCSfile: svdoole2.cxx,v $
*
*
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
*
* last change: $Author:
aw $ $Date: 2001-02-15 16:11:33
$
* last change: $Author:
jp $ $Date: 2001-03-08 21:15:38
$
*
*
* 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
...
@@ -86,10 +86,6 @@
...
@@ -86,10 +86,6 @@
#endif
#endif
#ifndef SVX_LIGHT
#ifndef SVX_LIGHT
#ifndef _LNKBASE_HXX //autogen
#include <so3/lnkbase.hxx>
#endif
#ifndef _IPCLIENT_HXX //autogen
#ifndef _IPCLIENT_HXX //autogen
#include <so3/ipclient.hxx>
#include <so3/ipclient.hxx>
#endif
#endif
...
@@ -101,6 +97,8 @@
...
@@ -101,6 +97,8 @@
#endif
#endif
#endif
#endif
#include <sot/formats.hxx>
#ifndef _IPENV_HXX //autogen
#ifndef _IPENV_HXX //autogen
#include <so3/ipenv.hxx>
#include <so3/ipenv.hxx>
#endif
#endif
...
@@ -156,82 +154,6 @@ SO2_DECL_REF(SvInPlaceObject)
...
@@ -156,82 +154,6 @@ SO2_DECL_REF(SvInPlaceObject)
#endif
#endif
#endif // SVX_LIGHT
#endif // SVX_LIGHT
#ifndef SVX_LIGHT
/*************************************************************************
|*
|* SdrOleLink zur Verbindung von SdrOle2Obj und LinkManager
|*
\************************************************************************/
class
SdrOleLink
:
public
SvBaseLink
{
private
:
SdrOle2Obj
*
pOle2Obj
;
public
:
SdrOleLink
(
SdrOle2Obj
*
pObj
,
SvPseudoObject
*
pPseudoObj
);
virtual
~
SdrOleLink
();
virtual
void
Closed
();
virtual
void
DataChanged
(
SvData
&
)
{}
FASTBOOL
Connect
()
{
return
0
!=
SvBaseLink
::
GetRealObject
();
}
SvLinkName
*
GetCacheName
()
const
{
return
SvBaseLink
::
GetCacheName
();
}
};
#ifndef SV_DECL_SDROLELINK_DEFINED
#define SV_DECL_SDROLELINK_DEFINED
SV_DECL_REF
(
SdrOleLink
)
#endif
SV_IMPL_REF
(
SdrOleLink
)
#endif // SVX_LIGHT
#ifndef SVX_LIGHT
/*************************************************************************
|*
|* Ctor
|*
\************************************************************************/
SdrOleLink
::
SdrOleLink
(
SdrOle2Obj
*
pObj
,
SvPseudoObject
*
pPseudoObj
)
:
SvBaseLink
(
String
(),
OBJECT_CLIENT_OLE_CACHE
,
pPseudoObj
),
pOle2Obj
(
pObj
)
{
}
/*************************************************************************
|*
|* Dtor
|*
\************************************************************************/
SdrOleLink
::~
SdrOleLink
()
{
}
/*************************************************************************
|*
|* Link an oder abmelden
|*
\************************************************************************/
void
SdrOleLink
::
Closed
()
{
// Die Verbindung wird aufgehoben
SdrModel
*
pModel
=
pOle2Obj
->
GetModel
();
SvxLinkManager
*
pLinkManager
=
pModel
->
GetLinkManager
();
if
(
pLinkManager
!=
NULL
)
pLinkManager
->
Remove
(
*
this
);
// Basisklasse erst zum Schluss rufen, weil Closed()
// die Instanz zerstoert! (Wer programmiert denn sowas?!?)
// JP 28.02.96: Der Witz ist, das man sich eine LinkReferenz und nicht
// den direkten Pointer haelt!!!!!
SvBaseLink
::
Closed
();
}
#endif // SVX_LIGHT
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
...
@@ -241,22 +163,18 @@ SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_)
...
@@ -241,22 +163,18 @@ SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_)
{
{
Init
();
Init
();
xOleLinkRef
=
NULL
;
ppObjRef
=
new
SvInPlaceObjectRef
;
ppObjRef
=
new
SvInPlaceObjectRef
;
bFrame
=
bFrame_
;
bFrame
=
bFrame_
;
bTestIfLinked
=
TRUE
;
}
}
SdrOle2Obj
::
SdrOle2Obj
(
const
SvInPlaceObjectRef
&
rNewObjRef
,
FASTBOOL
bFrame_
)
SdrOle2Obj
::
SdrOle2Obj
(
const
SvInPlaceObjectRef
&
rNewObjRef
,
FASTBOOL
bFrame_
)
{
{
Init
();
Init
();
#ifndef SVX_LIGHT
#ifndef SVX_LIGHT
xOleLinkRef
.
Clear
();
ppObjRef
=
new
SvInPlaceObjectRef
(
rNewObjRef
);
ppObjRef
=
new
SvInPlaceObjectRef
(
rNewObjRef
);
#endif // !SVX_LIGHT
#endif // !SVX_LIGHT
bFrame
=
bFrame_
;
bFrame
=
bFrame_
;
bTestIfLinked
=
TRUE
;
SvInPlaceObjectRef
&
rIPRef
=
*
ppObjRef
;
SvInPlaceObjectRef
&
rIPRef
=
*
ppObjRef
;
...
@@ -275,13 +193,11 @@ SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, const XubString& rN
...
@@ -275,13 +193,11 @@ SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, const XubString& rN
Init
();
Init
();
#ifndef SVX_LIGHT
#ifndef SVX_LIGHT
xOleLinkRef
.
Clear
();
ppObjRef
=
new
SvInPlaceObjectRef
(
rNewObjRef
);
ppObjRef
=
new
SvInPlaceObjectRef
(
rNewObjRef
);
#endif
#endif
aName
=
rNewObjName
;
aName
=
rNewObjName
;
bFrame
=
bFrame_
;
bFrame
=
bFrame_
;
bTestIfLinked
=
TRUE
;
SvInPlaceObjectRef
&
rIPRef
=
*
ppObjRef
;
SvInPlaceObjectRef
&
rIPRef
=
*
ppObjRef
;
...
@@ -300,13 +216,11 @@ SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, const XubString& rN
...
@@ -300,13 +216,11 @@ SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, const XubString& rN
Init
();
Init
();
#ifndef SVX_LIGHT
#ifndef SVX_LIGHT
xOleLinkRef
.
Clear
();
ppObjRef
=
new
SvInPlaceObjectRef
(
rNewObjRef
);
ppObjRef
=
new
SvInPlaceObjectRef
(
rNewObjRef
);
#endif
#endif
aName
=
rNewObjName
;
aName
=
rNewObjName
;
bFrame
=
bFrame_
;
bFrame
=
bFrame_
;
bTestIfLinked
=
TRUE
;
SvInPlaceObjectRef
&
rIPRef
=
*
ppObjRef
;
SvInPlaceObjectRef
&
rIPRef
=
*
ppObjRef
;
...
@@ -400,8 +314,6 @@ void SdrOle2Obj::ImpAnmeldung()
...
@@ -400,8 +314,6 @@ void SdrOle2Obj::ImpAnmeldung()
xIObj
=
pInfo
=
new
SvEmbeddedInfoObject
(
*
ppObjRef
,
aName
);
xIObj
=
pInfo
=
new
SvEmbeddedInfoObject
(
*
ppObjRef
,
aName
);
}
}
SetOleLink
((
SvEmbeddedInfoObject
*
)
pInfo
);
if
(
!
pPers
->
HasObject
(
aName
)
)
if
(
!
pPers
->
HasObject
(
aName
)
)
{
{
pPers
->
Move
(
pInfo
,
aName
);
pPers
->
Move
(
pInfo
,
aName
);
...
@@ -467,15 +379,6 @@ void SdrOle2Obj::ImpAbmeldung()
...
@@ -467,15 +379,6 @@ void SdrOle2Obj::ImpAbmeldung()
// Aus Cache entfernen
// Aus Cache entfernen
GetSdrGlobalData
().
GetOLEObjCache
().
RemoveObj
(
this
);
GetSdrGlobalData
().
GetOLEObjCache
().
RemoveObj
(
this
);
if
(
xOleLinkRef
.
Is
())
{
xOleLinkRef
->
Closed
();
// Closed() deleted die Instanz bereits! (Wer programmiert denn sowas?!?)
// JP 28.02.96: Der Witz ist, das man sich eine LinkReferenz
// und nicht den direkten Pointer haelt!!!!!
xOleLinkRef
.
Clear
();
}
if
(
ppObjRef
->
Is
()
)
if
(
ppObjRef
->
Is
()
)
{
{
(
*
ppObjRef
)
->
DoClose
();
(
*
ppObjRef
)
->
DoClose
();
...
@@ -1010,35 +913,6 @@ void SdrOle2Obj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
...
@@ -1010,35 +913,6 @@ void SdrOle2Obj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
}
}
}
}
void
SdrOle2Obj
::
SetOleLink
(
SvEmbeddedInfoObject
*
pInfoObj
)
{
#ifndef SVX_LIGHT
if
(
xOleLinkRef
.
Is
())
{
// Erst Verbindung aufheben
xOleLinkRef
->
Closed
();
// Closed() deleted die Instanz bereits! (Wer programmiert denn sowas?!?)
// JP 28.02.96: Der Witz ist, das man sich eine LinkReferenz
// und nicht den direkten Pointer haelt!!!!!
xOleLinkRef
.
Clear
();
}
if
(
pModel
!=
NULL
&&
pInfoObj
&&
ppObjRef
->
Is
())
{
if
(
pInfoObj
->
IsLink
())
{
// Verbindung herstellen
xOleLinkRef
=
new
SdrOleLink
(
this
,
&
(
*
ppObjRef
));
SvxLinkManager
*
pLinkManager
=
pModel
->
GetLinkManager
();
if
(
pLinkManager
!=
NULL
)
{
pLinkManager
->
InsertSoLink
(
*
xOleLinkRef
);
}
}
}
bTestIfLinked
=
FALSE
;
#endif // SVX_LIGHT
}
void
SdrOle2Obj
::
NbcMove
(
const
Size
&
rSize
)
void
SdrOle2Obj
::
NbcMove
(
const
Size
&
rSize
)
{
{
SdrRectObj
::
NbcMove
(
rSize
);
SdrRectObj
::
NbcMove
(
rSize
);
...
@@ -1118,15 +992,6 @@ const SvInPlaceObjectRef& SdrOle2Obj::GetObjRef() const
...
@@ -1118,15 +992,6 @@ const SvInPlaceObjectRef& SdrOle2Obj::GetObjRef() const
pModel
->
SetChanged
(
FALSE
);
pModel
->
SetChanged
(
FALSE
);
}
}
if
(
bTestIfLinked
)
{
// Ist das Objekt ev. gelinkt? (nur einmal pruefen)
SvInfoObjectRef
xIObj
;
SvEmbeddedInfoObject
*
pInfo
;
xIObj
=
pInfo
=
new
SvEmbeddedInfoObject
(
*
ppObjRef
,
aName
);
(
(
SdrOle2Obj
*
)
this
)
->
SetOleLink
(
pInfo
);
}
if
(
(
*
ppObjRef
)
->
GetMiscStatus
()
&
SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE
)
if
(
(
*
ppObjRef
)
->
GetMiscStatus
()
&
SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE
)
{
{
if
(
pModel
&&
pModel
->
GetRefDevice
()
&&
if
(
pModel
&&
pModel
->
GetRefDevice
()
&&
...
...
svx/source/svdraw/svdotxln.cxx
Dosyayı görüntüle @
f1d26564
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: svdotxln.cxx,v $
* $RCSfile: svdotxln.cxx,v $
*
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
*
* last change: $Author:
ka $ $Date: 2000-11-10 15:12:27
$
* last change: $Author:
jp $ $Date: 2001-03-08 21:15:38
$
*
*
* 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
...
@@ -112,16 +112,20 @@
...
@@ -112,16 +112,20 @@
//
//
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
class
ImpSdrObjTextLink
:
public
SvBaseLink
class
ImpSdrObjTextLink
:
public
::
so3
::
SvBaseLink
{
{
SdrTextObj
*
pSdrObj
;
SdrTextObj
*
pSdrObj
;
public
:
public
:
ImpSdrObjTextLink
(
SdrTextObj
*
pObj1
)
:
SvBaseLink
(
LINKUPDATE_ONCALL
,
FORMAT_FILE
),
pSdrObj
(
pObj1
)
{}
ImpSdrObjTextLink
(
SdrTextObj
*
pObj1
)
:
::
so3
::
SvBaseLink
(
LINKUPDATE_ONCALL
,
FORMAT_FILE
),
pSdrObj
(
pObj1
)
{}
virtual
~
ImpSdrObjTextLink
();
virtual
~
ImpSdrObjTextLink
();
virtual
void
Closed
();
virtual
void
Closed
();
virtual
void
DataChanged
(
SvData
&
rData
);
virtual
void
DataChanged
(
const
String
&
rMimeType
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
);
BOOL
Connect
()
{
return
0
!=
SvBaseLink
::
GetRealObject
();
}
BOOL
Connect
()
{
return
0
!=
SvBaseLink
::
GetRealObject
();
}
};
};
...
@@ -132,7 +136,8 @@ ImpSdrObjTextLink::~ImpSdrObjTextLink()
...
@@ -132,7 +136,8 @@ ImpSdrObjTextLink::~ImpSdrObjTextLink()
void
ImpSdrObjTextLink
::
Closed
()
void
ImpSdrObjTextLink
::
Closed
()
{
{
if
(
pSdrObj
!=
NULL
)
{
if
(
pSdrObj
)
{
// pLink des Objekts auf NULL setzen, da die Link-Instanz ja gerade destruiert wird.
// pLink des Objekts auf NULL setzen, da die Link-Instanz ja gerade destruiert wird.
ImpSdrObjTextLinkUserData
*
pData
=
pSdrObj
->
GetLinkUserData
();
ImpSdrObjTextLinkUserData
*
pData
=
pSdrObj
->
GetLinkUserData
();
if
(
pData
!=
NULL
)
pData
->
pLink
=
NULL
;
if
(
pData
!=
NULL
)
pData
->
pLink
=
NULL
;
...
@@ -141,19 +146,24 @@ void ImpSdrObjTextLink::Closed()
...
@@ -141,19 +146,24 @@ void ImpSdrObjTextLink::Closed()
SvBaseLink
::
Closed
();
SvBaseLink
::
Closed
();
}
}
void
ImpSdrObjTextLink
::
DataChanged
(
SvData
&
rData
)
void
ImpSdrObjTextLink
::
DataChanged
(
const
String
&
rMimeType
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
)
{
{
FASTBOOL
bForceReload
=
FALSE
;
FASTBOOL
bForceReload
=
FALSE
;
SdrModel
*
pModel
=
pSdrObj
==
NULL
?
NULL
:
pSdrObj
->
GetModel
();
SdrModel
*
pModel
=
pSdrObj
?
pSdrObj
->
GetModel
()
:
0
;
SvxLinkManager
*
pLinkManager
=
pModel
==
NULL
?
NULL
:
pModel
->
GetLinkManager
();
SvxLinkManager
*
pLinkManager
=
pModel
?
pModel
->
GetLinkManager
()
:
0
;
if
(
pLinkManager
!=
NULL
)
{
if
(
pLinkManager
)
{
ImpSdrObjTextLinkUserData
*
pData
=
pSdrObj
->
GetLinkUserData
();
ImpSdrObjTextLinkUserData
*
pData
=
pSdrObj
->
GetLinkUserData
();
if
(
pData
!=
NULL
)
{
if
(
pData
)
{
String
aFile
;
String
aFile
;
String
aFilter
;
String
aFilter
;
pLinkManager
->
GetDisplayNames
(
*
this
,
NULL
,
&
aFile
,
NULL
,
&
aFilter
);
pLinkManager
->
GetDisplayNames
(
this
,
0
,
&
aFile
,
0
,
&
aFilter
);
if
(
!
pData
->
aFileName
.
Equals
(
aFile
)
||
!
pData
->
aFilterName
.
Equals
(
aFilter
))
if
(
!
pData
->
aFileName
.
Equals
(
aFile
)
||
!
pData
->
aFilterName
.
Equals
(
aFilter
))
{
{
pData
->
aFileName
=
aFile
;
pData
->
aFileName
=
aFile
;
pData
->
aFilterName
=
aFilter
;
pData
->
aFilterName
=
aFilter
;
...
@@ -162,9 +172,8 @@ void ImpSdrObjTextLink::DataChanged(SvData& rData)
...
@@ -162,9 +172,8 @@ void ImpSdrObjTextLink::DataChanged(SvData& rData)
}
}
}
}
}
}
if
(
pSdrObj
!=
NULL
)
{
if
(
pSdrObj
)
pSdrObj
->
ReloadLinkedText
(
bForceReload
);
pSdrObj
->
ReloadLinkedText
(
bForceReload
);
}
}
}
#endif // SVX_LIGHT
#endif // SVX_LIGHT
...
@@ -456,7 +465,7 @@ void SdrTextObj::ImpLinkAbmeldung()
...
@@ -456,7 +465,7 @@ void SdrTextObj::ImpLinkAbmeldung()
SvxLinkManager
*
pLinkManager
=
pModel
!=
NULL
?
pModel
->
GetLinkManager
()
:
NULL
;
SvxLinkManager
*
pLinkManager
=
pModel
!=
NULL
?
pModel
->
GetLinkManager
()
:
NULL
;
if
(
pLinkManager
!=
NULL
&&
pData
!=
NULL
&&
pData
->
pLink
!=
NULL
)
{
// Nicht 2x Abmelden
if
(
pLinkManager
!=
NULL
&&
pData
!=
NULL
&&
pData
->
pLink
!=
NULL
)
{
// Nicht 2x Abmelden
// Bei Remove wird *pLink implizit deleted
// Bei Remove wird *pLink implizit deleted
pLinkManager
->
Remove
(
*
pData
->
pLink
);
pLinkManager
->
Remove
(
pData
->
pLink
);
pData
->
pLink
=
NULL
;
pData
->
pLink
=
NULL
;
}
}
#endif // SVX_LIGHT
#endif // SVX_LIGHT
...
...
svx/source/svxlink/fileobj.cxx
Dosyayı görüntüle @
f1d26564
This diff is collapsed.
Click to expand it.
svx/source/svxlink/fileobj.hxx
Dosyayı görüntüle @
f1d26564
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: fileobj.hxx,v $
* $RCSfile: fileobj.hxx,v $
*
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
*
* last change: $Author:
hr $ $Date: 2000-09-18 17:01:26
$
* last change: $Author:
jp $ $Date: 2001-03-08 21:28:23
$
*
*
* 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
...
@@ -64,8 +64,8 @@
...
@@ -64,8 +64,8 @@
#ifndef _STRING_HXX //autogen
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#include <tools/string.hxx>
#endif
#endif
#ifndef _
PSEUDO
_HXX //autogen
#ifndef _
LINKSRC
_HXX //autogen
#include <so3/
pseudo
.hxx>
#include <so3/
linksrc
.hxx>
#endif
#endif
#ifndef _SFXDOCFILE_HXX //autogen
#ifndef _SFXDOCFILE_HXX //autogen
#include <sfx2/docfile.hxx>
#include <sfx2/docfile.hxx>
...
@@ -74,7 +74,8 @@
...
@@ -74,7 +74,8 @@
class
Graphic
;
class
Graphic
;
struct
Impl_DownLoadData
;
struct
Impl_DownLoadData
;
class
SvFileObject
:
public
SvPseudoObject
class
SvFileObject
:
public
so3
::
SvLinkSource
{
{
String
sFileNm
;
String
sFileNm
;
String
sFilter
;
String
sFilter
;
...
@@ -94,8 +95,7 @@ class SvFileObject : public SvPseudoObject
...
@@ -94,8 +95,7 @@ class SvFileObject : public SvPseudoObject
BOOL
bMedUseCache
:
1
;
BOOL
bMedUseCache
:
1
;
BOOL
bNativFormat
:
1
;
BOOL
bNativFormat
:
1
;
BOOL
bClearMedium
:
1
;
BOOL
bClearMedium
:
1
;
BOOL
bStateChangeCalled
:
1
;
SvDataTypeList
aTypeList
;
BOOL
GetGraphic_Impl
(
Graphic
&
,
SvStream
*
pStream
=
0
);
BOOL
GetGraphic_Impl
(
Graphic
&
,
SvStream
*
pStream
=
0
);
BOOL
LoadFile_Impl
();
BOOL
LoadFile_Impl
();
...
@@ -104,28 +104,28 @@ class SvFileObject : public SvPseudoObject
...
@@ -104,28 +104,28 @@ class SvFileObject : public SvPseudoObject
DECL_STATIC_LINK
(
SvFileObject
,
DelMedium_Impl
,
SfxMediumRef
*
);
DECL_STATIC_LINK
(
SvFileObject
,
DelMedium_Impl
,
SfxMediumRef
*
);
DECL_STATIC_LINK
(
SvFileObject
,
LoadGrfReady_Impl
,
void
*
);
DECL_STATIC_LINK
(
SvFileObject
,
LoadGrfReady_Impl
,
void
*
);
DECL_STATIC_LINK
(
SvFileObject
,
LoadGrfNewData_Impl
,
void
*
);
DECL_STATIC_LINK
(
SvFileObject
,
LoadGrfNewData_Impl
,
void
*
);
DECL_STATIC_LINK
(
SvFileObject
,
OldCacheGrf_Impl
,
void
*
);
protected
:
protected
:
virtual
~
SvFileObject
();
virtual
~
SvFileObject
();
public
:
public
:
SvFileObject
();
SvFileObject
();
virtual
const
SvDataTypeList
&
GetTypeList
()
const
;
virtual
BOOL
GetData
(
::
com
::
sun
::
star
::
uno
::
Any
&
rData
/*out param*/
,
virtual
BOOL
GetData
(
SvData
*
);
const
String
&
rMimeType
,
BOOL
bSynchron
=
FALSE
);
virtual
BOOL
Connect
(
SvBaseLink
&
);
virtual
BOOL
Connect
(
so3
::
SvBaseLink
*
);
virtual
S
vLinkName
*
Edit
(
Window
*
,
const
SvBaseLink
&
);
virtual
S
tring
Edit
(
Window
*
,
so3
::
SvBaseLink
*
);
// erfrage ob das man direkt auf die Daten zugreifen kann oder ob das
// erfrage ob das man direkt auf die Daten zugreifen kann oder ob das
// erst angestossen werden muss
// erst angestossen werden muss
virtual
ULONG
GetUpToDateStatus
();
virtual
BOOL
IsPending
()
const
;
virtual
BOOL
IsDataComplete
()
const
;
void
CancelTransfers
();
void
CancelTransfers
();
void
SetTransferPriority
(
USHORT
nPrio
);
void
SetTransferPriority
(
USHORT
nPrio
);
};
};
#endif
#endif
svx/source/svxlink/linkmgr.cxx
Dosyayı görüntüle @
f1d26564
This diff is collapsed.
Click to expand it.
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