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
bc6479e9
Kaydet (Commit)
bc6479e9
authored
Ock 18, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
change DrawControlText to return new rect rather than change old one
Change-Id: Id5c80ff263e429d4239a844db216e87a656edb2e
üst
239e877d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
ctrl.hxx
include/vcl/ctrl.hxx
+4
-3
button.cxx
vcl/source/control/button.cxx
+4
-4
ctrl.cxx
vcl/source/control/ctrl.cxx
+7
-8
fixed.cxx
vcl/source/control/fixed.cxx
+2
-2
tabctrl.cxx
vcl/source/control/tabctrl.cxx
+2
-2
No files found.
include/vcl/ctrl.hxx
Dosyayı görüntüle @
bc6479e9
...
...
@@ -80,10 +80,11 @@ protected:
If no reference device is set, the draw request will simply be forwarded to OutputDevice::DrawText. Otherwise,
the text will be rendered according to the metrics at the reference device.
Note that the given rectangle might be modified, it will contain the result of a GetTextRect call (either
directly at the target device, or taking the reference device into account) when returning.
return will contain the result of a GetTextRect call (either directly
at the target device, or taking the reference device into account) when
returning.
*/
void
DrawControlText
(
OutputDevice
&
_rTargetDevice
,
Rectangle
&
_io
_rRect
,
Rectangle
DrawControlText
(
OutputDevice
&
_rTargetDevice
,
const
Rectangle
&
_rRect
,
const
OUString
&
_rStr
,
DrawTextFlags
_nStyle
,
MetricVector
*
_pVector
,
OUString
*
_pDisplayText
)
const
;
...
...
vcl/source/control/button.cxx
Dosyayı görüntüle @
bc6479e9
...
...
@@ -286,7 +286,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
}
else
if
(
bDrawText
&&
!
bDrawImage
&&
!
bHasSymbol
)
{
DrawControlText
(
*
pDev
,
aOutRect
,
aText
,
nTextStyle
,
nullptr
,
nullptr
);
aOutRect
=
DrawControlText
(
*
pDev
,
aOutRect
,
aText
,
nTextStyle
,
nullptr
,
nullptr
);
ImplSetFocusRect
(
aOutRect
);
rSize
=
aOutRect
.
GetSize
();
...
...
@@ -511,9 +511,9 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
if
(
bDrawText
)
{
Rectangle
aTOutRect
(
aTextPos
,
aTextSize
);
ImplSetFocusRect
(
aTOutRect
);
DrawControlText
(
*
pDev
,
aTOutRect
,
aText
,
nTextStyle
,
nullptr
,
nullptr
);
const
Rectangle
aTOutRect
(
aTextPos
,
aTextSize
);
ImplSetFocusRect
(
aTOutRect
);
DrawControlText
(
*
pDev
,
aTOutRect
,
aText
,
nTextStyle
,
nullptr
,
nullptr
);
}
else
{
...
...
vcl/source/control/ctrl.cxx
Dosyayı görüntüle @
bc6479e9
...
...
@@ -412,7 +412,7 @@ void Control::ImplInitSettings(const bool, const bool)
ApplySettings
(
*
this
);
}
void
Control
::
DrawControlText
(
OutputDevice
&
_rTargetDevice
,
Rectangle
&
_io_
rRect
,
const
OUString
&
_rStr
,
Rectangle
Control
::
DrawControlText
(
OutputDevice
&
_rTargetDevice
,
const
Rectangle
&
rRect
,
const
OUString
&
_rStr
,
DrawTextFlags
_nStyle
,
MetricVector
*
_pVector
,
OUString
*
_pDisplayText
)
const
{
OUString
rPStr
=
_rStr
;
...
...
@@ -429,14 +429,13 @@ void Control::DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRec
if
(
!
mpControlData
->
mpReferenceDevice
||
(
mpControlData
->
mpReferenceDevice
==
&
_rTargetDevice
)
)
{
_io_rRect
=
_rTargetDevice
.
GetTextRect
(
_io_rRect
,
rPStr
,
nPStyle
);
_rTargetDevice
.
DrawText
(
_io_rRect
,
rPStr
,
nPStyle
,
_pVector
,
_pDisplayText
);
}
else
{
ControlTextRenderer
aRenderer
(
*
this
,
_rTargetDevice
,
*
mpControlData
->
mpReferenceDevice
);
_io_rRect
=
aRenderer
.
DrawText
(
_io_rRect
,
rPStr
,
nPStyle
,
_pVector
,
_pDisplayText
);
const
Rectangle
aRet
=
_rTargetDevice
.
GetTextRect
(
rRect
,
rPStr
,
nPStyle
);
_rTargetDevice
.
DrawText
(
aRet
,
rPStr
,
nPStyle
,
_pVector
,
_pDisplayText
);
return
aRet
;
}
ControlTextRenderer
aRenderer
(
*
this
,
_rTargetDevice
,
*
mpControlData
->
mpReferenceDevice
);
return
aRenderer
.
DrawText
(
rRect
,
rPStr
,
nPStyle
,
_pVector
,
_pDisplayText
);
}
Font
...
...
vcl/source/control/fixed.cxx
Dosyayı görüntüle @
bc6479e9
...
...
@@ -182,7 +182,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags,
if
(
bFillLayout
)
(
mpControlData
->
mpLayoutData
->
m_aDisplayText
).
clear
();
Rectangle
aRect
(
Rectangle
(
aPos
,
rSize
)
);
const
Rectangle
aRect
(
aPos
,
rSize
);
DrawControlText
(
*
pDev
,
aRect
,
aText
,
nTextStyle
,
bFillLayout
?
&
mpControlData
->
mpLayoutData
->
m_aUnicodeBoundRects
:
nullptr
,
bFillLayout
?
&
mpControlData
->
mpLayoutData
->
m_aDisplayText
:
nullptr
);
...
...
@@ -557,7 +557,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
if
(
rStyleSettings
.
GetOptions
()
&
StyleSettingsOptions
::
Mono
)
nStyle
|=
DrawTextFlags
::
Mono
;
DrawControlText
(
*
this
,
aRect
,
aText
,
nStyle
,
nullptr
,
nullptr
);
aRect
=
DrawControlText
(
*
this
,
aRect
,
aText
,
nStyle
,
nullptr
,
nullptr
);
long
nTop
=
aRect
.
Top
()
+
((
aRect
.
GetHeight
()
-
1
)
/
2
);
aDecoView
.
DrawSeparator
(
Point
(
aRect
.
Right
()
+
FIXEDLINE_TEXT_BORDER
,
nTop
),
Point
(
aOutSize
.
Width
()
-
1
,
nTop
),
false
);
...
...
vcl/source/control/tabctrl.cxx
Dosyayı görüntüle @
bc6479e9
...
...
@@ -940,8 +940,8 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
Color
aOldColor
(
rRenderContext
.
GetTextColor
());
rRenderContext
.
SetTextColor
(
aColor
);
Rectangle
aOutRect
(
nXPos
+
aImageSize
.
Width
(),
nYPos
,
nXPos
+
aImageSize
.
Width
()
+
nTextWidth
,
nYPos
+
nTextHeight
);
const
Rectangle
aOutRect
(
nXPos
+
aImageSize
.
Width
(),
nYPos
,
nXPos
+
aImageSize
.
Width
()
+
nTextWidth
,
nYPos
+
nTextHeight
);
DrawControlText
(
rRenderContext
,
aOutRect
,
pItem
->
maFormatText
,
nStyle
,
nullptr
,
nullptr
);
...
...
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