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
6d508f85
Kaydet (Commit)
6d508f85
authored
Eki 06, 2011
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Page Break: implemented final paint of the indicator and its line length
üst
d1b61402
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
34 deletions
+35
-34
page_break.png
default_images/sw/res/page_break.png
+0
-0
PageBreakWin.cxx
sw/source/ui/docvw/PageBreakWin.cxx
+35
-34
No files found.
default_images/sw/res/page_break.png
Değiştirilen dosyayı @ görüntüle
d1b61402
Dosyayı görüntüle @
6d508f85
1.06 KB
|
W:
|
H:
315 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
sw/source/ui/docvw/PageBreakWin.cxx
Dosyayı görüntüle @
6d508f85
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <IDocumentUndoRedo.hxx>
#include <IDocumentUndoRedo.hxx>
#include <PageBreakWin.hxx>
#include <PageBreakWin.hxx>
#include <pagefrm.hxx>
#include <pagefrm.hxx>
#include <PostItMgr.hxx>
#include <view.hxx>
#include <view.hxx>
#include <viewopt.hxx>
#include <viewopt.hxx>
#include <wrtsh.hxx>
#include <wrtsh.hxx>
...
@@ -53,8 +54,9 @@
...
@@ -53,8 +54,9 @@
#include <vcl/decoview.hxx>
#include <vcl/decoview.hxx>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#define BUTTON_SIZE 30
#define BUTTON_WIDTH 30
#define ARROW_WIDTH 20
#define BUTTON_HEIGHT 19
#define ARROW_WIDTH 9
using
namespace
basegfx
;
using
namespace
basegfx
;
using
namespace
basegfx
::
tools
;
using
namespace
basegfx
::
tools
;
...
@@ -65,7 +67,7 @@ namespace
...
@@ -65,7 +67,7 @@ namespace
B2DPolygon
lcl_CreatePolygon
(
B2DRectangle
aBounds
)
B2DPolygon
lcl_CreatePolygon
(
B2DRectangle
aBounds
)
{
{
B2DPolygon
aRetval
;
B2DPolygon
aRetval
;
const
double
nRadius
=
4
;
const
double
nRadius
=
1
;
const
double
nKappa
((
M_SQRT2
-
1.0
)
*
4.0
/
3.0
);
const
double
nKappa
((
M_SQRT2
-
1.0
)
*
4.0
/
3.0
);
// Create the top left corner
// Create the top left corner
...
@@ -204,39 +206,34 @@ void SwPageBreakWin::Paint( const Rectangle& )
...
@@ -204,39 +206,34 @@ void SwPageBreakWin::Paint( const Rectangle& )
sdr
::
contact
::
createBaseProcessor2DFromOutputDevice
(
sdr
::
contact
::
createBaseProcessor2DFromOutputDevice
(
*
this
,
aNewViewInfos
);
*
this
,
aNewViewInfos
);
pProcessor
->
process
(
aSeq
);
// Paint the picture
Image
aImg
(
SW_RES
(
IMG_PAGE_BREAK
)
);
DrawImage
(
Point
(
3
,
3
),
aImg
);
// Paint the symbol if not readonly button
// Paint the symbol if not readonly button
if
(
IsEnabled
()
)
if
(
IsEnabled
()
)
{
{
Point
aPicPos
(
aRect
.
getWidth
()
-
ARROW_WIDTH
,
0
);
double
nTop
=
double
(
aRect
.
getHeight
()
)
/
2.0
;
Size
aPicSize
(
ARROW_WIDTH
,
aRect
.
getHeight
()
);
double
nBottom
=
nTop
+
4.0
;
Rectangle
aSymbolRect
(
aPicPos
,
aPicSize
);
double
nLeft
=
aRect
.
getWidth
(
)
-
ARROW_WIDTH
-
6.0
;
double
nRight
=
aRect
.
getWidth
(
)
-
ARROW_WIDTH
+
2.0
;
// 10% distance to the left
const
long
nBorderDistanceLeft
=
((
aSymbolRect
.
GetWidth
()
*
100
)
+
500
)
/
1000
;
B2DPolygon
aTriangle
;
aSymbolRect
.
Left
()
+=
nBorderDistanceLeft
;
aTriangle
.
append
(
B2DPoint
(
nLeft
,
nTop
)
);
// 40% distance to the right
aTriangle
.
append
(
B2DPoint
(
nRight
,
nTop
)
);
const
long
nBorderDistanceRight
=
((
aSymbolRect
.
GetWidth
()
*
400
)
+
500
)
/
1000
;
aTriangle
.
append
(
B2DPoint
(
(
nLeft
+
nRight
)
/
2.0
,
nBottom
)
);
aSymbolRect
.
Right
()
-=
nBorderDistanceRight
;
aTriangle
.
setClosed
(
true
);
// 30% distance to the top button border
const
long
nBorderDistanceTop
=
((
aSymbolRect
.
GetHeight
()
*
300
)
+
500
)
/
1000
;
BColor
aTriangleColor
=
Color
(
COL_BLACK
).
getBColor
(
);
aSymbolRect
.
Top
()
+=
nBorderDistanceTop
;
if
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
()
)
// 25% distance to the bottom button border
aTriangleColor
=
Color
(
COL_WHITE
).
getBColor
(
);
const
long
nBorderDistanceBottom
=
((
aSymbolRect
.
GetHeight
()
*
250
)
+
500
)
/
1000
;
aSymbolRect
.
Bottom
()
-=
nBorderDistanceBottom
;
aSeq
.
realloc
(
aSeq
.
getLength
()
+
1
);
aSeq
[
aSeq
.
getLength
()
-
1
]
=
Primitive2DReference
(
new
PolyPolygonColorPrimitive2D
(
SymbolType
nSymbol
=
SYMBOL_SPIN_DOWN
;
B2DPolyPolygon
(
aTriangle
),
aTriangleColor
)
);
DecorationView
aDecoView
(
this
);
aDecoView
.
DrawSymbol
(
aSymbolRect
,
nSymbol
,
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
()
?
Color
(
COL_WHITE
)
:
Color
(
COL_BLACK
)
)
);
}
}
pProcessor
->
process
(
aSeq
);
// Paint the picture
Image
aImg
(
SW_RES
(
IMG_PAGE_BREAK
)
);
DrawImage
(
Point
(
3
,
1
),
aImg
);
}
}
void
SwPageBreakWin
::
Select
(
)
void
SwPageBreakWin
::
Select
(
)
...
@@ -312,7 +309,7 @@ void SwPageBreakWin::UpdatePosition( )
...
@@ -312,7 +309,7 @@ void SwPageBreakWin::UpdatePosition( )
if
(
aFrmRect
.
Top
()
==
aPrevFrmRect
.
Top
()
)
if
(
aFrmRect
.
Top
()
==
aPrevFrmRect
.
Top
()
)
nYLineOffset
=
(
aBoundRect
.
Top
()
+
aFrmRect
.
Top
()
)
/
2
;
nYLineOffset
=
(
aBoundRect
.
Top
()
+
aFrmRect
.
Top
()
)
/
2
;
Size
aBtnSize
(
BUTTON_
SIZE
+
ARROW_WIDTH
,
BUTTON_SIZE
);
Size
aBtnSize
(
BUTTON_
WIDTH
+
ARROW_WIDTH
,
BUTTON_HEIGHT
);
Point
aBtnPos
(
aFrmRect
.
Left
()
-
aBtnSize
.
Width
()
+
ARROW_WIDTH
/
2
,
Point
aBtnPos
(
aFrmRect
.
Left
()
-
aBtnSize
.
Width
()
+
ARROW_WIDTH
/
2
,
nYLineOffset
-
aBtnSize
.
Height
()
/
2
);
nYLineOffset
-
aBtnSize
.
Height
()
/
2
);
...
@@ -320,7 +317,11 @@ void SwPageBreakWin::UpdatePosition( )
...
@@ -320,7 +317,11 @@ void SwPageBreakWin::UpdatePosition( )
// Update the line position
// Update the line position
Point
aLinePos
(
aFrmRect
.
Left
()
+
ARROW_WIDTH
/
2
,
nYLineOffset
);
Point
aLinePos
(
aFrmRect
.
Left
()
+
ARROW_WIDTH
/
2
,
nYLineOffset
);
Size
aLineSize
(
aBoundRect
.
getWidth
(),
1
);
unsigned
long
nSidebarWidth
=
0
;
const
SwPostItMgr
*
pPostItMngr
=
GetEditWin
()
->
GetView
().
GetWrtShell
().
GetPostItMgr
();
if
(
pPostItMngr
&&
pPostItMngr
->
HasNotes
()
&&
pPostItMngr
->
ShowNotes
()
)
nSidebarWidth
=
pPostItMngr
->
GetSidebarBorderWidth
(
true
)
+
pPostItMngr
->
GetSidebarWidth
(
true
);
Size
aLineSize
(
aFrmRect
.
GetWidth
()
+
nSidebarWidth
-
ARROW_WIDTH
/
2
,
1
);
m_pLine
->
SetPosSizePixel
(
aLinePos
,
aLineSize
);
m_pLine
->
SetPosSizePixel
(
aLinePos
,
aLineSize
);
}
}
...
...
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