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
44fbecbf
Kaydet (Commit)
44fbecbf
authored
Nis 20, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_uInt16 to more proper types + constification
Change-Id: Idcc3d315a7a9cbef4e3c0fbc6410098528dd8bfa
üst
3727a00f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
drpcps.cxx
sw/source/ui/chrdlg/drpcps.cxx
+13
-18
No files found.
sw/source/ui/chrdlg/drpcps.cxx
Dosyayı görüntüle @
44fbecbf
...
...
@@ -357,17 +357,15 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/)
OSL_ENSURE
(
mnLineH
>
0
,
"We cannot make it that small"
);
long
nY0
=
(
aOutputSizePixel
.
Height
()
-
(
LINES
*
mnTotLineH
))
/
2
;
SetFillColor
(
maTextLineColor
);
for
(
sal_uInt16
i
=
0
;
i
<
LINES
;
++
i
)
for
(
int
i
=
0
;
i
<
LINES
;
++
i
)
DrawRect
(
Rectangle
(
Point
(
BORDER
,
nY0
+
i
*
mnTotLineH
),
Size
(
aOutputSizePixel
.
Width
()
-
2
*
BORDER
,
mnLineH
)));
// Text background with gap (240 twips ~ 1 line height)
sal_uLong
lDistance
=
mnDistance
;
sal_uInt16
nDistW
=
(
sal_uInt16
)
(
sal_uLong
)
(((
lDistance
*
100
)
/
240
)
*
mnTotLineH
)
/
100
;
const
long
nDistW
=
(((
static_cast
<
long
>
(
mnDistance
)
*
100
)
/
240
)
*
mnTotLineH
)
/
100
;
SetFillColor
(
maBackColor
);
if
(
mpPage
&&
mpPage
->
m_pDropCapsBox
->
IsChecked
())
{
Size
aTextSize
(
maTextSize
);
aTextSize
.
Width
()
+=
nDistW
;
const
Size
aTextSize
(
maTextSize
.
Width
()
+
nDistW
,
maTextSize
.
Height
()
);
DrawRect
(
Rectangle
(
Point
(
BORDER
,
nY0
),
aTextSize
)
);
// draw Text
...
...
@@ -415,11 +413,11 @@ void SwDropCapsPict::CheckScript( void )
Reference
<
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
xBreak
=
css
::
i18n
::
BreakIterator
::
create
(
xContext
);
}
sal_
u
Int16
nScript
=
xBreak
->
getScriptType
(
maText
,
0
);
sal_
uInt16
nChg
=
0
;
sal_Int16
nScript
=
xBreak
->
getScriptType
(
maText
,
0
);
sal_
Int32
nChg
=
0
;
if
(
css
::
i18n
::
ScriptType
::
WEAK
==
nScript
)
{
nChg
=
(
sal_Int32
)
xBreak
->
endOfScript
(
maText
,
nChg
,
nScript
);
nChg
=
xBreak
->
endOfScript
(
maText
,
nChg
,
nScript
);
if
(
nChg
<
maText
.
getLength
()
)
nScript
=
xBreak
->
getScriptType
(
maText
,
nChg
);
else
...
...
@@ -428,7 +426,7 @@ void SwDropCapsPict::CheckScript( void )
do
{
nChg
=
(
sal_Int32
)
xBreak
->
endOfScript
(
maText
,
nChg
,
nScript
);
nChg
=
xBreak
->
endOfScript
(
maText
,
nChg
,
nScript
);
maScriptChanges
.
push_back
(
_ScriptInfo
(
0
,
nScript
,
nChg
)
);
if
(
nChg
<
maText
.
getLength
()
)
...
...
@@ -542,7 +540,7 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet)
SetExchangeSupport
();
sal_uInt16
nHtmlMode
=
::
GetHtmlMode
((
const
SwDocShell
*
)
SfxObjectShell
::
Current
());
const
sal_uInt16
nHtmlMode
=
::
GetHtmlMode
((
const
SwDocShell
*
)
SfxObjectShell
::
Current
());
bHtmlMode
=
nHtmlMode
&
HTMLMODE_ON
?
sal_True
:
sal_False
;
// In the template dialog the text is not influenceable
...
...
@@ -689,14 +687,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
// set text if applicable
if
(
pEdit
==
m_pDropCapsField
)
{
sal_uInt16
nVal
;
const
sal_uInt16
nVal
=
!
m_pWholeWordCB
->
IsChecked
()
?
(
sal_uInt16
)
m_pDropCapsField
->
GetValue
()
:
0
;
bool
bSetText
=
false
;
if
(
!
m_pWholeWordCB
->
IsChecked
())
nVal
=
(
sal_uInt16
)
m_pDropCapsField
->
GetValue
();
else
nVal
=
0
;
if
(
bFormat
||
rSh
.
GetDropTxt
(
1
).
isEmpty
())
sPreview
=
GetDefaultString
(
nVal
);
else
...
...
@@ -718,8 +713,8 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
}
else
if
(
pEdit
==
m_pTextEdit
)
// set quantity if applicable
{
sal_Int32
nTmp
=
m_pTextEdit
->
GetText
().
getLength
();
m_pDropCapsField
->
SetValue
(
std
::
max
((
sal_uInt16
)
1
,
(
sal_uInt16
)
nTmp
));
const
sal_Int32
nTmp
=
m_pTextEdit
->
GetText
().
getLength
();
m_pDropCapsField
->
SetValue
(
std
::
max
<
sal_Int32
>
(
1
,
nTmp
));
sPreview
=
m_pTextEdit
->
GetText
().
copy
(
0
,
nTmp
);
}
...
...
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