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
bf569c3f
Kaydet (Commit)
bf569c3f
authored
Ara 14, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: use auto when initializing with a cast in rtfexport
Change-Id: I48e7f1e27ca7a221e06891e6c4ac543deaf32fa0
üst
d2c2388c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
rtfexport.cxx
sw/source/filter/ww8/rtfexport.cxx
+19
-18
No files found.
sw/source/filter/ww8/rtfexport.cxx
Dosyayı görüntüle @
bf569c3f
...
...
@@ -47,6 +47,7 @@
#include <svx/xflclit.hxx>
#include <editeng/hyphenzoneitem.hxx>
#include <fmtmeta.hxx>
#include <o3tl/make_unique.hxx>
using
namespace
::
com
::
sun
::
star
;
...
...
@@ -679,7 +680,7 @@ void RtfExport::ExportDocument_Impl()
sal_uInt32
const
nMaxItem
=
rPool
.
GetItemCount2
(
RES_PROTECT
);
for
(
sal_uInt32
n
=
0
;
n
<
nMaxItem
;
++
n
)
{
const
SvxProtectItem
*
pProtect
=
static_cast
<
const
SvxProtectItem
*>
(
rPool
.
GetItem2
(
RES_PROTECT
,
n
));
auto
pProtect
=
static_cast
<
const
SvxProtectItem
*>
(
rPool
.
GetItem2
(
RES_PROTECT
,
n
));
if
(
pProtect
&&
pProtect
->
IsContentProtected
())
{
Strm
().
WriteCharPtr
(
OOO_STRING_SVTOOLS_RTF_FORMPROT
);
...
...
@@ -959,13 +960,13 @@ RtfExport::RtfExport(RtfExportFilter* pFilter, SwDoc* pDocument, SwPaM* pCurrent
{
m_bExportModeRTF
=
true
;
// the attribute output for the document
m_pAttrOutput
.
reset
(
new
RtfAttributeOutput
(
*
this
)
);
m_pAttrOutput
=
o3tl
::
make_unique
<
RtfAttributeOutput
>
(
*
this
);
// that just causes problems for RTF
m_bSubstituteBullets
=
false
;
// needed to have a complete font table
m_aFontHelper
.
bLoadAllFonts
=
true
;
// the related SdrExport
m_pSdrExport
.
reset
(
new
RtfSdrExport
(
*
this
)
);
m_pSdrExport
=
o3tl
::
make_unique
<
RtfSdrExport
>
(
*
this
);
if
(
!
m_pWriter
)
m_pWriter
=
&
m_pFilter
->
m_aWriter
;
...
...
@@ -983,7 +984,7 @@ SvStream& RtfExport::Strm()
void
RtfExport
::
setStream
()
{
m_pStream
.
reset
(
new
SvMemoryStream
()
);
m_pStream
=
o3tl
::
make_unique
<
SvMemoryStream
>
(
);
}
OString
RtfExport
::
getStream
()
...
...
@@ -1114,7 +1115,7 @@ void RtfExport::OutColorTable()
// char color
{
const
SvxColorItem
*
pCol
=
static_cast
<
const
SvxColorItem
*>
(
GetDfltAttr
(
RES_CHRATR_COLOR
));
auto
pCol
=
static_cast
<
const
SvxColorItem
*>
(
GetDfltAttr
(
RES_CHRATR_COLOR
));
InsColor
(
pCol
->
GetValue
());
if
(
nullptr
!=
(
pCol
=
static_cast
<
const
SvxColorItem
*>
(
rPool
.
GetPoolDefaultItem
(
RES_CHRATR_COLOR
))))
InsColor
(
pCol
->
GetValue
());
...
...
@@ -1125,7 +1126,7 @@ void RtfExport::OutColorTable()
InsColor
(
pCol
->
GetValue
());
}
const
SvxUnderlineItem
*
pUnder
=
static_cast
<
const
SvxUnderlineItem
*>
(
GetDfltAttr
(
RES_CHRATR_UNDERLINE
));
auto
pUnder
=
static_cast
<
const
SvxUnderlineItem
*>
(
GetDfltAttr
(
RES_CHRATR_UNDERLINE
));
InsColor
(
pUnder
->
GetColor
());
nMaxItem
=
rPool
.
GetItemCount2
(
RES_CHRATR_UNDERLINE
);
for
(
sal_uInt32
n
=
0
;
n
<
nMaxItem
;
++
n
)
...
...
@@ -1135,7 +1136,7 @@ void RtfExport::OutColorTable()
}
const
SvxOverlineItem
*
pOver
=
static_cast
<
const
SvxOverlineItem
*>
(
GetDfltAttr
(
RES_CHRATR_OVERLINE
));
auto
pOver
=
static_cast
<
const
SvxOverlineItem
*>
(
GetDfltAttr
(
RES_CHRATR_OVERLINE
));
InsColor
(
pOver
->
GetColor
());
nMaxItem
=
rPool
.
GetItemCount2
(
RES_CHRATR_OVERLINE
);
for
(
sal_uInt32
n
=
0
;
n
<
nMaxItem
;
++
n
)
...
...
@@ -1155,25 +1156,25 @@ void RtfExport::OutColorTable()
for
(
const
sal_uInt16
*
pIds
=
aBrushIds
;
*
pIds
;
++
pIds
)
{
const
SvxBrushItem
*
pBkgr
d
=
static_cast
<
const
SvxBrushItem
*>
(
GetDfltAttr
(
*
pIds
));
InsColor
(
pB
kgr
d
->
GetColor
());
if
(
nullptr
!=
(
pBkgr
d
=
static_cast
<
const
SvxBrushItem
*>
(
rPool
.
GetPoolDefaultItem
(
*
pIds
))))
auto
pBackgroun
d
=
static_cast
<
const
SvxBrushItem
*>
(
GetDfltAttr
(
*
pIds
));
InsColor
(
pB
ackgroun
d
->
GetColor
());
if
(
(
pBackgroun
d
=
static_cast
<
const
SvxBrushItem
*>
(
rPool
.
GetPoolDefaultItem
(
*
pIds
))))
{
InsColor
(
pB
kgr
d
->
GetColor
());
InsColor
(
pB
ackgroun
d
->
GetColor
());
}
nMaxItem
=
rPool
.
GetItemCount2
(
*
pIds
);
for
(
sal_uInt32
n
=
0
;
n
<
nMaxItem
;
++
n
)
{
if
(
nullptr
!=
(
pBkgr
d
=
static_cast
<
const
SvxBrushItem
*>
(
rPool
.
GetItem2
(
*
pIds
,
n
))))
if
(
(
pBackgroun
d
=
static_cast
<
const
SvxBrushItem
*>
(
rPool
.
GetItem2
(
*
pIds
,
n
))))
{
InsColor
(
pB
kgr
d
->
GetColor
());
InsColor
(
pB
ackgroun
d
->
GetColor
());
}
}
}
// shadow color
{
const
SvxShadowItem
*
pShadow
=
static_cast
<
const
SvxShadowItem
*>
(
GetDfltAttr
(
RES_SHADOW
));
auto
pShadow
=
static_cast
<
const
SvxShadowItem
*>
(
GetDfltAttr
(
RES_SHADOW
));
InsColor
(
pShadow
->
GetColor
());
if
(
nullptr
!=
(
pShadow
=
static_cast
<
const
SvxShadowItem
*>
(
rPool
.
GetPoolDefaultItem
(
RES_SHADOW
))))
{
...
...
@@ -1218,7 +1219,7 @@ void RtfExport::OutColorTable()
nMaxItem
=
rPool
.
GetItemCount2
(
XATTR_FILLCOLOR
);
for
(
sal_uInt32
i
=
0
;
i
<
nMaxItem
;
++
i
)
{
if
(
const
XFillColorItem
*
pItem
=
static_cast
<
const
XFillColorItem
*>
(
rPool
.
GetItem2
(
XATTR_FILLCOLOR
,
i
)))
if
(
auto
pItem
=
static_cast
<
const
XFillColorItem
*>
(
rPool
.
GetItem2
(
XATTR_FILLCOLOR
,
i
)))
InsColor
(
pItem
->
GetColorValue
());
}
...
...
@@ -1255,7 +1256,7 @@ sal_uInt16 RtfExport::GetRedline(const OUString& rAuthor)
if
(
it
!=
m_aRedlineTable
.
end
())
return
it
->
second
;
const
sal_uInt16
nId
=
static_cast
<
sal_uInt16
>
(
m_aRedlineTable
.
size
()
);
const
sal_uInt16
nId
=
m_aRedlineTable
.
size
(
);
m_aRedlineTable
.
insert
(
std
::
pair
<
OUString
,
sal_uInt16
>
(
rAuthor
,
nId
));
return
nId
;
}
...
...
@@ -1319,13 +1320,13 @@ void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader)
{
if
(
bHeader
)
{
const
SwFormatHeader
&
rHeader
=
static_cast
<
const
SwFormatHeader
&>
(
rItem
);
const
auto
&
rHeader
=
static_cast
<
const
SwFormatHeader
&>
(
rItem
);
if
(
!
rHeader
.
IsActive
())
return
;
}
else
{
const
SwFormatFooter
&
rFooter
=
static_cast
<
const
SwFormatFooter
&>
(
rItem
);
const
auto
&
rFooter
=
static_cast
<
const
SwFormatFooter
&>
(
rItem
);
if
(
!
rFooter
.
IsActive
())
return
;
}
...
...
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