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
fc90cf2a
Kaydet (Commit)
fc90cf2a
authored
Eki 22, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ucb: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I05c64aaed4aaea813b369dccc721f9d10167f161
üst
c06e2fcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
28 deletions
+27
-28
vclxtoolkit.cxx
toolkit/source/awt/vclxtoolkit.cxx
+0
-2
webdavdatasupplier.cxx
ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx
+27
-26
No files found.
toolkit/source/awt/vclxtoolkit.cxx
Dosyayı görüntüle @
fc90cf2a
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include <boost/ptr_container/ptr_vector.hpp>
#include <stdio.h>
#include <stdio.h>
#ifdef WNT
#ifdef WNT
#include <prewin.h>
#include <prewin.h>
...
...
ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx
Dosyayı görüntüle @
fc90cf2a
...
@@ -32,12 +32,14 @@
...
@@ -32,12 +32,14 @@
**************************************************************************
**************************************************************************
*************************************************************************/
*************************************************************************/
#include <boost/ptr_container/ptr_vector.hpp>
#include <osl/diagnose.h>
#include <osl/diagnose.h>
#include <o3tl/make_unique.hxx>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/providerhelper.hxx>
#include <ucbhelper/providerhelper.hxx>
#include <memory>
#include <memory>
#include <vector>
#include "webdavdatasupplier.hxx"
#include "webdavdatasupplier.hxx"
#include "webdavcontent.hxx"
#include "webdavcontent.hxx"
#include "ContentProperties.hxx"
#include "ContentProperties.hxx"
...
@@ -75,7 +77,7 @@ struct ResultListEntry
...
@@ -75,7 +77,7 @@ struct ResultListEntry
typedef
boost
::
ptr_vector
<
ResultListEntry
>
ResultList
;
typedef
std
::
vector
<
std
::
unique_ptr
<
ResultListEntry
>
>
ResultList
;
...
@@ -86,7 +88,7 @@ typedef boost::ptr_vector<ResultListEntry> ResultList;
...
@@ -86,7 +88,7 @@ typedef boost::ptr_vector<ResultListEntry> ResultList;
struct
DataSupplier_Impl
struct
DataSupplier_Impl
{
{
osl
::
Mutex
m_aMutex
;
osl
::
Mutex
m_aMutex
;
ResultList
m_
a
Results
;
ResultList
m_Results
;
rtl
::
Reference
<
Content
>
m_xContent
;
rtl
::
Reference
<
Content
>
m_xContent
;
uno
::
Reference
<
uno
::
XComponentContext
>
m_xContext
;
uno
::
Reference
<
uno
::
XComponentContext
>
m_xContext
;
sal_Int32
m_nOpenMode
;
sal_Int32
m_nOpenMode
;
...
@@ -131,9 +133,9 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
...
@@ -131,9 +133,9 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
{
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
if
(
nIndex
<
m_pImpl
->
m_aResults
.
size
()
)
if
(
nIndex
<
m_pImpl
->
m_Results
.
size
()
)
{
{
OUString
aId
=
m_pImpl
->
m_
aResults
[
nIndex
].
aId
;
OUString
aId
=
m_pImpl
->
m_
Results
[
nIndex
]
->
aId
;
if
(
!
aId
.
isEmpty
()
)
if
(
!
aId
.
isEmpty
()
)
{
{
// Already cached.
// Already cached.
...
@@ -145,8 +147,7 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
...
@@ -145,8 +147,7 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
{
{
OUString
aId
=
m_pImpl
->
m_xContent
->
getResourceAccess
().
getURL
();
OUString
aId
=
m_pImpl
->
m_xContent
->
getResourceAccess
().
getURL
();
const
ContentProperties
&
props
const
ContentProperties
&
props
(
*
(
m_pImpl
->
m_Results
[
nIndex
]
->
pData
));
=
*
(
m_pImpl
->
m_aResults
[
nIndex
].
pData
);
if
(
(
aId
.
lastIndexOf
(
'/'
)
+
1
)
!=
aId
.
getLength
()
)
if
(
(
aId
.
lastIndexOf
(
'/'
)
+
1
)
!=
aId
.
getLength
()
)
aId
+=
"/"
;
aId
+=
"/"
;
...
@@ -156,7 +157,7 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
...
@@ -156,7 +157,7 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
if
(
props
.
isTrailingSlash
()
)
if
(
props
.
isTrailingSlash
()
)
aId
+=
"/"
;
aId
+=
"/"
;
m_pImpl
->
m_
aResults
[
nIndex
].
aId
=
aId
;
m_pImpl
->
m_
Results
[
nIndex
]
->
aId
=
aId
;
return
aId
;
return
aId
;
}
}
return
OUString
();
return
OUString
();
...
@@ -169,10 +170,10 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
...
@@ -169,10 +170,10 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
{
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
if
(
nIndex
<
m_pImpl
->
m_aResults
.
size
()
)
if
(
nIndex
<
m_pImpl
->
m_Results
.
size
()
)
{
{
uno
::
Reference
<
ucb
::
XContentIdentifier
>
xId
uno
::
Reference
<
ucb
::
XContentIdentifier
>
xId
=
m_pImpl
->
m_
aResults
[
nIndex
].
xId
;
=
m_pImpl
->
m_
Results
[
nIndex
]
->
xId
;
if
(
xId
.
is
()
)
if
(
xId
.
is
()
)
{
{
// Already cached.
// Already cached.
...
@@ -185,7 +186,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
...
@@ -185,7 +186,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
{
{
uno
::
Reference
<
ucb
::
XContentIdentifier
>
xId
uno
::
Reference
<
ucb
::
XContentIdentifier
>
xId
=
new
::
ucbhelper
::
ContentIdentifier
(
aId
);
=
new
::
ucbhelper
::
ContentIdentifier
(
aId
);
m_pImpl
->
m_
aResults
[
nIndex
].
xId
=
xId
;
m_pImpl
->
m_
Results
[
nIndex
]
->
xId
=
xId
;
return
xId
;
return
xId
;
}
}
return
uno
::
Reference
<
ucb
::
XContentIdentifier
>
();
return
uno
::
Reference
<
ucb
::
XContentIdentifier
>
();
...
@@ -198,10 +199,10 @@ DataSupplier::queryContent( sal_uInt32 nIndex )
...
@@ -198,10 +199,10 @@ DataSupplier::queryContent( sal_uInt32 nIndex )
{
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
if
(
nIndex
<
m_pImpl
->
m_aResults
.
size
()
)
if
(
nIndex
<
m_pImpl
->
m_Results
.
size
()
)
{
{
uno
::
Reference
<
ucb
::
XContent
>
xContent
uno
::
Reference
<
ucb
::
XContent
>
xContent
=
m_pImpl
->
m_
aResults
[
nIndex
].
xContent
;
=
m_pImpl
->
m_
Results
[
nIndex
]
->
xContent
;
if
(
xContent
.
is
()
)
if
(
xContent
.
is
()
)
{
{
// Already cached.
// Already cached.
...
@@ -217,7 +218,7 @@ DataSupplier::queryContent( sal_uInt32 nIndex )
...
@@ -217,7 +218,7 @@ DataSupplier::queryContent( sal_uInt32 nIndex )
{
{
uno
::
Reference
<
ucb
::
XContent
>
xContent
uno
::
Reference
<
ucb
::
XContent
>
xContent
=
m_pImpl
->
m_xContent
->
getProvider
()
->
queryContent
(
xId
);
=
m_pImpl
->
m_xContent
->
getProvider
()
->
queryContent
(
xId
);
m_pImpl
->
m_
aResults
[
nIndex
].
xContent
=
xContent
;
m_pImpl
->
m_
Results
[
nIndex
]
->
xContent
=
xContent
;
return
xContent
;
return
xContent
;
}
}
...
@@ -234,7 +235,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex )
...
@@ -234,7 +235,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex )
{
{
osl
::
ClearableGuard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
osl
::
ClearableGuard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
if
(
m_pImpl
->
m_aResults
.
size
()
>
nIndex
)
if
(
nIndex
<
m_pImpl
->
m_Results
.
size
()
)
{
{
// Result already present.
// Result already present.
return
true
;
return
true
;
...
@@ -243,7 +244,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex )
...
@@ -243,7 +244,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex )
// Obtain values...
// Obtain values...
if
(
getData
()
)
if
(
getData
()
)
{
{
if
(
m_pImpl
->
m_aResults
.
size
()
>
nIndex
)
if
(
nIndex
<
m_pImpl
->
m_Results
.
size
()
)
{
{
// Result already present.
// Result already present.
return
true
;
return
true
;
...
@@ -260,14 +261,14 @@ sal_uInt32 DataSupplier::totalCount()
...
@@ -260,14 +261,14 @@ sal_uInt32 DataSupplier::totalCount()
// Obtain values...
// Obtain values...
getData
();
getData
();
return
m_pImpl
->
m_
a
Results
.
size
();
return
m_pImpl
->
m_Results
.
size
();
}
}
// virtual
// virtual
sal_uInt32
DataSupplier
::
currentCount
()
sal_uInt32
DataSupplier
::
currentCount
()
{
{
return
m_pImpl
->
m_
a
Results
.
size
();
return
m_pImpl
->
m_Results
.
size
();
}
}
...
@@ -284,9 +285,9 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues(
...
@@ -284,9 +285,9 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues(
{
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
if
(
nIndex
<
m_pImpl
->
m_aResults
.
size
()
)
if
(
nIndex
<
m_pImpl
->
m_Results
.
size
()
)
{
{
uno
::
Reference
<
sdbc
::
XRow
>
xRow
=
m_pImpl
->
m_
aResults
[
nIndex
].
xRow
;
uno
::
Reference
<
sdbc
::
XRow
>
xRow
=
m_pImpl
->
m_
Results
[
nIndex
]
->
xRow
;
if
(
xRow
.
is
()
)
if
(
xRow
.
is
()
)
{
{
// Already cached.
// Already cached.
...
@@ -300,11 +301,11 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues(
...
@@ -300,11 +301,11 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues(
=
Content
::
getPropertyValues
(
=
Content
::
getPropertyValues
(
m_pImpl
->
m_xContext
,
m_pImpl
->
m_xContext
,
getResultSet
()
->
getProperties
(),
getResultSet
()
->
getProperties
(),
*
(
m_pImpl
->
m_
aResults
[
nIndex
].
pData
),
*
(
m_pImpl
->
m_
Results
[
nIndex
]
->
pData
),
rtl
::
Reference
<
::
ucbhelper
::
ContentProviderImplHelper
>
(
rtl
::
Reference
<
::
ucbhelper
::
ContentProviderImplHelper
>
(
m_pImpl
->
m_xContent
->
getProvider
().
get
()
),
m_pImpl
->
m_xContent
->
getProvider
().
get
()
),
queryContentIdentifierString
(
nIndex
)
);
queryContentIdentifierString
(
nIndex
)
);
m_pImpl
->
m_
aResults
[
nIndex
].
xRow
=
xRow
;
m_pImpl
->
m_
Results
[
nIndex
]
->
xRow
=
xRow
;
return
xRow
;
return
xRow
;
}
}
...
@@ -317,8 +318,8 @@ void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
...
@@ -317,8 +318,8 @@ void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
{
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
m_pImpl
->
m_aMutex
);
if
(
nIndex
<
m_pImpl
->
m_aResults
.
size
()
)
if
(
nIndex
<
m_pImpl
->
m_Results
.
size
()
)
m_pImpl
->
m_
aResults
[
nIndex
].
xRow
=
uno
::
Reference
<
sdbc
::
XRow
>
();
m_pImpl
->
m_
Results
[
nIndex
]
->
xRow
=
uno
::
Reference
<
sdbc
::
XRow
>
();
}
}
...
@@ -470,8 +471,8 @@ bool DataSupplier::getData()
...
@@ -470,8 +471,8 @@ bool DataSupplier::getData()
break
;
break
;
}
}
m_pImpl
->
m_
a
Results
.
push_back
(
m_pImpl
->
m_Results
.
push_back
(
new
ResultListEntry
(
pContentProperties
)
);
o3tl
::
make_unique
<
ResultListEntry
>
(
pContentProperties
)
);
}
}
}
}
catch
(
DAVException
const
&
)
catch
(
DAVException
const
&
)
...
...
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