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
45c7ae2b
Kaydet (Commit)
45c7ae2b
authored
Eki 06, 2015
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sensible variable naming
Change-Id: I2ae662b65fe9ffd4f6aaf6441f506fb8a943bce2
üst
815b6162
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
output2.cxx
sc/source/ui/view/output2.cxx
+23
-23
No files found.
sc/source/ui/view/output2.cxx
Dosyayı görüntüle @
45c7ae2b
...
...
@@ -120,8 +120,8 @@ class ScDrawStringsVars
Color
aBackConfigColor
;
// used for ScPatternAttr::GetFont calls
Color
aTextConfigColor
;
sal_Int32
nPos
;
sal_Unicode
nChar
;
sal_Int32
n
Repeat
Pos
;
sal_Unicode
n
Repeat
Char
;
public
:
ScDrawStringsVars
(
ScOutputData
*
pData
,
bool
bPTL
);
...
...
@@ -162,7 +162,7 @@ public:
bool
GetLineBreak
()
const
{
return
bLineBreak
;
}
bool
IsRepeat
()
const
{
return
bRepeat
;
}
bool
IsShrink
()
const
{
return
bShrink
;
}
void
RepeatToFill
(
long
c
olWidth
);
void
RepeatToFill
(
long
nC
olWidth
);
long
GetAscent
()
const
{
return
nAscentPixel
;
}
bool
IsRotated
()
const
{
return
bRotated
;
}
...
...
@@ -205,8 +205,8 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, bool bPTL) :
bRepeat
(
false
),
bShrink
(
false
),
bPixelToLogic
(
bPTL
),
nPos
(
-
1
),
nChar
(
0x0
)
n
Repeat
Pos
(
-
1
),
n
Repeat
Char
(
0x0
)
{
ScModule
*
pScMod
=
SC_MOD
();
bCellContrast
=
pOutput
->
mbUseStyleColor
&&
...
...
@@ -501,16 +501,16 @@ bool ScDrawStringsVars::SetText( ScRefCellValue& rCell )
ftCheck
,
true
);
if
(
nFormat
)
{
nPos
=
aString
.
indexOf
(
0x1B
);
if
(
nPos
!=
-
1
)
n
Repeat
Pos
=
aString
.
indexOf
(
0x1B
);
if
(
n
Repeat
Pos
!=
-
1
)
{
if
(
nPos
+
1
==
aString
.
getLength
())
nPos
=
-
1
;
if
(
n
Repeat
Pos
+
1
==
aString
.
getLength
())
n
Repeat
Pos
=
-
1
;
else
{
n
Char
=
aString
[
n
Pos
+
1
];
n
RepeatChar
=
aString
[
nRepeat
Pos
+
1
];
// delete placeholder and char to repeat
aString
=
aString
.
replaceAt
(
nPos
,
2
,
""
);
aString
=
aString
.
replaceAt
(
n
Repeat
Pos
,
2
,
""
);
// Do not cache/reuse a repeat-filled string, column
// widths or fonts or sizes may differ.
maLastCell
.
clear
();
...
...
@@ -519,8 +519,8 @@ bool ScDrawStringsVars::SetText( ScRefCellValue& rCell )
}
else
{
nPos
=
-
1
;
nChar
=
0x0
;
n
Repeat
Pos
=
-
1
;
n
Repeat
Char
=
0x0
;
}
if
(
aString
.
getLength
()
>
DRAWTEXT_MAX
)
aString
=
aString
.
copy
(
0
,
DRAWTEXT_MAX
);
...
...
@@ -554,25 +554,25 @@ void ScDrawStringsVars::SetHashText()
SetAutoText
(
OUString
(
"###"
));
}
void
ScDrawStringsVars
::
RepeatToFill
(
long
c
olWidth
)
void
ScDrawStringsVars
::
RepeatToFill
(
long
nC
olWidth
)
{
if
(
n
Pos
==
-
1
||
n
Pos
>
aString
.
getLength
()
)
if
(
n
RepeatPos
==
-
1
||
nRepeat
Pos
>
aString
.
getLength
()
)
return
;
long
charWidth
=
pOutput
->
pFmtDevice
->
GetTextWidth
(
OUString
(
n
Char
));
if
(
c
harWidth
<
1
)
return
;
long
nCharWidth
=
pOutput
->
pFmtDevice
->
GetTextWidth
(
OUString
(
nRepeat
Char
));
if
(
nC
harWidth
<
1
)
return
;
if
(
bPixelToLogic
)
colWidth
=
pOutput
->
mpRefDevice
->
PixelToLogic
(
Size
(
c
olWidth
,
0
)).
Width
();
nColWidth
=
pOutput
->
mpRefDevice
->
PixelToLogic
(
Size
(
nC
olWidth
,
0
)).
Width
();
// Are there restrictions on the cell type we should filter out here ?
long
aSpaceToFill
=
(
c
olWidth
-
aTextSize
.
Width
()
);
long
nSpaceToFill
=
(
nC
olWidth
-
aTextSize
.
Width
()
);
if
(
aSpaceToFill
<=
c
harWidth
)
if
(
nSpaceToFill
<=
nC
harWidth
)
return
;
long
nCharsToInsert
=
aSpaceToFill
/
c
harWidth
;
long
nCharsToInsert
=
nSpaceToFill
/
nC
harWidth
;
OUStringBuffer
aFill
;
comphelper
::
string
::
padToLength
(
aFill
,
nCharsToInsert
,
nChar
);
aString
=
aString
.
replaceAt
(
nPos
,
0
,
aFill
.
makeStringAndClear
()
);
comphelper
::
string
::
padToLength
(
aFill
,
nCharsToInsert
,
n
Repeat
Char
);
aString
=
aString
.
replaceAt
(
n
Repeat
Pos
,
0
,
aFill
.
makeStringAndClear
()
);
TextChanged
();
}
...
...
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