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
3b3eeff3
Kaydet (Commit)
3b3eeff3
authored
Ock 09, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
infobar: unique_ptr and make more readable
Change-Id: Iadaba3d9c16bdde3715d4836fa0d5661b90ccab4
üst
283170e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
26 deletions
+23
-26
infobar.cxx
sfx2/source/dialog/infobar.cxx
+23
-26
No files found.
sfx2/source/dialog/infobar.cxx
Dosyayı görüntüle @
3b3eeff3
...
@@ -22,6 +22,11 @@
...
@@ -22,6 +22,11 @@
#include <vcl/settings.hxx>
#include <vcl/settings.hxx>
using
namespace
std
;
using
namespace
std
;
using
namespace
drawinglayer
::
geometry
;
using
namespace
drawinglayer
::
processor2d
;
using
namespace
drawinglayer
::
primitive2d
;
using
namespace
drawinglayer
::
attribute
;
using
namespace
drawinglayer
::
geometry
;
namespace
namespace
{
{
...
@@ -39,14 +44,13 @@ namespace
...
@@ -39,14 +44,13 @@ namespace
void
SfxCloseButton
::
Paint
(
const
Rectangle
&
)
void
SfxCloseButton
::
Paint
(
const
Rectangle
&
)
{
{
const
drawinglayer
::
geometry
::
ViewInformation2D
aNewViewInfos
;
const
ViewInformation2D
aNewViewInfos
;
drawinglayer
::
processor2d
::
BaseProcessor2D
*
pProcessor
=
const
unique_ptr
<
BaseProcessor2D
>
pProcessor
(
drawinglayer
::
processor2d
::
createBaseProcessor2DFromOutputDevice
(
createBaseProcessor2DFromOutputDevice
(
*
this
,
aNewViewInfos
));
*
this
,
aNewViewInfos
);
const
Rectangle
aRect
(
Rectangle
(
Point
(
0
,
0
),
PixelToLogic
(
GetSizePixel
()
)
)
);
const
Rectangle
aRect
(
Rectangle
(
Point
(
0
,
0
),
PixelToLogic
(
GetSizePixel
()
)
)
);
drawinglayer
::
primitive2d
::
Primitive2DSequence
aSeq
(
2
);
Primitive2DSequence
aSeq
(
2
);
basegfx
::
BColor
aLightColor
(
1.0
,
1.0
,
191.0
/
255.0
);
basegfx
::
BColor
aLightColor
(
1.0
,
1.0
,
191.0
/
255.0
);
basegfx
::
BColor
aDarkColor
(
217.0
/
255.0
,
217.0
/
255.0
,
78.0
/
255.0
);
basegfx
::
BColor
aDarkColor
(
217.0
/
255.0
,
217.0
/
255.0
,
78.0
/
255.0
);
...
@@ -66,12 +70,11 @@ namespace
...
@@ -66,12 +70,11 @@ namespace
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Right
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Right
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
setClosed
(
true
);
aPolygon
.
setClosed
(
true
);
drawinglayer
::
primitive2d
::
PolyPolygonColorPrimitive2D
*
pBack
=
PolyPolygonColorPrimitive2D
*
pBack
=
new
PolyPolygonColorPrimitive2D
(
new
drawinglayer
::
primitive2d
::
PolyPolygonColorPrimitive2D
(
basegfx
::
B2DPolyPolygon
(
aPolygon
),
aLightColor
);
basegfx
::
B2DPolyPolygon
(
aPolygon
),
aLightColor
);
aSeq
[
0
]
=
pBack
;
aSeq
[
0
]
=
pBack
;
drawinglayer
::
attribute
::
LineAttribute
aLineAttribute
(
aDarkColor
,
2.0
);
LineAttribute
aLineAttribute
(
aDarkColor
,
2.0
);
// Cross
// Cross
basegfx
::
B2DPolyPolygon
aCross
;
basegfx
::
B2DPolyPolygon
aCross
;
...
@@ -84,14 +87,12 @@ namespace
...
@@ -84,14 +87,12 @@ namespace
aLine2
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(),
aRect
.
Bottom
(
)
)
);
aLine2
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(),
aRect
.
Bottom
(
)
)
);
aCross
.
append
(
aLine2
);
aCross
.
append
(
aLine2
);
drawinglayer
::
primitive2d
::
PolyPolygonStrokePrimitive2D
*
pCross
=
PolyPolygonStrokePrimitive2D
*
pCross
=
new
drawinglayer
::
primitive2d
::
PolyPolygonStrokePrimitive2D
(
new
PolyPolygonStrokePrimitive2D
(
aCross
,
aLineAttribute
,
StrokeAttribute
());
aCross
,
aLineAttribute
,
drawinglayer
::
attribute
::
StrokeAttribute
(
)
);
aSeq
[
1
]
=
pCross
;
aSeq
[
1
]
=
pCross
;
pProcessor
->
process
(
aSeq
);
pProcessor
->
process
(
aSeq
);
delete
pProcessor
;
}
}
}
}
...
@@ -137,14 +138,13 @@ SfxInfoBarWindow::~SfxInfoBarWindow( )
...
@@ -137,14 +138,13 @@ SfxInfoBarWindow::~SfxInfoBarWindow( )
void
SfxInfoBarWindow
::
Paint
(
const
Rectangle
&
rPaintRect
)
void
SfxInfoBarWindow
::
Paint
(
const
Rectangle
&
rPaintRect
)
{
{
const
drawinglayer
::
geometry
::
ViewInformation2D
aNewViewInfos
;
const
ViewInformation2D
aNewViewInfos
;
drawinglayer
::
processor2d
::
BaseProcessor2D
*
pProcessor
=
const
unique_ptr
<
BaseProcessor2D
>
pProcessor
(
drawinglayer
::
processor2d
::
createBaseProcessor2DFromOutputDevice
(
createBaseProcessor2DFromOutputDevice
(
*
this
,
aNewViewInfos
));
*
this
,
aNewViewInfos
);
const
Rectangle
aRect
(
Rectangle
(
Point
(
0
,
0
),
PixelToLogic
(
GetSizePixel
()
)
)
);
const
Rectangle
aRect
(
Rectangle
(
Point
(
0
,
0
),
PixelToLogic
(
GetSizePixel
()
)
)
);
drawinglayer
::
primitive2d
::
Primitive2DSequence
aSeq
(
2
);
Primitive2DSequence
aSeq
(
2
);
basegfx
::
BColor
aLightColor
(
1.0
,
1.0
,
191.0
/
255.0
);
basegfx
::
BColor
aLightColor
(
1.0
,
1.0
,
191.0
/
255.0
);
basegfx
::
BColor
aDarkColor
(
217.0
/
255.0
,
217.0
/
255.0
,
78.0
/
255.0
);
basegfx
::
BColor
aDarkColor
(
217.0
/
255.0
,
217.0
/
255.0
,
78.0
/
255.0
);
...
@@ -166,26 +166,23 @@ void SfxInfoBarWindow::Paint( const Rectangle& rPaintRect )
...
@@ -166,26 +166,23 @@ void SfxInfoBarWindow::Paint( const Rectangle& rPaintRect )
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Right
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Right
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(
),
aRect
.
Bottom
(
)
)
);
aPolygon
.
setClosed
(
true
);
aPolygon
.
setClosed
(
true
);
drawinglayer
::
primitive2d
::
PolyPolygonColorPrimitive2D
*
pBack
=
PolyPolygonColorPrimitive2D
*
pBack
=
new
drawinglayer
::
primitive2d
::
PolyPolygonColorPrimitive2D
(
new
PolyPolygonColorPrimitive2D
(
basegfx
::
B2DPolyPolygon
(
aPolygon
),
aLightColor
);
basegfx
::
B2DPolyPolygon
(
aPolygon
),
aLightColor
);
aSeq
[
0
]
=
pBack
;
aSeq
[
0
]
=
pBack
;
drawinglayer
::
attribute
::
LineAttribute
aLineAttribute
(
aDarkColor
,
1.0
);
LineAttribute
aLineAttribute
(
aDarkColor
,
1.0
);
// Bottom dark line
// Bottom dark line
basegfx
::
B2DPolygon
aPolygonBottom
;
basegfx
::
B2DPolygon
aPolygonBottom
;
aPolygonBottom
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(),
aRect
.
Bottom
(
)
)
);
aPolygonBottom
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Left
(),
aRect
.
Bottom
(
)
)
);
aPolygonBottom
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Right
(),
aRect
.
Bottom
(
)
)
);
aPolygonBottom
.
append
(
basegfx
::
B2DPoint
(
aRect
.
Right
(),
aRect
.
Bottom
(
)
)
);
drawinglayer
::
primitive2d
::
PolygonStrokePrimitive2D
*
pLineBottom
=
PolygonStrokePrimitive2D
*
pLineBottom
=
new
drawinglayer
::
primitive2d
::
PolygonStrokePrimitive2D
(
new
PolygonStrokePrimitive2D
(
aPolygonBottom
,
aLineAttribute
);
aPolygonBottom
,
aLineAttribute
);
aSeq
[
1
]
=
pLineBottom
;
aSeq
[
1
]
=
pLineBottom
;
pProcessor
->
process
(
aSeq
);
pProcessor
->
process
(
aSeq
);
delete
pProcessor
;
Window
::
Paint
(
rPaintRect
);
Window
::
Paint
(
rPaintRect
);
}
}
...
...
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