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
fc2a986c
Kaydet (Commit)
fc2a986c
authored
Agu 31, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ImplDdeService is for windows only
üst
8cc80e11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
90 deletions
+92
-90
appdde.cxx
sfx2/source/appl/appdde.cxx
+92
-90
No files found.
sfx2/source/appl/appdde.cxx
Dosyayı görüntüle @
fc2a986c
...
@@ -70,7 +70,7 @@ String SfxDdeServiceName_Impl( const String& sIn )
...
@@ -70,7 +70,7 @@ String SfxDdeServiceName_Impl( const String& sIn )
return
sReturn
;
return
sReturn
;
}
}
#if defined( WNT )
class
ImplDdeService
:
public
DdeService
class
ImplDdeService
:
public
DdeService
{
{
public
:
public
:
...
@@ -84,6 +84,97 @@ public:
...
@@ -84,6 +84,97 @@ public:
virtual
sal_Bool
SysTopicExecute
(
const
String
*
pStr
);
virtual
sal_Bool
SysTopicExecute
(
const
String
*
pStr
);
};
};
//--------------------------------------------------------------------
sal_Bool
ImplDdeService
::
MakeTopic
(
const
String
&
rNm
)
{
// Workaround for Event after Main() under OS/2
// happens when exiting starts the App again
if
(
!
Application
::
IsInExecute
()
)
return
sal_False
;
// The Topic rNm is sought, do we have it?
// First only loop over the ObjectShells to find those
// with the specific name:
sal_Bool
bRet
=
sal_False
;
String
sNm
(
rNm
);
sNm
.
ToLowerAscii
();
TypeId
aType
(
TYPE
(
SfxObjectShell
)
);
SfxObjectShell
*
pShell
=
SfxObjectShell
::
GetFirst
(
&
aType
);
while
(
pShell
)
{
String
sTmp
(
pShell
->
GetTitle
(
SFX_TITLE_FULLNAME
)
);
sTmp
.
ToLowerAscii
();
if
(
sTmp
==
sNm
)
{
SFX_APP
()
->
AddDdeTopic
(
pShell
);
bRet
=
sal_True
;
break
;
}
pShell
=
SfxObjectShell
::
GetNext
(
*
pShell
,
&
aType
);
}
if
(
!
bRet
)
{
INetURLObject
aWorkPath
(
SvtPathOptions
().
GetWorkPath
()
);
INetURLObject
aFile
;
if
(
aWorkPath
.
GetNewAbsURL
(
rNm
,
&
aFile
)
&&
SfxContentHelper
::
IsDocument
(
aFile
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
)
)
{
// File exists? then try to load it:
SfxStringItem
aName
(
SID_FILE_NAME
,
aFile
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
SfxBoolItem
aNewView
(
SID_OPEN_NEW_VIEW
,
sal_True
);
SfxBoolItem
aSilent
(
SID_SILENT
,
sal_True
);
SfxDispatcher
*
pDispatcher
=
SFX_APP
()
->
GetDispatcher_Impl
();
const
SfxPoolItem
*
pRet
=
pDispatcher
->
Execute
(
SID_OPENDOC
,
SFX_CALLMODE_SYNCHRON
,
&
aName
,
&
aNewView
,
&
aSilent
,
0L
);
if
(
pRet
&&
pRet
->
ISA
(
SfxViewFrameItem
)
&&
((
SfxViewFrameItem
*
)
pRet
)
->
GetFrame
()
&&
0
!=
(
pShell
=
((
SfxViewFrameItem
*
)
pRet
)
->
GetFrame
()
->
GetObjectShell
()
)
)
{
SFX_APP
()
->
AddDdeTopic
(
pShell
);
bRet
=
sal_True
;
}
}
}
return
bRet
;
}
String
ImplDdeService
::
Topics
()
{
String
sRet
;
if
(
GetSysTopic
()
)
sRet
+=
GetSysTopic
()
->
GetName
();
TypeId
aType
(
TYPE
(
SfxObjectShell
)
);
SfxObjectShell
*
pShell
=
SfxObjectShell
::
GetFirst
(
&
aType
);
while
(
pShell
)
{
if
(
SfxViewFrame
::
GetFirst
(
pShell
)
)
{
if
(
sRet
.
Len
()
)
sRet
+=
'\t'
;
sRet
+=
pShell
->
GetTitle
(
SFX_TITLE_FULLNAME
);
}
pShell
=
SfxObjectShell
::
GetNext
(
*
pShell
,
&
aType
);
}
if
(
sRet
.
Len
()
)
sRet
+=
DEFINE_CONST_UNICODE
(
"
\r\n
"
);
return
sRet
;
}
sal_Bool
ImplDdeService
::
SysTopicExecute
(
const
String
*
pStr
)
{
return
(
sal_Bool
)
SFX_APP
()
->
DdeExecute
(
*
pStr
);
}
#endif
class
SfxDdeTriggerTopic_Impl
:
public
DdeTopic
class
SfxDdeTriggerTopic_Impl
:
public
DdeTopic
{
{
public
:
public
:
...
@@ -490,95 +581,6 @@ DdeService* SfxApplication::GetDdeService()
...
@@ -490,95 +581,6 @@ DdeService* SfxApplication::GetDdeService()
//--------------------------------------------------------------------
//--------------------------------------------------------------------
sal_Bool
ImplDdeService
::
MakeTopic
(
const
String
&
rNm
)
{
// Workaround for Event after Main() under OS/2
// happens when exiting starts the App again
if
(
!
Application
::
IsInExecute
()
)
return
sal_False
;
// The Topic rNm is sought, do we have it?
// First only loop over the ObjectShells to find those
// with the specific name:
sal_Bool
bRet
=
sal_False
;
String
sNm
(
rNm
);
sNm
.
ToLowerAscii
();
TypeId
aType
(
TYPE
(
SfxObjectShell
)
);
SfxObjectShell
*
pShell
=
SfxObjectShell
::
GetFirst
(
&
aType
);
while
(
pShell
)
{
String
sTmp
(
pShell
->
GetTitle
(
SFX_TITLE_FULLNAME
)
);
sTmp
.
ToLowerAscii
();
if
(
sTmp
==
sNm
)
{
SFX_APP
()
->
AddDdeTopic
(
pShell
);
bRet
=
sal_True
;
break
;
}
pShell
=
SfxObjectShell
::
GetNext
(
*
pShell
,
&
aType
);
}
if
(
!
bRet
)
{
INetURLObject
aWorkPath
(
SvtPathOptions
().
GetWorkPath
()
);
INetURLObject
aFile
;
if
(
aWorkPath
.
GetNewAbsURL
(
rNm
,
&
aFile
)
&&
SfxContentHelper
::
IsDocument
(
aFile
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
)
)
{
// File exists? then try to load it:
SfxStringItem
aName
(
SID_FILE_NAME
,
aFile
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
SfxBoolItem
aNewView
(
SID_OPEN_NEW_VIEW
,
sal_True
);
SfxBoolItem
aSilent
(
SID_SILENT
,
sal_True
);
SfxDispatcher
*
pDispatcher
=
SFX_APP
()
->
GetDispatcher_Impl
();
const
SfxPoolItem
*
pRet
=
pDispatcher
->
Execute
(
SID_OPENDOC
,
SFX_CALLMODE_SYNCHRON
,
&
aName
,
&
aNewView
,
&
aSilent
,
0L
);
if
(
pRet
&&
pRet
->
ISA
(
SfxViewFrameItem
)
&&
((
SfxViewFrameItem
*
)
pRet
)
->
GetFrame
()
&&
0
!=
(
pShell
=
((
SfxViewFrameItem
*
)
pRet
)
->
GetFrame
()
->
GetObjectShell
()
)
)
{
SFX_APP
()
->
AddDdeTopic
(
pShell
);
bRet
=
sal_True
;
}
}
}
return
bRet
;
}
String
ImplDdeService
::
Topics
()
{
String
sRet
;
if
(
GetSysTopic
()
)
sRet
+=
GetSysTopic
()
->
GetName
();
TypeId
aType
(
TYPE
(
SfxObjectShell
)
);
SfxObjectShell
*
pShell
=
SfxObjectShell
::
GetFirst
(
&
aType
);
while
(
pShell
)
{
if
(
SfxViewFrame
::
GetFirst
(
pShell
)
)
{
if
(
sRet
.
Len
()
)
sRet
+=
'\t'
;
sRet
+=
pShell
->
GetTitle
(
SFX_TITLE_FULLNAME
);
}
pShell
=
SfxObjectShell
::
GetNext
(
*
pShell
,
&
aType
);
}
if
(
sRet
.
Len
()
)
sRet
+=
DEFINE_CONST_UNICODE
(
"
\r\n
"
);
return
sRet
;
}
sal_Bool
ImplDdeService
::
SysTopicExecute
(
const
String
*
pStr
)
{
return
(
sal_Bool
)
SFX_APP
()
->
DdeExecute
(
*
pStr
);
}
//--------------------------------------------------------------------
sal_Bool
SfxDdeTriggerTopic_Impl
::
Execute
(
const
String
*
)
sal_Bool
SfxDdeTriggerTopic_Impl
::
Execute
(
const
String
*
)
{
{
return
sal_True
;
return
sal_True
;
...
...
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