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
c7a557cc
Kaydet (Commit)
c7a557cc
authored
Eyl 07, 2011
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Sw page break: added a text above the line to explain the visualization
üst
3f62165f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
pagefrm.hrc
sw/source/core/inc/pagefrm.hrc
+2
-1
pagefrm.src
sw/source/core/layout/pagefrm.src
+5
-0
paintfrm.cxx
sw/source/core/layout/paintfrm.cxx
+31
-1
No files found.
sw/source/core/inc/pagefrm.hrc
Dosyayı görüntüle @
c7a557cc
...
...
@@ -32,10 +32,11 @@
// Bitmaps for page shadow
#define BMP_PAGE_SHADOW_MASK RC_PAGEFRM_BEGIN + 0
#define STR_PAGE_BREAK RC_PAGEFRM_BEGIN + 1
// If you add resources, don't forget to update this
#define PAGEFRM_ACT_END
BMP_PAGE_SHADOW_MAS
K
#define PAGEFRM_ACT_END
STR_PAGE_BREA
K
// Sanity check
#if PAGEFRM_ACT_END > RC_PAGEFRM_END
...
...
sw/source/core/layout/pagefrm.src
Dosyayı görüntüle @
c7a557cc
...
...
@@ -4,3 +4,8 @@ Bitmap BMP_PAGE_SHADOW_MASK
{
File = "page-shadow-mask.png";
};
String STR_PAGE_BREAK
{
Text [ en-US ] = "Manual page break" ;
};
sw/source/core/layout/paintfrm.cxx
Dosyayı görüntüle @
c7a557cc
...
...
@@ -3335,6 +3335,7 @@ void SwPageFrm::PaintBreak( ) const
SwRect
aRect
(
pCnt
->
Prt
()
);
aRect
.
Pos
()
+=
pCnt
->
Frm
().
Pos
();
// Draw the line
basegfx
::
B2DPolygon
aLine
;
aLine
.
append
(
basegfx
::
B2DPoint
(
double
(
aRect
.
Left
()
),
double
(
aRect
.
Top
()
)
)
);
aLine
.
append
(
basegfx
::
B2DPoint
(
double
(
aRect
.
Right
()
),
double
(
aRect
.
Top
()
)
)
);
...
...
@@ -3345,9 +3346,38 @@ void SwPageFrm::PaintBreak( ) const
new
drawinglayer
::
primitive2d
::
PolygonHairlinePrimitive2D
(
aLine
,
aLineColor
);
drawinglayer
::
primitive2d
::
Primitive2DSequence
aSeq
(
1
);
drawinglayer
::
primitive2d
::
Primitive2DSequence
aSeq
(
2
);
aSeq
[
0
]
=
drawinglayer
::
primitive2d
::
Primitive2DReference
(
pLine
);
// Add the text above
rtl
::
OUString
aBreakText
=
ResId
::
toString
(
SW_RES
(
STR_PAGE_BREAK
)
);
basegfx
::
B2DVector
aFontSize
;
OutputDevice
*
pOut
=
pGlobalShell
->
GetOut
();
Font
aFont
=
pOut
->
GetSettings
().
GetStyleSettings
().
GetToolFont
();
aFont
.
SetHeight
(
8
*
20
);
pOut
->
SetFont
(
aFont
);
drawinglayer
::
attribute
::
FontAttribute
aFontAttr
=
drawinglayer
::
primitive2d
::
getFontAttributeFromVclFont
(
aFontSize
,
aFont
,
false
,
false
);
Rectangle
aTextRect
;
pOut
->
GetTextBoundRect
(
aTextRect
,
String
(
aBreakText
)
);
long
nTextXOff
=
(
aRect
.
Width
()
-
aTextRect
.
GetWidth
()
)
/
2
;
basegfx
::
B2DHomMatrix
aTextMatrix
(
basegfx
::
tools
::
createScaleTranslateB2DHomMatrix
(
aFontSize
.
getX
(),
aFontSize
.
getY
(),
aRect
.
Left
()
+
nTextXOff
,
aRect
.
Top
()
)
);
drawinglayer
::
primitive2d
::
TextSimplePortionPrimitive2D
*
pText
=
new
drawinglayer
::
primitive2d
::
TextSimplePortionPrimitive2D
(
aTextMatrix
,
aBreakText
,
0
,
aBreakText
.
getLength
(),
std
::
vector
<
double
>
(),
aFontAttr
,
lang
::
Locale
(),
aLineColor
);
aSeq
[
1
]
=
drawinglayer
::
primitive2d
::
Primitive2DReference
(
pText
);
ProcessPrimitives
(
aSeq
);
}
}
...
...
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