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
ea2ae023
Kaydet (Commit)
ea2ae023
authored
Kas 10, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
framework: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: If9981b141a591f23e03479c90694e6ffa78f2cb8
üst
2a2b9920
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
imagesconfiguration.hxx
framework/inc/xml/imagesconfiguration.hxx
+2
-1
imagemanagerimpl.cxx
framework/source/uiconfiguration/imagemanagerimpl.cxx
+3
-4
imagesdocumenthandler.cxx
framework/source/xml/imagesdocumenthandler.cxx
+3
-5
No files found.
framework/inc/xml/imagesconfiguration.hxx
Dosyayı görüntüle @
ea2ae023
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <vector>
#include <vector>
#include <memory>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
namespace
framework
namespace
framework
...
@@ -54,7 +55,7 @@ struct ExternalImageItemDescriptor
...
@@ -54,7 +55,7 @@ struct ExternalImageItemDescriptor
OUString
aURL
;
// a URL to an external bitmap
OUString
aURL
;
// a URL to an external bitmap
};
};
typedef
boost
::
ptr_vector
<
ImageItemDescriptor
>
ImageItemListDescriptor
;
typedef
std
::
vector
<
std
::
unique_ptr
<
ImageItemDescriptor
>
>
ImageItemListDescriptor
;
typedef
boost
::
ptr_vector
<
ExternalImageItemDescriptor
>
ExternalImageItemListDescriptor
;
typedef
boost
::
ptr_vector
<
ExternalImageItemDescriptor
>
ExternalImageItemListDescriptor
;
...
...
framework/source/uiconfiguration/imagemanagerimpl.cxx
Dosyayı görüntüle @
ea2ae023
...
@@ -446,7 +446,7 @@ bool ImageManagerImpl::implts_loadUserImages(
...
@@ -446,7 +446,7 @@ bool ImageManagerImpl::implts_loadUserImages(
aUserImagesVector
.
reserve
(
nCount
);
aUserImagesVector
.
reserve
(
nCount
);
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
i
++
)
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
i
++
)
{
{
const
ImageItemDescriptor
*
pItem
=
&
(
*
pList
->
pImageItemList
)[
i
]
;
const
ImageItemDescriptor
*
pItem
=
(
*
pList
->
pImageItemList
)[
i
].
get
()
;
aUserImagesVector
.
push_back
(
pItem
->
aCommandURL
);
aUserImagesVector
.
push_back
(
pItem
->
aCommandURL
);
}
}
...
@@ -517,11 +517,10 @@ bool ImageManagerImpl::implts_storeUserImages(
...
@@ -517,11 +517,10 @@ bool ImageManagerImpl::implts_storeUserImages(
pList
->
pImageItemList
=
new
ImageItemListDescriptor
;
pList
->
pImageItemList
=
new
ImageItemListDescriptor
;
for
(
sal_uInt16
i
=
0
;
i
<
pImageList
->
GetImageCount
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
pImageList
->
GetImageCount
();
i
++
)
{
{
ImageItemDescriptor
*
pItem
=
new
::
framework
::
ImageItemDescriptor
;
ImageItemDescriptor
*
pItem
=
new
ImageItemDescriptor
;
pItem
->
nIndex
=
i
;
pItem
->
nIndex
=
i
;
pItem
->
aCommandURL
=
pImageList
->
GetImageName
(
i
);
pItem
->
aCommandURL
=
pImageList
->
GetImageName
(
i
);
pList
->
pImageItemList
->
push_back
(
pItem
);
pList
->
pImageItemList
->
push_back
(
std
::
unique_ptr
<
ImageItemDescriptor
>
(
pItem
)
);
}
}
pList
->
aURL
=
"Bitmaps/"
+
OUString
::
createFromAscii
(
BITMAP_FILE_NAMES
[
nImageType
]);
pList
->
aURL
=
"Bitmaps/"
+
OUString
::
createFromAscii
(
BITMAP_FILE_NAMES
[
nImageType
]);
...
...
framework/source/xml/imagesdocumenthandler.cxx
Dosyayı görüntüle @
ea2ae023
...
@@ -309,7 +309,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
...
@@ -309,7 +309,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
m_bImageStartFound
=
true
;
m_bImageStartFound
=
true
;
// Create new image item descriptor
// Create new image item descriptor
ImageItemDescriptor
*
pItem
=
new
ImageItemDescriptor
;
std
::
unique_ptr
<
ImageItemDescriptor
>
pItem
(
new
ImageItemDescriptor
)
;
pItem
->
nIndex
=
-
1
;
pItem
->
nIndex
=
-
1
;
// Read attributes for this image definition
// Read attributes for this image definition
...
@@ -341,7 +341,6 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
...
@@ -341,7 +341,6 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
// Check required attribute "bitmap-index"
// Check required attribute "bitmap-index"
if
(
pItem
->
nIndex
<
0
)
if
(
pItem
->
nIndex
<
0
)
{
{
delete
pItem
;
delete
m_pImages
;
delete
m_pImages
;
m_pImages
=
nullptr
;
m_pImages
=
nullptr
;
...
@@ -353,7 +352,6 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
...
@@ -353,7 +352,6 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
// Check required attribute "command"
// Check required attribute "command"
if
(
pItem
->
aCommandURL
.
isEmpty
()
)
if
(
pItem
->
aCommandURL
.
isEmpty
()
)
{
{
delete
pItem
;
delete
m_pImages
;
delete
m_pImages
;
m_pImages
=
nullptr
;
m_pImages
=
nullptr
;
...
@@ -362,7 +360,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
...
@@ -362,7 +360,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement(
throw
SAXException
(
aErrorMessage
,
Reference
<
XInterface
>
(),
Any
()
);
throw
SAXException
(
aErrorMessage
,
Reference
<
XInterface
>
(),
Any
()
);
}
}
m_pImages
->
pImageItemList
->
push_back
(
pItem
);
m_pImages
->
pImageItemList
->
push_back
(
std
::
move
(
pItem
)
);
}
}
break
;
break
;
...
@@ -729,7 +727,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
...
@@ -729,7 +727,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
if
(
pImageItemList
)
if
(
pImageItemList
)
{
{
for
(
size_t
i
=
0
;
i
<
pImageItemList
->
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
pImageItemList
->
size
();
i
++
)
WriteImage
(
&
(
*
pImageItemList
)[
i
]
);
WriteImage
(
(
*
pImageItemList
)[
i
].
get
()
);
}
}
m_xWriteDocumentHandler
->
endElement
(
ELEMENT_NS_IMAGES
);
m_xWriteDocumentHandler
->
endElement
(
ELEMENT_NS_IMAGES
);
...
...
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