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
b3080b9a
Kaydet (Commit)
b3080b9a
authored
Ara 09, 2008
tarafından
Rüdiger Timm
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CWS-TOOLING: integrate CWS c24v001_DEV300
üst
db489c67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
1 deletion
+70
-1
SOActiveX.cpp
extensions/source/activex/main/SOActiveX.cpp
+60
-0
SOActiveX.h
extensions/source/activex/main/SOActiveX.h
+1
-0
so_activex.cpp
extensions/source/activex/main/so_activex.cpp
+9
-1
No files found.
extensions/source/activex/main/SOActiveX.cpp
Dosyayı görüntüle @
b3080b9a
...
...
@@ -235,9 +235,39 @@ HRESULT CSOActiveX::Cleanup()
if
(
::
IsWindow
(
mOffWin
)
)
::
DestroyWindow
(
mOffWin
);
TerminateOffice
();
return
S_OK
;
}
HRESULT
CSOActiveX
::
TerminateOffice
()
{
// create desktop
CComPtr
<
IDispatch
>
pdispDesktop
;
HRESULT
hr
=
GetIDispByFunc
(
mpDispFactory
,
L"createInstance"
,
&
CComVariant
(
L"com.sun.star.frame.Desktop"
),
1
,
pdispDesktop
);
if
(
!
pdispDesktop
||
!
SUCCEEDED
(
hr
)
)
return
hr
;
// create tree of frames
CComPtr
<
IDispatch
>
pdispChildren
;
hr
=
GetIDispByFunc
(
pdispDesktop
,
L"getFrames"
,
NULL
,
0
,
pdispChildren
);
if
(
!
pdispChildren
||
!
SUCCEEDED
(
hr
)
)
return
hr
;
CComVariant
aFrames
;
hr
=
ExecuteFunc
(
pdispChildren
,
L"queryFrames"
,
&
CComVariant
(
4
),
1
,
&
aFrames
);
if
(
SUCCEEDED
(
hr
)
)
{
if
(
(
aFrames
.
vt
==
(
VT_ARRAY
|
VT_DISPATCH
)
||
aFrames
.
vt
==
(
VT_ARRAY
|
VT_VARIANT
)
)
&&
(
!
aFrames
.
parray
||
aFrames
.
parray
->
cDims
==
1
&&
aFrames
.
parray
->
rgsabound
[
0
].
cElements
==
0
)
)
{
// there is no frames open
// TODO: check whether the frames are hidden if they are open?
CComVariant
dummyResult
;
hr
=
ExecuteFunc
(
pdispDesktop
,
L"terminate"
,
NULL
,
0
,
&
dummyResult
);
}
}
return
hr
;
}
STDMETHODIMP
CSOActiveX
::
InitNew
()
{
...
...
@@ -752,6 +782,36 @@ HRESULT CSOActiveX::LoadURLToFrame( )
// does not work for some documents, but it is no error
// if( !SUCCEEDED( hr ) ) return hr;
// try to get the model and set the presetation specific property, the setting will fail for other document formats
CComPtr
<
IDispatch
>
pdispController
;
hr
=
GetIDispByFunc
(
mpDispFrame
,
L"getController"
,
NULL
,
0
,
pdispController
);
if
(
SUCCEEDED
(
hr
)
&&
pdispController
)
{
CComPtr
<
IDispatch
>
pdispModel
;
hr
=
GetIDispByFunc
(
pdispController
,
L"getModel"
,
NULL
,
0
,
pdispModel
);
if
(
SUCCEEDED
(
hr
)
&&
pdispModel
)
{
CComPtr
<
IDispatch
>
pdispPres
;
hr
=
GetIDispByFunc
(
pdispModel
,
L"getPresentation"
,
NULL
,
0
,
pdispPres
);
if
(
SUCCEEDED
(
hr
)
&&
pdispPres
)
{
// this is a presentation
// let the slide show be shown in the document window
OLECHAR
*
pPropName
=
L"IsFullScreen"
;
CComVariant
pPresProp
;
pPresProp
.
vt
=
VT_BOOL
;
pPresProp
.
boolVal
=
VARIANT_FALSE
;
hr
=
PutPropertiesToIDisp
(
pdispPres
,
&
pPropName
,
&
pPresProp
,
1
);
// start the slide show
if
(
SUCCEEDED
(
hr
)
)
{
CComVariant
dummyResult
;
ExecuteFunc
(
pdispPres
,
L"Start"
,
NULL
,
0
,
&
dummyResult
);
}
}
}
}
/*
// create dispatch interceptor
mpDispatchInterceptor = new CComObject< SODispatchInterceptor >();
...
...
extensions/source/activex/main/SOActiveX.h
Dosyayı görüntüle @
b3080b9a
...
...
@@ -162,6 +162,7 @@ public:
HRESULT
CallLoadComponentFromURL1PBool
(
OLECHAR
*
sUrl
,
OLECHAR
*
sArgName
,
BOOL
sArgVal
);
HRESULT
GetUrlStruct
(
OLECHAR
*
sUrl
,
CComPtr
<
IDispatch
>&
pdispUrl
);
HRESULT
Cleanup
();
HRESULT
TerminateOffice
();
HRESULT
CSOActiveX
::
GetURL
(
const
OLECHAR
*
url
,
const
OLECHAR
*
target
);
...
...
extensions/source/activex/main/so_activex.cpp
Dosyayı görüntüle @
b3080b9a
...
...
@@ -559,8 +559,14 @@ STDAPI DllRegisterServer( void )
if
(
aCurModule
&&
GetModuleFileNameA
(
aCurModule
,
pActiveXPath
,
1019
)
)
{
aResult
=
DllRegisterServerNative
(
31
,
TRUE
,
pActiveXPath
);
if
(
FAILED
(
aResult
)
)
if
(
SUCCEEDED
(
aResult
)
)
aResult
=
DllRegisterServerDoc
(
31
,
TRUE
);
else
{
aResult
=
DllRegisterServerNative
(
31
,
FALSE
,
pActiveXPath
);
if
(
SUCCEEDED
(
aResult
)
)
aResult
=
DllRegisterServerDoc
(
31
,
FALSE
);
}
}
return
aResult
;
...
...
@@ -568,7 +574,9 @@ STDAPI DllRegisterServer( void )
STDAPI
DllUnregisterServer
(
void
)
{
DllUnregisterServerDoc
(
63
,
FALSE
);
DllUnregisterServerNative
(
63
,
FALSE
);
DllUnregisterServerDoc
(
63
,
TRUE
);
return
DllUnregisterServerNative
(
63
,
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