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
84945163
Kaydet (Commit)
84945163
authored
Eyl 03, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: indentation fixes
Change-Id: Ic4cb73340b7c91198e982c2f7be030a4d6299d4e
üst
dfb8c373
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
54 deletions
+56
-54
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+2
-2
docnum.cxx
sw/source/core/doc/docnum.cxx
+2
-2
itradj.cxx
sw/source/core/text/itradj.cxx
+1
-1
rtfattributeoutput.cxx
sw/source/filter/ww8/rtfattributeoutput.cxx
+51
-49
No files found.
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
84945163
...
...
@@ -355,8 +355,8 @@ DECLARE_RTFEXPORT_TEST(testTdf49073, "tdf49073.rtf")
sal_Unicode
aRuby
[
3
]
=
{
0x304D
,
0x3082
,
0x3093
};
OUString
sRuby
=
OUString
(
aRuby
,
SAL_N_ELEMENTS
(
aRuby
));
CPPUNIT_ASSERT_EQUAL
(
sRuby
,
getProperty
<
OUString
>
(
getParagraph
(
1
)
->
getStart
(),
"RubyText"
));
OUString
sStyle
=
getProperty
<
OUString
>
(
getParagraph
(
1
)
->
getStart
(),
"RubyCharStyleName"
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
getStyles
(
"CharacterStyles"
)
->
getByName
(
sStyle
),
uno
::
UNO_QUERY
);
OUString
sStyle
=
getProperty
<
OUString
>
(
getParagraph
(
1
)
->
getStart
(),
"RubyCharStyleName"
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
getStyles
(
"CharacterStyles"
)
->
getByName
(
sStyle
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
5.
f
,
getProperty
<
float
>
(
xPropertySet
,
"CharHeight"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
text
::
RubyAdjust_CENTER
)
,
getProperty
<
sal_Int16
>
(
getParagraph
(
2
)
->
getStart
(),
"RubyAdjust"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
text
::
RubyAdjust_BLOCK
)
,
getProperty
<
sal_Int16
>
(
getParagraph
(
3
)
->
getStart
(),
"RubyAdjust"
));
...
...
sw/source/core/doc/docnum.cxx
Dosyayı görüntüle @
84945163
...
...
@@ -1507,7 +1507,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
bool
SwDoc
::
GotoNextNum
(
SwPosition
&
rPos
,
bool
bOverUpper
,
sal_uInt8
*
pUpper
,
sal_uInt8
*
pLower
)
{
return
::
lcl_GotoNextPrevNum
(
rPos
,
true
,
bOverUpper
,
pUpper
,
pLower
);
return
::
lcl_GotoNextPrevNum
(
rPos
,
true
,
bOverUpper
,
pUpper
,
pLower
);
}
const
SwNumRule
*
SwDoc
::
SearchNumRule
(
const
SwPosition
&
rPos
,
...
...
@@ -1588,7 +1588,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
bool
SwDoc
::
GotoPrevNum
(
SwPosition
&
rPos
,
bool
bOverUpper
,
sal_uInt8
*
pUpper
,
sal_uInt8
*
pLower
)
{
return
::
lcl_GotoNextPrevNum
(
rPos
,
false
,
bOverUpper
,
pUpper
,
pLower
);
return
::
lcl_GotoNextPrevNum
(
rPos
,
false
,
bOverUpper
,
pUpper
,
pLower
);
}
bool
SwDoc
::
NumUpDown
(
const
SwPaM
&
rPam
,
bool
bDown
)
...
...
sw/source/core/text/itradj.cxx
Dosyayı görüntüle @
84945163
...
...
@@ -241,7 +241,7 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwT
if
(
!
bAddSpaceChanged
)
break
;
// everything was OK
}
return
true
;
return
true
;
}
// CalcNewBlock() must only be called _after_ CalcLine()!
...
...
sw/source/filter/ww8/rtfattributeoutput.cxx
Dosyayı görüntüle @
84945163
...
...
@@ -417,36 +417,36 @@ void RtfAttributeOutput::RawText(const OUString& rText, rtl_TextEncoding eCharSe
void
RtfAttributeOutput
::
StartRuby
(
const
SwTextNode
&
rNode
,
sal_Int32
/*nPos*/
,
const
SwFormatRuby
&
rRuby
)
{
OUString
aStr
(
FieldString
(
ww
::
eEQ
)
);
OUString
aStr
(
FieldString
(
ww
::
eEQ
)
);
aStr
+=
"
\\
* jc"
;
sal_Int32
nJC
=
0
;
sal_Char
cDirective
=
0
;
switch
(
rRuby
.
GetAdjustment
()
)
switch
(
rRuby
.
GetAdjustment
()
)
{
case
0
:
nJC
=
3
;
cDirective
=
'l'
;
break
;
case
1
:
//defaults to 0
break
;
case
2
:
nJC
=
4
;
cDirective
=
'r'
;
break
;
case
3
:
nJC
=
1
;
cDirective
=
'd'
;
break
;
case
4
:
nJC
=
2
;
cDirective
=
'd'
;
break
;
default
:
OSL_ENSURE
(
false
,
"Unhandled Ruby justication code"
);
break
;
case
0
:
nJC
=
3
;
cDirective
=
'l'
;
break
;
case
1
:
//defaults to 0
break
;
case
2
:
nJC
=
4
;
cDirective
=
'r'
;
break
;
case
3
:
nJC
=
1
;
cDirective
=
'd'
;
break
;
case
4
:
nJC
=
2
;
cDirective
=
'd'
;
break
;
default
:
OSL_ENSURE
(
false
,
"Unhandled Ruby justication code"
);
break
;
}
aStr
+=
OUString
::
number
(
nJC
);
aStr
+=
OUString
::
number
(
nJC
);
/*
MS needs to know the name and size of the font used in the ruby item,
...
...
@@ -456,8 +456,8 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 /*nPos*/,
defaulting to asian.
*/
sal_uInt16
nRubyScript
;
if
(
g_pBreakIt
->
GetBreakIter
().
is
()
)
nRubyScript
=
g_pBreakIt
->
GetBreakIter
()
->
getScriptType
(
rRuby
.
GetText
(),
0
);
if
(
g_pBreakIt
->
GetBreakIter
().
is
()
)
nRubyScript
=
g_pBreakIt
->
GetBreakIter
()
->
getScriptType
(
rRuby
.
GetText
(),
0
);
else
nRubyScript
=
i18n
::
ScriptType
::
ASIAN
;
...
...
@@ -465,29 +465,29 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 /*nPos*/,
const
SwCharFormat
*
pFormat
=
pRubyText
?
pRubyText
->
GetCharFormat
()
:
0
;
OUString
sFamilyName
;
long
nHeight
;
if
(
pFormat
)
if
(
pFormat
)
{
const
SvxFontItem
&
rFont
=
ItemGet
<
SvxFontItem
>
(
*
pFormat
,
GetWhichOfScript
(
RES_CHRATR_FONT
,
nRubyScript
)
);
const
SvxFontItem
&
rFont
=
ItemGet
<
SvxFontItem
>
(
*
pFormat
,
GetWhichOfScript
(
RES_CHRATR_FONT
,
nRubyScript
)
);
sFamilyName
=
rFont
.
GetFamilyName
();
const
SvxFontHeightItem
&
rHeight
=
ItemGet
<
SvxFontHeightItem
>
(
*
pFormat
,
GetWhichOfScript
(
RES_CHRATR_FONTSIZE
,
nRubyScript
)
);
const
SvxFontHeightItem
&
rHeight
=
ItemGet
<
SvxFontHeightItem
>
(
*
pFormat
,
GetWhichOfScript
(
RES_CHRATR_FONTSIZE
,
nRubyScript
)
);
nHeight
=
rHeight
.
GetHeight
();
}
else
{
/*Get defaults if no formatting on ruby text*/
const
SfxItemPool
*
pPool
=
rNode
.
GetSwAttrSet
().
GetPool
();
const
SfxItemPool
*
pPool
=
rNode
.
GetSwAttrSet
().
GetPool
();
pPool
=
pPool
?
pPool
:
&
m_rExport
.
m_pDoc
->
GetAttrPool
();
const
SvxFontItem
&
rFont
=
DefaultItemGet
<
SvxFontItem
>
(
*
pPool
,
GetWhichOfScript
(
RES_CHRATR_FONT
,
nRubyScript
)
);
const
SvxFontItem
&
rFont
=
DefaultItemGet
<
SvxFontItem
>
(
*
pPool
,
GetWhichOfScript
(
RES_CHRATR_FONT
,
nRubyScript
)
);
sFamilyName
=
rFont
.
GetFamilyName
();
const
SvxFontHeightItem
&
rHeight
=
DefaultItemGet
<
SvxFontHeightItem
>
(
*
pPool
,
GetWhichOfScript
(
RES_CHRATR_FONTSIZE
,
nRubyScript
)
);
const
SvxFontHeightItem
&
rHeight
=
DefaultItemGet
<
SvxFontHeightItem
>
(
*
pPool
,
GetWhichOfScript
(
RES_CHRATR_FONTSIZE
,
nRubyScript
)
);
nHeight
=
rHeight
.
GetHeight
();
}
nHeight
=
(
nHeight
+
5
)
/
10
;
...
...
@@ -495,39 +495,39 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 /*nPos*/,
aStr
+=
"
\\
*
\"
Font:"
;
aStr
+=
sFamilyName
;
aStr
+=
"
\"
\\
* hps"
;
aStr
+=
OUString
::
number
(
nHeight
);
aStr
+=
OUString
::
number
(
nHeight
);
aStr
+=
"
\\
o"
;
if
(
cDirective
)
if
(
cDirective
)
{
aStr
+=
"
\\
a"
+
OUString
(
cDirective
);
}
aStr
+=
"(
\\
s
\\
up "
;
if
(
g_pBreakIt
->
GetBreakIter
().
is
()
)
nRubyScript
=
g_pBreakIt
->
GetBreakIter
()
->
getScriptType
(
rNode
.
GetText
(),
pRubyText
->
GetStart
()
);
if
(
g_pBreakIt
->
GetBreakIter
().
is
()
)
nRubyScript
=
g_pBreakIt
->
GetBreakIter
()
->
getScriptType
(
rNode
.
GetText
(),
pRubyText
->
GetStart
()
);
else
nRubyScript
=
i18n
::
ScriptType
::
ASIAN
;
const
SwAttrSet
&
rSet
=
rNode
.
GetSwAttrSet
();
const
SvxFontHeightItem
&
rHeightItem
=
const
SvxFontHeightItem
&
rHeightItem
=
static_cast
<
const
SvxFontHeightItem
&
>
(
rSet
.
Get
(
GetWhichOfScript
(
RES_CHRATR_FONTSIZE
,
nRubyScript
)
));
GetWhichOfScript
(
RES_CHRATR_FONTSIZE
,
nRubyScript
)
));
nHeight
=
(
rHeightItem
.
GetHeight
()
+
10
)
/
20
-
1
;
aStr
+=
OUString
::
number
(
nHeight
);
aStr
+=
"("
;
EndRun
();
m_rExport
.
OutputField
(
0
,
ww
::
eEQ
,
aStr
,
WRITEFIELD_START
|
WRITEFIELD_CMD_START
);
m_rExport
.
OutputField
(
0
,
ww
::
eEQ
,
aStr
,
WRITEFIELD_START
|
WRITEFIELD_CMD_START
);
aStr
=
rRuby
.
GetText
();
aStr
+=
")"
;
aStr
+=
","
;
m_rExport
.
OutputField
(
0
,
ww
::
eEQ
,
aStr
,
0
);
m_rExport
.
OutputField
(
0
,
ww
::
eEQ
,
aStr
,
0
);
}
void
RtfAttributeOutput
::
EndRuby
()
{
m_rExport
.
OutputField
(
0
,
ww
::
eEQ
,
OUString
(
")"
),
WRITEFIELD_END
|
WRITEFIELD_CLOSE
);
EndRun
(
);
m_rExport
.
OutputField
(
0
,
ww
::
eEQ
,
OUString
(
")"
),
WRITEFIELD_END
|
WRITEFIELD_CLOSE
);
EndRun
();
}
bool
RtfAttributeOutput
::
StartURL
(
const
OUString
&
rUrl
,
const
OUString
&
rTarget
)
...
...
@@ -1568,7 +1568,9 @@ void RtfAttributeOutput::WriteField_Impl(const SwField* pField, ww::eField eType
m_aRunText
->
append
(
msfilter
::
rtfutil
::
OutString
(
pField
->
ExpandField
(
true
),
m_rExport
.
eDefaultEncoding
));
if
(
bHasInstructions
)
m_aRunText
->
append
(
"}}"
);
}
else
if
(
eType
==
ww
::
eEQ
)
{
}
else
if
(
eType
==
ww
::
eEQ
)
{
if
(
WRITEFIELD_START
&
nMode
)
{
m_aRunText
->
append
(
"{"
OOO_STRING_SVTOOLS_RTF_FIELD
);
...
...
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