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
c6821e66
Kaydet (Commit)
c6821e66
authored
Mar 31, 2014
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
speed up the import tests
Change-Id: If3f0198d58b6c64a4efd4be294f1d66fb39f2302
üst
0f912872
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
21 deletions
+27
-21
WpftImportTestBase.cxx
writerperfect/qa/unit/WpftImportTestBase.cxx
+27
-21
No files found.
writerperfect/qa/unit/WpftImportTestBase.cxx
Dosyayı görüntüle @
c6821e66
...
...
@@ -80,6 +80,30 @@ bool WpftImportTestBase::load(const OUString &, const OUString &rURL, const OUSt
m_xDesktop
->
loadComponentFromURL
(
m_aFactoryURL
,
"_blank"
,
0
,
uno
::
Sequence
<
beans
::
PropertyValue
>
()),
uno
::
UNO_QUERY_THROW
);
// Find the model and frame. We need them later.
uno
::
Reference
<
frame
::
XFrame
>
xFrame
(
xDoc
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
frame
::
XModel
>
xModel
(
xDoc
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
frame
::
XController
>
xController
(
xDoc
,
uno
::
UNO_QUERY
);
if
(
xFrame
.
is
())
{
xController
=
xFrame
->
getController
();
xModel
=
xController
->
getModel
();
}
else
if
(
xModel
.
is
())
{
xController
=
xModel
->
getCurrentController
();
xFrame
=
xController
->
getFrame
();
}
else
if
(
xController
.
is
())
{
xFrame
=
xController
->
getFrame
();
xModel
=
xController
->
getModel
();
}
if
(
!
xFrame
.
is
()
||
!
xModel
.
is
())
throw
uno
::
RuntimeException
();
bool
result
=
false
;
// try to import the document (and load it into the prepared frame)
...
...
@@ -105,7 +129,9 @@ bool WpftImportTestBase::load(const OUString &, const OUString &rURL, const OUSt
impl_detectFilterName
(
aDescriptor
,
aTypeName
);
xModel
->
lockControllers
();
result
=
m_xFilter
->
filter
(
aDescriptor
);
xModel
->
unlockControllers
();
}
catch
(
const
uno
::
Exception
&
)
{
...
...
@@ -113,29 +139,9 @@ bool WpftImportTestBase::load(const OUString &, const OUString &rURL, const OUSt
}
// close the opened document
uno
::
Reference
<
util
::
XCloseable
>
xCloseable
(
xDoc
,
uno
::
UNO_QUERY
);
if
(
!
xCloseable
.
is
())
{
uno
::
Reference
<
frame
::
XController
>
xController
(
xDoc
,
uno
::
UNO_QUERY
);
if
(
!
xController
.
is
())
{
const
uno
::
Reference
<
frame
::
XModel
>
xModel
(
xDoc
,
uno
::
UNO_QUERY
);
if
(
xModel
.
is
())
xController
=
xModel
->
getCurrentController
();
}
if
(
xController
.
is
())
{
const
uno
::
Reference
<
frame
::
XFrame
>
xFrame
=
xController
->
getFrame
();
if
(
xFrame
.
is
())
xCloseable
.
set
(
xFrame
,
uno
::
UNO_QUERY
);
}
}
try
{
uno
::
Reference
<
util
::
XCloseable
>
xCloseable
(
xFrame
,
uno
::
UNO_QUERY
);
if
(
xCloseable
.
is
())
xCloseable
->
close
(
true
);
else
...
...
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