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
d1bda375
Kaydet (Commit)
d1bda375
authored
Kas 10, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
extensions: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Ie19e898e3a5e558906cfad841c01d6d9b380b18b
üst
5de806fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
bibconfig.cxx
extensions/source/bibliography/bibconfig.cxx
+6
-6
bibconfig.hxx
extensions/source/bibliography/bibconfig.hxx
+3
-2
No files found.
extensions/source/bibliography/bibconfig.cxx
Dosyayı görüntüle @
d1bda375
...
...
@@ -26,6 +26,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <comphelper/processfactory.hxx>
#include <o3tl/make_unique.hxx>
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
beans
;
...
...
@@ -185,7 +186,7 @@ BibConfig::BibConfig()
pMapping
->
aColumnPairs
[
nSetMapping
++
].
sRealColumnName
=
sTempReal
;
}
}
pMappingsArr
->
push_back
(
pMapping
);
pMappingsArr
->
push_back
(
std
::
unique_ptr
<
Mapping
>
(
pMapping
)
);
}
}
}
...
...
@@ -250,7 +251,7 @@ void BibConfig::ImplCommit()
OUString
sCommandType
(
"CommandType"
);
for
(
sal_Int32
i
=
0
;
i
<
(
sal_Int32
)
pMappingsArr
->
size
();
i
++
)
{
const
Mapping
*
pMapping
=
&
(
*
pMappingsArr
)[
i
]
;
const
Mapping
*
pMapping
=
(
*
pMappingsArr
)[
i
].
get
()
;
OUString
sPrefix
(
cDataSourceHistory
);
sPrefix
+=
"/_"
;
sPrefix
+=
OUString
::
number
(
i
);
...
...
@@ -296,7 +297,7 @@ const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const
{
for
(
size_t
i
=
0
;
i
<
pMappingsArr
->
size
();
i
++
)
{
Mapping
&
rMapping
=
(
*
pMappingsArr
)[
i
]
;
Mapping
&
rMapping
=
*
(
*
pMappingsArr
)[
i
].
get
()
;
bool
bURLEqual
=
rDesc
.
sDataSource
.
equals
(
rMapping
.
sURL
);
if
(
rDesc
.
sTableOrQuery
==
rMapping
.
sTableName
&&
bURLEqual
)
return
&
rMapping
;
...
...
@@ -308,7 +309,7 @@ void BibConfig::SetMapping(const BibDBDescriptor& rDesc, const Mapping* pSetMapp
{
for
(
size_t
i
=
0
;
i
<
pMappingsArr
->
size
();
i
++
)
{
Mapping
&
rMapping
=
(
*
pMappingsArr
)[
i
]
;
Mapping
&
rMapping
=
*
(
*
pMappingsArr
)[
i
].
get
()
;
bool
bURLEqual
=
rDesc
.
sDataSource
.
equals
(
rMapping
.
sURL
);
if
(
rDesc
.
sTableOrQuery
==
rMapping
.
sTableName
&&
bURLEqual
)
{
...
...
@@ -316,8 +317,7 @@ void BibConfig::SetMapping(const BibDBDescriptor& rDesc, const Mapping* pSetMapp
break
;
}
}
Mapping
*
pNew
=
new
Mapping
(
*
pSetMapping
);
pMappingsArr
->
push_back
(
pNew
);
pMappingsArr
->
push_back
(
o3tl
::
make_unique
<
Mapping
>
(
*
pSetMapping
));
SetModified
();
}
...
...
extensions/source/bibliography/bibconfig.hxx
Dosyayı görüntüle @
d1bda375
...
...
@@ -21,10 +21,11 @@
#define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBCONFIG_HXX
#include <unotools/configitem.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#include <memory>
struct
Mapping
;
typedef
boost
::
ptr_vector
<
Mapping
>
MappingArray
;
typedef
std
::
vector
<
std
::
unique_ptr
<
Mapping
>
>
MappingArray
;
...
...
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