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
04377915
Kaydet (Commit)
04377915
authored
May 23, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
May 24, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL(SwDSParamArr) to boost::ptr_vector
Change-Id: I685a79cb14b0bb1d44d2013b3dd74150929cdf4b
üst
da9bf1ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
21 deletions
+20
-21
dbmgr.hxx
sw/inc/dbmgr.hxx
+2
-2
docfld.cxx
sw/source/core/doc/docfld.cxx
+2
-2
dbmgr.cxx
sw/source/ui/dbui/dbmgr.cxx
+16
-17
No files found.
sw/inc/dbmgr.hxx
Dosyayı görüntüle @
04377915
...
...
@@ -39,6 +39,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
sdbc
{
class
XConnection
;
...
...
@@ -144,8 +145,7 @@ struct SwDSParam : public SwDBData
bAfterSelection
=
sal_True
;
}
};
typedef
SwDSParam
*
SwDSParamPtr
;
SV_DECL_PTRARR_DEL
(
SwDSParamArr
,
SwDSParamPtr
,
0
)
typedef
boost
::
ptr_vector
<
SwDSParam
>
SwDSParamArr
;
struct
SwMergeDescriptor
{
...
...
sw/source/core/doc/docfld.cxx
Dosyayı görüntüle @
04377915
...
...
@@ -1759,9 +1759,9 @@ void SwDoc::GetAllDBNames( std::vector<String>& rAllDBNames )
SwNewDBMgr
*
pMgr
=
GetNewDBMgr
();
const
SwDSParamArr
&
rArr
=
pMgr
->
GetDSParamArray
();
for
(
sal_uInt16
i
=
0
;
i
<
rArr
.
Count
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
rArr
.
size
();
i
++
)
{
SwDSParam
*
pParam
=
rArr
[
i
];
const
SwDSParam
*
pParam
=
&
rArr
[
i
];
String
*
pStr
=
new
String
(
pParam
->
sDataSource
);
(
*
pStr
)
+=
DB_DELIM
;
(
*
pStr
)
+=
(
String
)
pParam
->
sCommand
;
...
...
sw/source/ui/dbui/dbmgr.cxx
Dosyayı görüntüle @
04377915
...
...
@@ -152,7 +152,6 @@ using namespace ::com::sun::star::ui::dialogs;
#define DB_SEP_RETURN 2
#define DB_SEP_NEWLINE 3
SV_IMPL_PTRARR
(
SwDSParamArr
,
SwDSParamPtr
);
const
sal_Char
cCursor
[]
=
"Cursor"
;
const
sal_Char
cCommand
[]
=
"Command"
;
const
sal_Char
cCommandType
[]
=
"CommandType"
;
...
...
@@ -367,7 +366,7 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
else
{
SwDSParam
*
pInsert
=
new
SwDSParam
(
*
pImpl
->
pMergeData
);
aDataSourceParams
.
Insert
(
pInsert
,
aDataSourceParams
.
Count
()
);
aDataSourceParams
.
push_back
(
pInsert
);
try
{
uno
::
Reference
<
XComponent
>
xComponent
(
pInsert
->
xConnection
,
UNO_QUERY
);
...
...
@@ -730,9 +729,9 @@ SwNewDBMgr::SwNewDBMgr() :
SwNewDBMgr
::~
SwNewDBMgr
()
{
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
Count
();
nPos
++
)
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
size
();
nPos
++
)
{
SwDSParam
*
pParam
=
aDataSourceParams
[
nPos
];
SwDSParam
*
pParam
=
&
aDataSourceParams
[
nPos
];
if
(
pParam
->
xConnection
.
is
())
{
try
...
...
@@ -2070,9 +2069,9 @@ void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge)
{
//the only thing done here is to reset the selection index
//all connections stay open
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
Count
();
nPos
++
)
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
size
();
nPos
++
)
{
SwDSParam
*
pParam
=
aDataSourceParams
[
nPos
];
SwDSParam
*
pParam
=
&
aDataSourceParams
[
nPos
];
if
(
bIncludingMerge
||
pParam
!=
pImpl
->
pMergeData
)
{
pParam
->
nSelectionIndex
=
0
;
...
...
@@ -2101,9 +2100,9 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
}
SwDSParam
*
pFound
=
0
;
for
(
sal_uInt16
nPos
=
aDataSourceParams
.
Count
();
nPos
;
nPos
--
)
for
(
sal_uInt16
nPos
=
aDataSourceParams
.
size
();
nPos
;
nPos
--
)
{
SwDSParam
*
pParam
=
aDataSourceParams
[
nPos
-
1
];
SwDSParam
*
pParam
=
&
aDataSourceParams
[
nPos
-
1
];
if
(
rData
.
sDataSource
==
pParam
->
sDataSource
&&
rData
.
sCommand
==
pParam
->
sCommand
&&
(
rData
.
nCommandType
==
-
1
||
rData
.
nCommandType
==
pParam
->
nCommandType
||
...
...
@@ -2123,7 +2122,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
if
(
!
pFound
)
{
pFound
=
new
SwDSParam
(
rData
);
aDataSourceParams
.
Insert
(
pFound
,
aDataSourceParams
.
Count
()
);
aDataSourceParams
.
push_back
(
pFound
);
try
{
uno
::
Reference
<
XComponent
>
xComponent
(
pFound
->
xConnection
,
UNO_QUERY
);
...
...
@@ -2146,9 +2145,9 @@ SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_B
return
pImpl
->
pMergeData
;
}
SwDSParam
*
pFound
=
0
;
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
Count
();
nPos
++
)
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
size
();
nPos
++
)
{
SwDSParam
*
pParam
=
aDataSourceParams
[
nPos
];
SwDSParam
*
pParam
=
&
aDataSourceParams
[
nPos
];
if
(
rDataSource
==
pParam
->
sDataSource
)
{
pFound
=
pParam
;
...
...
@@ -2160,7 +2159,7 @@ SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_B
SwDBData
aData
;
aData
.
sDataSource
=
rDataSource
;
pFound
=
new
SwDSParam
(
aData
);
aDataSourceParams
.
Insert
(
pFound
,
aDataSourceParams
.
Count
()
);
aDataSourceParams
.
push_back
(
pFound
);
try
{
uno
::
Reference
<
XComponent
>
xComponent
(
pFound
->
xConnection
,
UNO_QUERY
);
...
...
@@ -2524,9 +2523,9 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
}
if
(
pFound
)
{
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
Count
();
nPos
++
)
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aDataSourceParams
.
size
();
nPos
++
)
{
SwDSParam
*
pParam
=
aDataSourceParams
[
nPos
];
SwDSParam
*
pParam
=
&
aDataSourceParams
[
nPos
];
if
(
pParam
==
pFound
)
{
try
...
...
@@ -2968,13 +2967,13 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource )
{
::
SolarMutexGuard
aGuard
;
uno
::
Reference
<
XConnection
>
xSource
(
rSource
.
Source
,
UNO_QUERY
);
for
(
sal_uInt16
nPos
=
rDBMgr
.
aDataSourceParams
.
Count
();
nPos
;
nPos
--
)
for
(
sal_uInt16
nPos
=
rDBMgr
.
aDataSourceParams
.
size
();
nPos
;
nPos
--
)
{
SwDSParam
*
pParam
=
rDBMgr
.
aDataSourceParams
[
nPos
-
1
];
SwDSParam
*
pParam
=
&
rDBMgr
.
aDataSourceParams
[
nPos
-
1
];
if
(
pParam
->
xConnection
.
is
()
&&
(
xSource
==
pParam
->
xConnection
))
{
rDBMgr
.
aDataSourceParams
.
DeleteAndDestroy
(
nPos
-
1
);
rDBMgr
.
aDataSourceParams
.
erase
(
rDBMgr
.
aDataSourceParams
.
begin
()
+
nPos
-
1
);
}
}
}
...
...
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