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
27825a35
Kaydet (Commit)
27825a35
authored
Tem 27, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: replace boost::ptr_set with std::set<std::unique_ptr>
Change-Id: Ie4854f8b0d52771a609aee7ba4620c9308424d64
üst
6be72cc2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
35 deletions
+45
-35
htmlatr.cxx
sw/source/filter/html/htmlatr.cxx
+27
-27
wrthtml.cxx
sw/source/filter/html/wrthtml.cxx
+4
-4
wrthtml.hxx
sw/source/filter/html/wrthtml.hxx
+14
-4
No files found.
sw/source/filter/html/htmlatr.cxx
Dosyayı görüntüle @
27825a35
...
...
@@ -523,12 +523,12 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
}
// Jetzt holen wir das Token und ggf. die Klasse
SwHTMLFormatInfo
aFormatInfo
(
&
rFormat
);
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pTmpInfo
(
new
SwHTMLFormatInfo
(
&
rFormat
)
);
SwHTMLFormatInfo
*
pFormatInfo
;
SwHTMLFormatInfos
::
iterator
it
=
rHWrt
.
aTextCollInfos
.
find
(
aFormat
Info
);
if
(
it
!=
rHWrt
.
aTextCollInfos
.
end
()
)
SwHTMLFormatInfos
::
iterator
it
=
rHWrt
.
m_TextCollInfos
.
find
(
pTmp
Info
);
if
(
it
!=
rHWrt
.
m_TextCollInfos
.
end
()
)
{
pFormatInfo
=
&*
it
;
pFormatInfo
=
it
->
get
()
;
}
else
{
...
...
@@ -536,7 +536,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
rHWrt
.
bCfgOutStyles
,
rHWrt
.
eLang
,
rHWrt
.
nCSS1Script
,
false
);
rHWrt
.
aTextCollInfos
.
insert
(
pFormatInfo
);
rHWrt
.
m_TextCollInfos
.
insert
(
std
::
unique_ptr
<
SwHTMLFormatInfo
>
(
pFormatInfo
)
);
if
(
rHWrt
.
aScriptParaStyles
.
count
(
rFormat
.
GetName
()
)
)
pFormatInfo
->
bScriptDependent
=
true
;
}
...
...
@@ -1590,17 +1590,17 @@ const SwHTMLFormatInfo *HTMLEndPosLst::GetFormatInfo( const SwFormat& rFormat,
SwHTMLFormatInfos
&
rFormatInfos
)
{
SwHTMLFormatInfo
*
pFormatInfo
;
const
SwHTMLFormatInfo
aFormatInfo
(
&
rFormat
);
SwHTMLFormatInfos
::
iterator
it
=
rFormatInfos
.
find
(
aFormat
Info
);
if
(
it
!=
rFormatInfos
.
end
()
)
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pTmpInfo
(
new
SwHTMLFormatInfo
(
&
rFormat
)
);
SwHTMLFormatInfos
::
iterator
it
=
rFormatInfos
.
find
(
pTmp
Info
);
if
(
it
!=
rFormatInfos
.
end
()
)
{
pFormatInfo
=
&*
it
;
pFormatInfo
=
it
->
get
()
;
}
else
{
pFormatInfo
=
new
SwHTMLFormatInfo
(
&
rFormat
,
pDoc
,
pTemplate
,
bOutStyles
);
rFormatInfos
.
insert
(
pFormatInfo
);
rFormatInfos
.
insert
(
std
::
unique_ptr
<
SwHTMLFormatInfo
>
(
pFormatInfo
)
);
if
(
rScriptTextStyles
.
count
(
rFormat
.
GetName
()
)
)
pFormatInfo
->
bScriptDependent
=
true
;
}
...
...
@@ -2309,7 +2309,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if
(
aFormatInfo
.
pItemSet
)
{
aEndPosLst
.
Insert
(
*
aFormatInfo
.
pItemSet
,
0
,
nEnd
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
,
false
,
true
);
rHTMLWrt
.
m_Cha
rFormatInfos
,
false
,
true
);
}
if
(
!
aOutlineText
.
isEmpty
()
||
rHTMLWrt
.
pFormatFootnote
)
...
...
@@ -2368,14 +2368,14 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if
(
rHTMLWrt
.
bWriteAll
)
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nHtStt
+
nOffset
,
nHtEnd
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
else
{
sal_Int32
nTmpStt
=
nHtStt
<
nStrPos
?
nStrPos
:
nHtStt
;
sal_Int32
nTmpEnd
=
nHtEnd
<
nEnd
?
nHtEnd
:
nEnd
;
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nTmpStt
+
nOffset
,
nTmpEnd
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
}
continue
;
// aber nicht ausgeben, das erfolgt spaeter !!
...
...
@@ -2423,7 +2423,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
// Bereich aufspannen werden ignoriert
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nStrPos
+
nOffset
,
*
pHt
->
End
()
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
}
}
else
...
...
@@ -2460,7 +2460,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if
(
RES_DRAWFRMFMT
==
pFrameFormat
->
Which
()
)
aEndPosLst
.
Insert
(
*
static_cast
<
const
SwDrawFrameFormat
*>
(
pFrameFormat
),
nStrPos
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
}
aEndPosLst
.
OutEndAttrs
(
rHTMLWrt
,
nStrPos
+
nOffset
,
&
aContext
);
...
...
@@ -2954,22 +2954,22 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
{
const
SwCharFormat
*
pFormat
=
rWrt
.
pDoc
->
getIDocumentStylePoolAccess
().
GetCharFormatFromPool
(
RES_POOLCHR_INET_NORMAL
);
SwHTMLFormatInfo
aFormatInfo
(
pFormat
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
aChrFormatInfos
.
find
(
a
FormatInfo
);
if
(
it
!=
rHTMLWrt
.
aChrFormatInfos
.
end
()
)
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pFormatInfo
(
new
SwHTMLFormatInfo
(
pFormat
)
);
auto
const
it
=
rHTMLWrt
.
m_CharFormatInfos
.
find
(
p
FormatInfo
);
if
(
it
!=
rHTMLWrt
.
m_CharFormatInfos
.
end
()
)
{
bScriptDependent
=
it
->
bScriptDependent
;
bScriptDependent
=
(
*
it
)
->
bScriptDependent
;
}
}
if
(
!
bScriptDependent
)
{
const
SwCharFormat
*
pFormat
=
rWrt
.
pDoc
->
getIDocumentStylePoolAccess
().
GetCharFormatFromPool
(
RES_POOLCHR_INET_VISIT
);
SwHTMLFormatInfo
aFormatInfo
(
pFormat
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
aChrFormatInfos
.
find
(
a
FormatInfo
);
if
(
it
!=
rHTMLWrt
.
aChrFormatInfos
.
end
()
)
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pFormatInfo
(
new
SwHTMLFormatInfo
(
pFormat
)
);
auto
const
it
=
rHTMLWrt
.
m_CharFormatInfos
.
find
(
p
FormatInfo
);
if
(
it
!=
rHTMLWrt
.
m_CharFormatInfos
.
end
()
)
{
bScriptDependent
=
it
->
bScriptDependent
;
bScriptDependent
=
(
*
it
)
->
bScriptDependent
;
}
}
...
...
@@ -3113,12 +3113,12 @@ static Writer& OutHTML_SwTextCharFormat( Writer& rWrt, const SfxPoolItem& rHt )
return
rWrt
;
}
SwHTMLFormatInfo
aFormatInfo
(
pFormat
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
aChrFormatInfos
.
find
(
aFormatInfo
);
if
(
it
==
rHTMLWrt
.
aCh
rFormatInfos
.
end
())
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pTmpInfo
(
new
SwHTMLFormatInfo
(
pFormat
)
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
m_CharFormatInfos
.
find
(
pTmpInfo
);
if
(
it
==
rHTMLWrt
.
m_Cha
rFormatInfos
.
end
())
return
rWrt
;
const
SwHTMLFormatInfo
*
pFormatInfo
=
&*
it
;
const
SwHTMLFormatInfo
*
pFormatInfo
=
it
->
get
()
;
OSL_ENSURE
(
pFormatInfo
,
"Wieso gint es keine Infos ueber die Zeichenvorlage?"
);
if
(
rHTMLWrt
.
bTagOn
)
...
...
sw/source/filter/html/wrthtml.cxx
Dosyayı görüntüle @
27825a35
...
...
@@ -448,11 +448,11 @@ sal_uLong SwHTMLWriter::WriteStream()
aHTMLControls
.
DeleteAndDestroyAll
();
if
(
!
aChrFormatInfos
.
empty
()
)
aCh
rFormatInfos
.
clear
();
if
(
!
m_CharFormatInfos
.
empty
()
)
m_Cha
rFormatInfos
.
clear
();
if
(
!
aTextCollInfos
.
empty
()
)
a
TextCollInfos
.
clear
();
if
(
!
m_TextCollInfos
.
empty
()
)
m_
TextCollInfos
.
clear
();
if
(
!
aImgMapNames
.
empty
())
aImgMapNames
.
clear
();
...
...
sw/source/filter/html/wrthtml.hxx
Dosyayı görüntüle @
27825a35
...
...
@@ -20,8 +20,9 @@
#define INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX
#include <boost/ptr_container/ptr_vector.hpp>
#include <
boost/ptr_container/ptr_set.hpp
>
#include <
memory
>
#include <vector>
#include <set>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/form/XForm.hpp>
...
...
@@ -263,7 +264,16 @@ struct SwHTMLFormatInfo
};
typedef
boost
::
ptr_set
<
SwHTMLFormatInfo
>
SwHTMLFormatInfos
;
struct
SwHTMLFormatInfo_Less
{
bool
operator
()(
std
::
unique_ptr
<
SwHTMLFormatInfo
>
const
&
lhs
,
std
::
unique_ptr
<
SwHTMLFormatInfo
>
const
&
rhs
)
{
return
(
*
lhs
)
<
(
*
rhs
);
}
};
typedef
std
::
set
<
std
::
unique_ptr
<
SwHTMLFormatInfo
>
,
SwHTMLFormatInfo_Less
>
SwHTMLFormatInfos
;
class
IDocumentStylePoolAccess
;
...
...
@@ -296,8 +306,8 @@ public:
std
::
vector
<
OUString
>
aOutlineMarks
;
std
::
vector
<
sal_uInt32
>
aOutlineMarkPoss
;
HTMLControls
aHTMLControls
;
// die zu schreibenden Forms
SwHTMLFormatInfos
aCh
rFormatInfos
;
SwHTMLFormatInfos
a
TextCollInfos
;
SwHTMLFormatInfos
m_Cha
rFormatInfos
;
SwHTMLFormatInfos
m_
TextCollInfos
;
INetFormats
aINetFormats
;
// die "offenen" INet-Attribute
SwHTMLTextFootnotes
*
pFootEndNotes
;
...
...
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