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
0a26e27d
Kaydet (Commit)
0a26e27d
authored
Eyl 05, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_uInt16: use more proper types, avoid unneeded casts, constify
Change-Id: Ic30441307eaa391868ffbb85a67d1c0327258084
üst
ba0498a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
EnhancedPDFExportHelper.cxx
sw/source/core/text/EnhancedPDFExportHelper.cxx
+15
-15
atrstck.cxx
sw/source/core/text/atrstck.cxx
+6
-7
No files found.
sw/source/core/text/EnhancedPDFExportHelper.cxx
Dosyayı görüntüle @
0a26e27d
...
...
@@ -1076,14 +1076,14 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
// This is the default. If the paragraph could not be mapped to
// any of the standard pdf tags, we write a user defined tag
// <stylename> with role = P
nPDFType
=
static_cast
<
sal_uInt16
>
(
vcl
::
PDFWriter
::
Paragraph
)
;
nPDFType
=
vcl
::
PDFWriter
::
Paragraph
;
aPDFType
=
sStyleName
;
// Quotations: BlockQuote
if
(
sStyleName
.
equalsAscii
(
aQuotations
))
{
nPDFType
=
static_cast
<
sal_uInt16
>
(
vcl
::
PDFWriter
::
BlockQuote
)
;
nPDFType
=
vcl
::
PDFWriter
::
BlockQuote
;
aPDFType
=
OUString
(
aBlockQuoteString
);
}
...
...
@@ -1091,7 +1091,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
else
if
(
sStyleName
.
equalsAscii
(
aCaption
))
{
nPDFType
=
static_cast
<
sal_uInt16
>
(
vcl
::
PDFWriter
::
Caption
)
;
nPDFType
=
vcl
::
PDFWriter
::
Caption
;
aPDFType
=
OUString
(
aCaptionString
);
}
...
...
@@ -1099,7 +1099,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
else
if
(
sParentStyleName
.
equalsAscii
(
aCaption
))
{
nPDFType
=
static_cast
<
sal_uInt16
>
(
vcl
::
PDFWriter
::
Caption
)
;
nPDFType
=
vcl
::
PDFWriter
::
Caption
;
aPDFType
=
sStyleName
+
aCaptionString
;
}
...
...
@@ -1107,7 +1107,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
else
if
(
sStyleName
.
equalsAscii
(
aHeading
))
{
nPDFType
=
static_cast
<
sal_uInt16
>
(
vcl
::
PDFWriter
::
Heading
)
;
nPDFType
=
vcl
::
PDFWriter
::
Heading
;
aPDFType
=
OUString
(
aHString
);
}
...
...
@@ -1116,7 +1116,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
if
(
pTxtNd
->
IsOutline
()
)
{
int
nRealLevel
=
pTxtNd
->
GetAttrOutlineLevel
()
-
1
;
nRealLevel
=
nRealLevel
>
5
?
5
:
nRealLevel
;
nRealLevel
=
nRealLevel
>
5
?
5
:
nRealLevel
;
nPDFType
=
static_cast
<
sal_uInt16
>
(
vcl
::
PDFWriter
::
H1
+
nRealLevel
);
switch
(
nRealLevel
)
...
...
@@ -1375,7 +1375,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
else
{
const
LanguageType
nCurrentLanguage
=
rInf
.
GetFont
()
->
GetLanguage
();
const
sal_uInt
16
nFont
=
rInf
.
GetFont
()
->
GetActual
();
const
sal_uInt
8
nFont
=
rInf
.
GetFont
()
->
GetActual
();
const
LanguageType
nDefaultLang
=
SwEnhancedPDFExportHelper
::
GetDefaultLanguage
();
if
(
UNDERLINE_NONE
!=
rInf
.
GetFont
()
->
GetUnderline
()
||
...
...
@@ -1699,8 +1699,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const
bool
bHeaderFooter
=
pDoc
->
IsInHeaderFooter
(
aPos
.
nNode
);
// Create links for all selected rectangles:
const
s
al_uInt16
nNumOfRects
=
aTmp
.
size
();
for
(
s
al_uInt16
i
=
0
;
i
<
nNumOfRects
;
++
i
)
const
s
ize_t
nNumOfRects
=
aTmp
.
size
();
for
(
s
ize_t
i
=
0
;
i
<
nNumOfRects
;
++
i
)
{
// Link Rectangle
const
SwRect
&
rLinkRect
(
aTmp
[
i
]
);
...
...
@@ -1739,8 +1739,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// HYPERLINKS (Graphics, Frames, OLEs )
const
SwFrmFmts
*
pTbl
=
pDoc
->
GetSpzFrmFmts
();
const
s
al_uInt16
nSpzFrmFmtsCount
=
pTbl
->
size
();
for
(
s
al_uInt16
n
=
0
;
n
<
nSpzFrmFmtsCount
;
++
n
)
const
s
ize_t
nSpzFrmFmtsCount
=
pTbl
->
size
();
for
(
s
ize_t
n
=
0
;
n
<
nSpzFrmFmtsCount
;
++
n
)
{
const
SwFrmFmt
*
pFrmFmt
=
(
*
pTbl
)[
n
];
const
SfxPoolItem
*
pItem
;
...
...
@@ -1868,8 +1868,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const
bool
bHeaderFooter
=
pDoc
->
IsInHeaderFooter
(
aPos
.
nNode
);
// Create links for all selected rectangles:
const
s
al_uInt16
nNumOfRects
=
aTmp
.
size
();
for
(
s
al_uInt16
i
=
0
;
i
<
nNumOfRects
;
++
i
)
const
s
ize_t
nNumOfRects
=
aTmp
.
size
();
for
(
s
ize_t
i
=
0
;
i
<
nNumOfRects
;
++
i
)
{
// Link rectangle
const
SwRect
&
rLinkRect
(
aTmp
[
i
]
);
...
...
@@ -1908,8 +1908,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// FOOTNOTES
const
s
al_uInt16
nFtnCount
=
pDoc
->
GetFtnIdxs
().
size
();
for
(
s
al_uInt16
nIdx
=
0
;
nIdx
<
nFtnCount
;
++
nIdx
)
const
s
ize_t
nFtnCount
=
pDoc
->
GetFtnIdxs
().
size
();
for
(
s
ize_t
nIdx
=
0
;
nIdx
<
nFtnCount
;
++
nIdx
)
{
// Set cursor to text node that contains the footnote:
const
SwTxtFtn
*
pTxtFtn
=
pDoc
->
GetFtnIdxs
()[
nIdx
];
...
...
sw/source/core/text/atrstck.cxx
Dosyayı görüntüle @
0a26e27d
...
...
@@ -68,8 +68,7 @@
* NUM_DEFAULT_VALUES.
* Also adjust NUM_ATTRIBUTE_STACKS in atrhndl.hxx.
*/
const
sal_uInt8
StackPos
[
static_cast
<
sal_uInt16
>
(
RES_TXTATR_WITHEND_END
)
-
static_cast
<
sal_uInt16
>
(
RES_CHRATR_BEGIN
)
+
1
]
=
const
sal_uInt8
StackPos
[
RES_TXTATR_WITHEND_END
-
RES_CHRATR_BEGIN
+
1
]
=
{
0
,
// // 0
1
,
// RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN // 1
...
...
@@ -508,7 +507,7 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
if
(
bRet
)
{
// we remove rAttr from the appropriate stack
sal_uInt16
nStackPos
=
StackPos
[
i
];
const
sal_uInt16
nStackPos
=
StackPos
[
i
];
aAttrStack
[
nStackPos
].
Remove
(
rAttr
);
// reset font according to attribute on top of stack
// or default value
...
...
@@ -590,7 +589,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
{
// ruby stack has no more attributes
// check, if an rotation attribute has to be applied
sal_uInt16
nTwoLineStack
=
StackPos
[
RES_CHRATR_TWO_LINES
];
const
sal_uInt16
nTwoLineStack
=
StackPos
[
RES_CHRATR_TWO_LINES
];
bool
bTwoLineAct
=
false
;
const
SwTxtAttr
*
pTwoLineAttr
=
aAttrStack
[
nTwoLineStack
].
Top
();
...
...
@@ -607,7 +606,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
return
;
// eventually, an rotate attribute has to be activated
sal_uInt16
nRotateStack
=
StackPos
[
RES_CHRATR_ROTATE
];
const
sal_uInt16
nRotateStack
=
StackPos
[
RES_CHRATR_ROTATE
];
const
SwTxtAttr
*
pRotateAttr
=
aAttrStack
[
nRotateStack
].
Top
();
if
(
pRotateAttr
)
...
...
@@ -809,7 +808,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
if
(
bRuby
)
break
;
sal_uInt16
nTwoLineStack
=
StackPos
[
RES_CHRATR_TWO_LINES
];
const
sal_uInt16
nTwoLineStack
=
StackPos
[
RES_CHRATR_TWO_LINES
];
bool
bTwoLineAct
=
false
;
const
SwTxtAttr
*
pTwoLineAttr
=
aAttrStack
[
nTwoLineStack
].
Top
();
...
...
@@ -847,7 +846,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
if
(
bRuby
)
break
;
sal_uInt16
nRotateStack
=
StackPos
[
RES_CHRATR_ROTATE
];
const
sal_uInt16
nRotateStack
=
StackPos
[
RES_CHRATR_ROTATE
];
const
SwTxtAttr
*
pRotateAttr
=
aAttrStack
[
nRotateStack
].
Top
();
if
(
pRotateAttr
)
...
...
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