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
e7b9aa1b
Kaydet (Commit)
e7b9aa1b
authored
Eyl 16, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwDBTreeList_Impl
Change-Id: Id828ffe75943c7f6e194b310486d51a068eead1c
üst
e4daef33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
dbtree.cxx
sw/source/uibase/dbui/dbtree.cxx
+20
-20
No files found.
sw/source/uibase/dbui/dbtree.cxx
Dosyayı görüntüle @
e7b9aa1b
...
...
@@ -72,13 +72,13 @@ typedef boost::ptr_vector<SwConnectionData> SwConnectionArr;
class
SwDBTreeList_Impl
:
public
cppu
::
WeakImplHelper
<
XContainerListener
>
{
Reference
<
XDatabaseContext
>
xDB
Context
;
SwConnectionArr
aConnections
;
SwWrtShell
*
pWrtSh
;
Reference
<
XDatabaseContext
>
m_xDatabase
Context
;
SwConnectionArr
m_
aConnections
;
SwWrtShell
*
m_pWrtShell
;
public
:
explicit
SwDBTreeList_Impl
(
SwWrtShell
*
pShell
)
:
pWrtSh
(
pShell
)
:
m_pWrtShell
(
pShell
)
{
}
virtual
~
SwDBTreeList_Impl
();
...
...
@@ -89,21 +89,21 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper < XContainerListener >
virtual
void
SAL_CALL
disposing
(
const
EventObject
&
Source
)
throw
(
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
bool
HasContext
();
SwWrtShell
*
GetWrtShell
()
{
return
pWrtSh
;}
void
SetWrtShell
(
SwWrtShell
&
rSh
)
{
pWrtSh
=
&
rSh
;}
Reference
<
XDatabaseContext
>
GetContext
()
const
{
return
xDB
Context
;}
SwWrtShell
*
GetWrtShell
()
{
return
m_pWrtShell
;}
void
SetWrtShell
(
SwWrtShell
&
rSh
)
{
m_pWrtShell
=
&
rSh
;}
Reference
<
XDatabaseContext
>
GetContext
()
const
{
return
m_xDatabase
Context
;}
Reference
<
XConnection
>
GetConnection
(
const
OUString
&
rSourceName
);
};
SwDBTreeList_Impl
::~
SwDBTreeList_Impl
()
{
if
(
xDB
Context
.
is
())
if
(
m_xDatabase
Context
.
is
())
{
m_refCount
++
;
//block necessary due to solaris' compiler behaviour to
//remove temporaries at the block's end
{
xDB
Context
->
removeContainerListener
(
this
);
m_xDatabase
Context
->
removeContainerListener
(
this
);
}
m_refCount
--
;
}
...
...
@@ -119,11 +119,11 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
SolarMutexGuard
aGuard
;
OUString
sSource
;
rEvent
.
Accessor
>>=
sSource
;
for
(
SwConnectionArr
::
iterator
i
=
aConnections
.
begin
();
i
!=
aConnections
.
end
();
++
i
)
for
(
SwConnectionArr
::
iterator
i
=
m_aConnections
.
begin
();
i
!=
m_
aConnections
.
end
();
++
i
)
{
if
(
i
->
sSourceName
==
sSource
)
{
aConnections
.
erase
(
i
);
m_
aConnections
.
erase
(
i
);
break
;
}
}
...
...
@@ -131,7 +131,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
void
SwDBTreeList_Impl
::
disposing
(
const
EventObject
&
)
throw
(
RuntimeException
,
std
::
exception
)
{
xDB
Context
=
0
;
m_xDatabase
Context
=
0
;
}
void
SwDBTreeList_Impl
::
elementReplaced
(
const
ContainerEvent
&
rEvent
)
throw
(
RuntimeException
,
std
::
exception
)
...
...
@@ -141,19 +141,19 @@ void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (R
bool
SwDBTreeList_Impl
::
HasContext
()
{
if
(
!
xDB
Context
.
is
())
if
(
!
m_xDatabase
Context
.
is
())
{
Reference
<
XComponentContext
>
xContext
(
::
comphelper
::
getProcessComponentContext
()
);
xDB
Context
=
DatabaseContext
::
create
(
xContext
);
xDB
Context
->
addContainerListener
(
this
);
m_xDatabase
Context
=
DatabaseContext
::
create
(
xContext
);
m_xDatabase
Context
->
addContainerListener
(
this
);
}
return
xDB
Context
.
is
();
return
m_xDatabase
Context
.
is
();
}
Reference
<
XConnection
>
SwDBTreeList_Impl
::
GetConnection
(
const
OUString
&
rSourceName
)
{
Reference
<
XConnection
>
xRet
;
for
(
SwConnectionArr
::
const_iterator
i
=
aConnections
.
begin
();
i
!=
aConnections
.
end
();
++
i
)
for
(
SwConnectionArr
::
const_iterator
i
=
m_aConnections
.
begin
();
i
!=
m_
aConnections
.
end
();
++
i
)
{
if
(
i
->
sSourceName
==
rSourceName
)
{
...
...
@@ -161,12 +161,12 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const OUString& rSource
break
;
}
}
if
(
!
xRet
.
is
()
&&
xDBContext
.
is
()
&&
pWrtSh
)
if
(
!
xRet
.
is
()
&&
m_xDatabaseContext
.
is
()
&&
m_pWrtShell
)
{
SwConnectionData
*
pPtr
=
new
SwConnectionData
();
pPtr
->
sSourceName
=
rSourceName
;
xRet
=
pWrtSh
->
GetDBManager
()
->
RegisterConnection
(
pPtr
->
sSourceName
);
aConnections
.
push_back
(
pPtr
);
xRet
=
m_pWrtShell
->
GetDBManager
()
->
RegisterConnection
(
pPtr
->
sSourceName
);
m_
aConnections
.
push_back
(
pPtr
);
}
return
xRet
;
}
...
...
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