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
f0341738
Kaydet (Commit)
f0341738
authored
Eki 05, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I1f77947b6f9fde4c949d32d524740be0951572af
üst
6e3188ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
dbinsdlg.cxx
sw/source/ui/dbui/dbinsdlg.cxx
+7
-9
dbinsdlg.hxx
sw/source/uibase/inc/dbinsdlg.hxx
+5
-2
No files found.
sw/source/ui/dbui/dbinsdlg.cxx
Dosyayı görüntüle @
f0341738
...
@@ -90,6 +90,8 @@
...
@@ -90,6 +90,8 @@
#include <unomid.h>
#include <unomid.h>
#include <IDocumentMarkAccess.hxx>
#include <IDocumentMarkAccess.hxx>
#include <o3tl/make_unique.hxx>
#include <boost/noncopyable.hpp>
#include <boost/noncopyable.hpp>
#include <memory>
#include <memory>
#include <swuiexp.hxx>
#include <swuiexp.hxx>
...
@@ -856,23 +858,19 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton, void )
...
@@ -856,23 +858,19 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton, void )
static
void
lcl_InsTextInArr
(
const
OUString
&
rText
,
DB_Columns
&
rColArr
)
static
void
lcl_InsTextInArr
(
const
OUString
&
rText
,
DB_Columns
&
rColArr
)
{
{
DB_Column
*
pNew
;
sal_Int32
nSttPos
=
0
,
nFndPos
;
sal_Int32
nSttPos
=
0
,
nFndPos
;
while
(
-
1
!=
(
nFndPos
=
rText
.
indexOf
(
'\x0A'
,
nSttPos
))
)
while
(
-
1
!=
(
nFndPos
=
rText
.
indexOf
(
'\x0A'
,
nSttPos
))
)
{
{
if
(
1
<
nFndPos
)
if
(
1
<
nFndPos
)
{
{
pNew
=
new
DB_Column
(
rText
.
copy
(
nSttPos
,
nFndPos
-
1
)
);
rColArr
.
push_back
(
o3tl
::
make_unique
<
DB_Column
>
(
rText
.
copy
(
nSttPos
,
nFndPos
-
1
)));
rColArr
.
push_back
(
pNew
);
}
}
pNew
=
new
DB_Column
;
rColArr
.
push_back
(
o3tl
::
make_unique
<
DB_Column
>
());
rColArr
.
push_back
(
pNew
);
nSttPos
=
nFndPos
+
1
;
nSttPos
=
nFndPos
+
1
;
}
}
if
(
nSttPos
<
rText
.
getLength
()
)
if
(
nSttPos
<
rText
.
getLength
()
)
{
{
pNew
=
new
DB_Column
(
rText
.
copy
(
nSttPos
)
);
rColArr
.
push_back
(
o3tl
::
make_unique
<
DB_Column
>
(
rText
.
copy
(
nSttPos
)));
rColArr
.
push_back
(
pNew
);
}
}
}
}
...
@@ -940,7 +938,7 @@ bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rText,
...
@@ -940,7 +938,7 @@ bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rText,
else
else
pNew
=
new
DB_Column
(
rFndCol
,
nFormat
);
pNew
=
new
DB_Column
(
rFndCol
,
nFormat
);
rColArr
.
push_back
(
pNew
);
rColArr
.
push_back
(
std
::
unique_ptr
<
DB_Column
>
(
pNew
)
);
}
}
}
}
}
}
...
@@ -1276,7 +1274,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
...
@@ -1276,7 +1274,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
for
(
size_t
n
=
0
;
n
<
nCols
;
++
n
)
for
(
size_t
n
=
0
;
n
<
nCols
;
++
n
)
{
{
DB_Column
*
pDBCol
=
&
aColArr
[
n
]
;
DB_Column
*
pDBCol
=
aColArr
[
n
].
get
()
;
OUString
sIns
;
OUString
sIns
;
switch
(
pDBCol
->
eColType
)
switch
(
pDBCol
->
eColType
)
{
{
...
...
sw/source/uibase/inc/dbinsdlg.hxx
Dosyayı görüntüle @
f0341738
...
@@ -33,9 +33,11 @@
...
@@ -33,9 +33,11 @@
#include <swdbdata.hxx>
#include <swdbdata.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/Sequence.h>
#include <boost/ptr_container/ptr_vector.hpp>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/sorted_vector.hxx>
#include <memory>
#include <vector>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
sdbcx
{
namespace
sdbcx
{
class
XColumnsSupplier
;
class
XColumnsSupplier
;
...
@@ -52,7 +54,8 @@ class SwView;
...
@@ -52,7 +54,8 @@ class SwView;
class
SfxItemSet
;
class
SfxItemSet
;
class
SwTableRep
;
class
SwTableRep
;
struct
DB_Column
;
struct
DB_Column
;
typedef
boost
::
ptr_vector
<
DB_Column
>
DB_Columns
;
typedef
std
::
vector
<
std
::
unique_ptr
<
DB_Column
>>
DB_Columns
;
struct
SwInsDBColumn
struct
SwInsDBColumn
{
{
...
...
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