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
12088e14
Kaydet (Commit)
12088e14
authored
May 14, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor Template and ThumbnailView to use RenderContext
Change-Id: I7f4e3e9415219548c919d63c07c5c946bc609a7d
üst
fb31134e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
31 deletions
+47
-31
templateabstractview.hxx
include/sfx2/templateabstractview.hxx
+1
-1
thumbnailview.hxx
include/sfx2/thumbnailview.hxx
+10
-4
templateabstractview.cxx
sfx2/source/control/templateabstractview.cxx
+2
-1
thumbnailview.cxx
sfx2/source/control/thumbnailview.cxx
+34
-25
No files found.
include/sfx2/templateabstractview.hxx
Dosyayı görüntüle @
12088e14
...
...
@@ -131,7 +131,7 @@ protected:
virtual
void
OnItemDblClicked
(
ThumbnailViewItem
*
pItem
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
protected
:
...
...
include/sfx2/thumbnailview.hxx
Dosyayı görüntüle @
12088e14
...
...
@@ -259,7 +259,11 @@ protected:
virtual
void
Command
(
const
CommandEvent
&
rCEvt
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
PrePaint
(
vcl
::
RenderContext
&
rRenderContext
)
SAL_OVERRIDE
;
virtual
void
PostPaint
(
vcl
::
RenderContext
&
rRenderContext
)
SAL_OVERRIDE
;
virtual
void
GetFocus
()
SAL_OVERRIDE
;
...
...
@@ -330,9 +334,11 @@ protected:
Color
maColor
;
Link
<>
maItemStateHdl
;
ThumbnailItemAttributes
*
mpItemAttrs
;
drawinglayer
::
processor2d
::
BaseProcessor2D
*
mpProcessor
;
boost
::
function
<
bool
(
const
ThumbnailViewItem
*
)
>
maFilterFunc
;
ThumbnailItemAttributes
*
mpItemAttrs
;
std
::
unique_ptr
<
drawinglayer
::
processor2d
::
BaseProcessor2D
>
mpProcessor
;
boost
::
function
<
bool
(
const
ThumbnailViewItem
*
)
>
maFilterFunc
;
};
#endif // INCLUDED_SFX2_THUMBNAILVIEW_HXX
...
...
sfx2/source/control/templateabstractview.cxx
Dosyayı görüntüle @
12088e14
...
...
@@ -305,7 +305,8 @@ void TemplateAbstractView::Paint(vcl::RenderContext& rRenderContext, const Recta
ThumbnailView
::
Paint
(
rRenderContext
,
rRect
);
Rectangle
aRect
(
rRect
.
TopLeft
(),
Point
(
rRect
.
BottomRight
().
X
(),
mnHeaderHeight
));
Point
(
rRect
.
BottomRight
().
X
(),
mnHeaderHeight
));
drawinglayer
::
primitive2d
::
Primitive2DSequence
aSeq
(
1
);
aSeq
[
0
]
=
drawinglayer
::
primitive2d
::
Primitive2DReference
(
...
...
sfx2/source/control/thumbnailview.cxx
Dosyayı görüntüle @
12088e14
...
...
@@ -80,7 +80,6 @@ void ThumbnailView::dispose()
mpScrBar
.
disposeAndClear
();
delete
mpItemAttrs
;
delete
mpProcessor
;
ImplDeleteItems
();
Control
::
dispose
();
...
...
@@ -134,28 +133,24 @@ void ThumbnailView::AppendItem(ThumbnailViewItem *pItem)
void
ThumbnailView
::
ImplInit
()
{
mpScrBar
=
NULL
;
mnHeaderHeight
=
0
;
mnItemWidth
=
0
;
mnItemHeight
=
0
;
mnItemPadding
=
0
;
mnVisLines
=
0
;
mnLines
=
0
;
mnFineness
=
5
;
mnFirstLine
=
0
;
mnCols
=
0
;
mbScroll
=
false
;
mbHasVisibleItems
=
false
;
mbShowTooltips
=
false
;
mpScrBar
=
NULL
;
mnHeaderHeight
=
0
;
mnItemWidth
=
0
;
mnItemHeight
=
0
;
mnItemPadding
=
0
;
mnVisLines
=
0
;
mnLines
=
0
;
mnFineness
=
5
;
mnFirstLine
=
0
;
mnCols
=
0
;
mbScroll
=
false
;
mbHasVisibleItems
=
false
;
mbShowTooltips
=
false
;
maFilterFunc
=
ViewFilterAll
();
maColor
=
GetSettings
().
GetStyleSettings
().
GetFieldColor
();
mpStartSelRange
=
mFilteredItemList
.
end
();
// Create the processor and process the primitives
const
drawinglayer
::
geometry
::
ViewInformation2D
aNewViewInfos
;
mpProcessor
=
drawinglayer
::
processor2d
::
createBaseProcessor2DFromOutputDevice
(
*
this
,
aNewViewInfos
);
ImplInitSettings
(
true
,
true
,
true
);
ImplInitSettings
(
true
,
true
,
true
);
}
void
ThumbnailView
::
ImplDeleteItems
()
...
...
@@ -248,14 +243,14 @@ void ThumbnailView::ImplInitScrollBar()
}
}
void
ThumbnailView
::
DrawItem
(
ThumbnailViewItem
*
pItem
)
void
ThumbnailView
::
DrawItem
(
ThumbnailViewItem
*
pItem
)
{
if
(
pItem
->
isVisible
())
{
Rectangle
aRect
=
pItem
->
getDrawArea
();
if
(
(
aRect
.
GetHeight
()
>
0
)
&&
(
aRect
.
GetWidth
()
>
0
)
)
pItem
->
Paint
(
mpProcessor
,
mpItemAttrs
);
if
(
(
aRect
.
GetHeight
()
>
0
)
&&
(
aRect
.
GetWidth
()
>
0
)
)
pItem
->
Paint
(
mpProcessor
.
get
(),
mpItemAttrs
);
}
}
...
...
@@ -858,14 +853,14 @@ void ThumbnailView::Command( const CommandEvent& rCEvt )
Control
::
Command
(
rCEvt
);
}
void
ThumbnailView
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
a
Rect
)
void
ThumbnailView
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
r
Rect
)
{
size_t
nItemCount
=
mItemList
.
size
();
// Draw background
drawinglayer
::
primitive2d
::
Primitive2DSequence
aSeq
(
1
);
aSeq
[
0
]
=
drawinglayer
::
primitive2d
::
Primitive2DReference
(
new
PolyPolygonColorPrimitive2D
(
B2DPolyPolygon
(
Polygon
(
a
Rect
,
5
,
5
).
getB2DPolygon
()),
B2DPolyPolygon
(
Polygon
(
r
Rect
,
5
,
5
).
getB2DPolygon
()),
maColor
.
getBColor
()));
mpProcessor
->
process
(
aSeq
);
...
...
@@ -876,11 +871,25 @@ void ThumbnailView::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangl
ThumbnailViewItem
*
const
pItem
=
mItemList
[
i
];
if
(
pItem
->
isVisible
())
{
DrawItem
(
pItem
);
}
}
if
(
mpScrBar
&&
mpScrBar
->
IsVisible
())
mpScrBar
->
Invalidate
(
aRect
);
mpScrBar
->
Invalidate
(
rRect
);
}
void
ThumbnailView
::
PrePaint
(
vcl
::
RenderContext
&
rRenderContext
)
{
// Create the processor and process the primitives
const
drawinglayer
::
geometry
::
ViewInformation2D
aNewViewInfos
;
mpProcessor
.
reset
(
drawinglayer
::
processor2d
::
createBaseProcessor2DFromOutputDevice
(
rRenderContext
,
aNewViewInfos
));
}
void
ThumbnailView
::
PostPaint
(
vcl
::
RenderContext
&
/*rRenderContext*/
)
{
mpProcessor
.
reset
();
}
void
ThumbnailView
::
GetFocus
()
...
...
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