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
6f1e2513
Kaydet (Commit)
6f1e2513
authored
Ara 17, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: Id56046d135e7d1acdd7e705b5f0c40f71427c121
üst
fa90bbb7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
htmlpars.cxx
sc/source/filter/html/htmlpars.cxx
+8
-8
htmlpars.hxx
sc/source/filter/inc/htmlpars.hxx
+2
-3
No files found.
sc/source/filter/html/htmlpars.cxx
Dosyayı görüntüle @
6f1e2513
...
...
@@ -20,7 +20,6 @@
#include <sal/config.h>
#include <comphelper/string.hxx>
#include <o3tl/ptr_container.hxx>
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
...
...
@@ -83,19 +82,20 @@ void ScHTMLStyles::add(const char* pElemName, size_t nElemName, const char* pCla
if
(
pClassName
)
{
// Both element and class names given.
ElemsType
::
iterator
itrElem
=
m
a
ElemProps
.
find
(
aElem
);
if
(
itrElem
==
m
a
ElemProps
.
end
())
ElemsType
::
iterator
itrElem
=
m
_
ElemProps
.
find
(
aElem
);
if
(
itrElem
==
m
_
ElemProps
.
end
())
{
// new element
std
::
unique_ptr
<
NamePropsType
>
p
(
new
NamePropsType
);
std
::
pair
<
ElemsType
::
iterator
,
bool
>
r
=
o3tl
::
ptr_container
::
insert
(
maElemProps
,
aElem
,
std
::
move
(
p
));
std
::
pair
<
ElemsType
::
iterator
,
bool
>
r
=
m_ElemProps
.
insert
(
std
::
make_pair
(
aElem
,
std
::
move
(
p
)));
if
(
!
r
.
second
)
// insertion failed.
return
;
itrElem
=
r
.
first
;
}
NamePropsType
*
pClsProps
=
itrElem
->
second
;
NamePropsType
*
const
pClsProps
=
itrElem
->
second
.
get
()
;
OUString
aClass
(
pClassName
,
nClassName
,
RTL_TEXTENCODING_UTF8
);
aClass
=
aClass
.
toAsciiLowerCase
();
insertProp
(
*
pClsProps
,
aClass
,
aProp
,
aValue
);
...
...
@@ -123,10 +123,10 @@ const OUString& ScHTMLStyles::getPropertyValue(
{
// First, look into the element-class storage.
{
ElemsType
::
const_iterator
itr
=
ma
ElemProps
.
find
(
rElem
);
if
(
itr
!=
m
a
ElemProps
.
end
())
auto
const
itr
=
m_
ElemProps
.
find
(
rElem
);
if
(
itr
!=
m
_
ElemProps
.
end
())
{
const
NamePropsType
*
pClasses
=
itr
->
second
;
const
NamePropsType
*
const
pClasses
=
itr
->
second
.
get
()
;
NamePropsType
::
const_iterator
itr2
=
pClasses
->
find
(
rClass
);
if
(
itr2
!=
pClasses
->
end
())
{
...
...
sc/source/filter/inc/htmlpars.hxx
Dosyayı görüntüle @
6f1e2513
...
...
@@ -27,7 +27,6 @@
#include <unordered_map>
#include <vector>
#include <o3tl/sorted_vector.hxx>
#include <boost/ptr_container/ptr_map.hpp>
#include "rangelst.hxx"
#include "eeparser.hxx"
...
...
@@ -50,11 +49,11 @@ class ScHTMLStyles
{
typedef
std
::
unordered_map
<
OUString
,
OUString
,
OUStringHash
>
PropsType
;
typedef
::
std
::
map
<
OUString
,
std
::
unique_ptr
<
PropsType
>>
NamePropsType
;
typedef
::
boost
::
ptr_map
<
OUString
,
NamePropsType
>
ElemsType
;
typedef
::
std
::
map
<
OUString
,
std
::
unique_ptr
<
NamePropsType
>
>
ElemsType
;
NamePropsType
m_GlobalProps
;
/// global properties (for a given class for all elements)
NamePropsType
m_ElemGlobalProps
;
/// element global properties (no class specified)
ElemsType
m
a
ElemProps
;
/// element to class to properties (both element and class are given)
ElemsType
m
_
ElemProps
;
/// element to class to properties (both element and class are given)
const
OUString
maEmpty
;
/// just a persistent empty string.
public
:
ScHTMLStyles
();
...
...
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