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
763858b2
Kaydet (Commit)
763858b2
authored
May 14, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor SdHtmlAttrPreview to use RenderContext
Change-Id: I2b23764932df4a078094944d89cebb06f6eb569a
üst
2079b1f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
23 deletions
+19
-23
htmlattr.cxx
sd/source/filter/html/htmlattr.cxx
+18
-22
htmlattr.hxx
sd/source/filter/html/htmlattr.hxx
+1
-1
No files found.
sd/source/filter/html/htmlattr.cxx
Dosyayı görüntüle @
763858b2
...
...
@@ -22,8 +22,8 @@
#include <vcl/decoview.hxx>
#include <vcl/builderfactory.hxx>
SdHtmlAttrPreview
::
SdHtmlAttrPreview
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
:
Control
(
pParent
,
nStyle
)
SdHtmlAttrPreview
::
SdHtmlAttrPreview
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
:
Control
(
pParent
,
nStyle
)
{
}
...
...
@@ -42,43 +42,39 @@ SdHtmlAttrPreview::~SdHtmlAttrPreview()
{
}
void
SdHtmlAttrPreview
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
rRect
)
void
SdHtmlAttrPreview
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
{
DecorationView
aDecoView
(
this
);
DecorationView
aDecoView
(
&
rRenderContext
);
Rectangle
aTextRect
;
aTextRect
.
SetSize
(
GetOutputSize
());
SetLineColor
(
m_aBackColor
);
SetFillColor
(
m_aBackColor
);
DrawRect
(
rRect
);
SetFillColor
();
rRenderContext
.
SetLineColor
(
m_aBackColor
);
rRenderContext
.
SetFillColor
(
m_aBackColor
);
rRenderContext
.
DrawRect
(
rRect
);
rRenderContext
.
SetFillColor
();
int
nHeight
=
(
aTextRect
.
Bottom
()
-
aTextRect
.
Top
())
>>
2
;
aTextRect
.
Bottom
()
=
nHeight
+
aTextRect
.
Top
();
SetTextColor
(
m_aTextColor
);
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_TEXT
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
rRenderContext
.
SetTextColor
(
m_aTextColor
);
rRenderContext
.
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_TEXT
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
aTextRect
.
Move
(
0
,
nHeight
);
SetTextColor
(
m_aLinkColor
);
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_LINK
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
rRenderContext
.
SetTextColor
(
m_aLinkColor
);
rRenderContext
.
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_LINK
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
aTextRect
.
Move
(
0
,
nHeight
);
SetTextColor
(
m_aALinkColor
);
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_ALINK
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
rRenderContext
.
SetTextColor
(
m_aALinkColor
);
rRenderContext
.
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_ALINK
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
aTextRect
.
Move
(
0
,
nHeight
);
SetTextColor
(
m_aVLinkColor
);
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_VLINK
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
rRenderContext
.
SetTextColor
(
m_aVLinkColor
);
rRenderContext
.
DrawText
(
aTextRect
,
SD_RESSTR
(
STR_HTMLATTR_VLINK
),
TEXT_DRAW_CENTER
|
TEXT_DRAW_VCENTER
);
}
void
SdHtmlAttrPreview
::
SetColors
(
Color
&
aBack
,
Color
&
aText
,
Color
&
aLink
,
Color
&
aVLink
,
Color
&
aALink
)
void
SdHtmlAttrPreview
::
SetColors
(
Color
&
aBack
,
Color
&
aText
,
Color
&
aLink
,
Color
&
aVLink
,
Color
&
aALink
)
{
m_aBackColor
=
aBack
;
m_aTextColor
=
aText
;
...
...
sd/source/filter/html/htmlattr.hxx
Dosyayı görüntüle @
763858b2
...
...
@@ -34,7 +34,7 @@ public:
SdHtmlAttrPreview
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
);
virtual
~
SdHtmlAttrPreview
();
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
void
SetColors
(
Color
&
aBack
,
Color
&
aText
,
Color
&
aLink
,
Color
&
aVLink
,
Color
&
aALink
);
...
...
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