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
df997d92
Kaydet (Commit)
df997d92
authored
Ara 16, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify Desktop::getInfoHelper
Change-Id: I13058816e8b2b1c821f0123f110671706bf90449
üst
a2016848
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
74 deletions
+25
-74
desktop.hxx
framework/inc/services/desktop.hxx
+0
-1
desktop.cxx
framework/source/services/desktop.cxx
+25
-73
No files found.
framework/inc/services/desktop.hxx
Dosyayı görüntüle @
df997d92
...
@@ -322,7 +322,6 @@ class Desktop : private cppu::BaseMutex,
...
@@ -322,7 +322,6 @@ class Desktop : private cppu::BaseMutex,
private
:
private
:
css
::
uno
::
Reference
<
css
::
lang
::
XComponent
>
impl_getFrameComponent
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
)
const
;
css
::
uno
::
Reference
<
css
::
lang
::
XComponent
>
impl_getFrameComponent
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
)
const
;
static
const
css
::
uno
::
Sequence
<
css
::
beans
::
Property
>
impl_getStaticPropertyDescriptor
(
);
/** calls queryTermination() on every registered termination listener.
/** calls queryTermination() on every registered termination listener.
*
*
...
...
framework/source/services/desktop.cxx
Dosyayı görüntüle @
df997d92
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
#include <comphelper/sequence.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/instance.hxx>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <tools/errinf.hxx>
#include <tools/errinf.hxx>
...
@@ -1411,46 +1412,34 @@ void SAL_CALL Desktop::getFastPropertyValue( css::uno::Any& aValue ,
...
@@ -1411,46 +1412,34 @@ void SAL_CALL Desktop::getFastPropertyValue( css::uno::Any& aValue ,
}
}
}
}
/*-************************************************************************************************************
@short return structure and information about transient properties
@descr This method is calling from helperclass "OPropertySetHelper".
Don't use this directly!
@attention You must use global lock (method use static variable) ... and it must be the shareable osl mutex of it.
Because; our baseclass use this mutex to make his code threadsafe. We use our lock!
So we could have two different mutex/lock mechanism at the same object.
@seealso class OPropertySetHelper
@return structure with property-information
@threadsafe yes
*//*-*************************************************************************************************************/
::
cppu
::
IPropertyArrayHelper
&
SAL_CALL
Desktop
::
getInfoHelper
()
::
cppu
::
IPropertyArrayHelper
&
SAL_CALL
Desktop
::
getInfoHelper
()
{
{
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
struct
Static
:
// Register transaction and reject wrong calls.
public
rtl
::
StaticWithInit
<
cppu
::
OPropertyArrayHelper
,
Static
>
TransactionGuard
aTransaction
(
m_aTransactionManager
,
E_HARDEXCEPTIONS
);
// Optimize this method !
// We initialize a static variable only one time. And we don't must use a mutex at every call!
// For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL!
static
::
cppu
::
OPropertyArrayHelper
*
pInfoHelper
=
nullptr
;
if
(
pInfoHelper
==
nullptr
)
{
{
SolarMutexGuard
aGuard
;
cppu
::
OPropertyArrayHelper
operator
()()
{
return
{
// Control this pointer again, another instance can be faster then these!
{{
"ActiveFrame"
,
PropHandle
::
ActiveFrame
,
if
(
pInfoHelper
==
nullptr
)
cppu
::
UnoType
<
css
::
lang
::
XComponent
>::
get
(),
{
(
css
::
beans
::
PropertyAttribute
::
TRANSIENT
// Define static member to give structure of properties to baseclass "OPropertySetHelper".
|
css
::
beans
::
PropertyAttribute
::
READONLY
)},
// "impl_getStaticPropertyDescriptor" is a non exported and static function, who will define a static propertytable.
{
"DispatchRecorderSupplier"
,
// "sal_True" say: Table is sorted by name.
PropHandle
::
DispatchRecorderSupplier
,
static
::
cppu
::
OPropertyArrayHelper
aInfoHelper
(
impl_getStaticPropertyDescriptor
(),
sal_True
);
cppu
::
UnoType
<
css
::
frame
::
XDispatchRecorderSupplier
>::
get
(),
pInfoHelper
=
&
aInfoHelper
;
css
::
beans
::
PropertyAttribute
::
TRANSIENT
},
{
"IsPlugged"
,
PropHandle
::
IsPlugged
,
cppu
::
UnoType
<
bool
>::
get
(),
(
css
::
beans
::
PropertyAttribute
::
TRANSIENT
|
css
::
beans
::
PropertyAttribute
::
READONLY
)},
{
"SuspendQuickstartVeto"
,
PropHandle
::
SuspendQuickstartVeto
,
cppu
::
UnoType
<
bool
>::
get
(),
css
::
beans
::
PropertyAttribute
::
TRANSIENT
},
{
"Title"
,
PropHandle
::
Title
,
cppu
::
UnoType
<
OUString
>::
get
(),
css
::
beans
::
PropertyAttribute
::
TRANSIENT
}},
true
};
}
}
}
};
return
Static
::
get
();
return
(
*
pInfoHelper
);
}
}
/*-************************************************************************************************************
/*-************************************************************************************************************
...
@@ -1549,43 +1538,6 @@ css::uno::Reference< css::lang::XComponent > Desktop::impl_getFrameComponent( co
...
@@ -1549,43 +1538,6 @@ css::uno::Reference< css::lang::XComponent > Desktop::impl_getFrameComponent( co
return
xComponent
;
return
xComponent
;
}
}
/*-************************************************************************************************************
@short create table with information about properties
@descr We use a helper class to support properties. These class need some information about this.
These method create a new static description table with name, type, r/w-flags and so on ...
@seealso class OPropertySetHelper
@seealso method getInfoHelper()
@return Static table with information about properties.
@threadsafe yes
*//*-*************************************************************************************************************/
const
css
::
uno
::
Sequence
<
css
::
beans
::
Property
>
Desktop
::
impl_getStaticPropertyDescriptor
()
{
// Create a property array to initialize sequence!
// Table of all predefined properties of this class. Its used from OPropertySetHelper-class!
// Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!!
// It's necessary for methods of OPropertySetHelper.
// ATTENTION:
// YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!!
return
{
{
"ActiveFrame"
,
PropHandle
::
ActiveFrame
,
cppu
::
UnoType
<
css
::
lang
::
XComponent
>::
get
(),
(
css
::
beans
::
PropertyAttribute
::
TRANSIENT
|
css
::
beans
::
PropertyAttribute
::
READONLY
)},
{
"DispatchRecorderSupplier"
,
PropHandle
::
DispatchRecorderSupplier
,
cppu
::
UnoType
<
css
::
frame
::
XDispatchRecorderSupplier
>::
get
(),
css
::
beans
::
PropertyAttribute
::
TRANSIENT
},
{
"IsPlugged"
,
PropHandle
::
IsPlugged
,
cppu
::
UnoType
<
bool
>::
get
(),
(
css
::
beans
::
PropertyAttribute
::
TRANSIENT
|
css
::
beans
::
PropertyAttribute
::
READONLY
)},
{
"SuspendQuickstartVeto"
,
PropHandle
::
SuspendQuickstartVeto
,
cppu
::
UnoType
<
bool
>::
get
(),
css
::
beans
::
PropertyAttribute
::
TRANSIENT
},
{
"Title"
,
PropHandle
::
Title
,
cppu
::
UnoType
<
OUString
>::
get
(),
css
::
beans
::
PropertyAttribute
::
TRANSIENT
}};
}
void
Desktop
::
impl_sendQueryTerminationEvent
(
Desktop
::
TTerminateListenerList
&
lCalledListener
,
void
Desktop
::
impl_sendQueryTerminationEvent
(
Desktop
::
TTerminateListenerList
&
lCalledListener
,
bool
&
bVeto
)
bool
&
bVeto
)
{
{
...
...
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