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
beb8a857
Kaydet (Commit)
beb8a857
authored
Şub 13, 2012
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Header/Footer, Page Break: don't show them in RO mode (fdo#45548)
üst
492dbf9c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
77 deletions
+70
-77
paintfrm.cxx
sw/source/core/layout/paintfrm.cxx
+3
-0
HeaderFooterWin.cxx
sw/source/ui/docvw/HeaderFooterWin.cxx
+46
-51
PageBreakWin.cxx
sw/source/ui/docvw/PageBreakWin.cxx
+21
-25
HeaderFooterWin.hxx
sw/source/ui/inc/HeaderFooterWin.hxx
+0
-1
No files found.
sw/source/core/layout/paintfrm.cxx
Dosyayı görüntüle @
beb8a857
...
...
@@ -3341,6 +3341,7 @@ void SwPageFrm::PaintBreak( ) const
{
if
(
pGlobalShell
->
GetOut
()
->
GetOutDevType
()
!=
OUTDEV_PRINTER
&&
!
pGlobalShell
->
GetViewOptions
()
->
IsPDFExport
()
&&
!
pGlobalShell
->
GetViewOptions
()
->
IsReadonly
()
&&
!
pGlobalShell
->
IsPreView
()
)
{
const
SwFrm
*
pBodyFrm
=
Lower
();
...
...
@@ -3377,6 +3378,7 @@ void SwColumnFrm::PaintBreak( ) const
{
if
(
pGlobalShell
->
GetOut
()
->
GetOutDevType
()
!=
OUTDEV_PRINTER
&&
!
pGlobalShell
->
GetViewOptions
()
->
IsPDFExport
()
&&
!
pGlobalShell
->
GetViewOptions
()
->
IsReadonly
()
&&
!
pGlobalShell
->
IsPreView
()
)
{
const
SwFrm
*
pBodyFrm
=
Lower
();
...
...
@@ -3486,6 +3488,7 @@ void SwPageFrm::PaintDecorators( ) const
if
(
pGlobalShell
->
GetOut
()
->
GetOutDevType
()
!=
OUTDEV_PRINTER
&&
!
pGlobalShell
->
GetViewOptions
()
->
IsPDFExport
()
&&
!
pGlobalShell
->
IsPreView
()
&&
!
pGlobalShell
->
GetViewOptions
()
->
IsReadonly
()
&&
(
pGlobalShell
->
IsShowHeaderFooterSeparator
(
Header
)
||
pGlobalShell
->
IsShowHeaderFooterSeparator
(
Footer
)
)
)
{
...
...
sw/source/ui/docvw/HeaderFooterWin.cxx
Dosyayı görüntüle @
beb8a857
...
...
@@ -148,7 +148,6 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
SwFrameControl
(
pEditWin
,
pPageFrm
),
m_sLabel
(
),
m_bIsHeader
(
bHeader
),
m_bReadonly
(
false
),
m_pPopupMenu
(
NULL
),
m_pLine
(
NULL
),
m_bIsAppearing
(
false
),
...
...
@@ -329,57 +328,54 @@ void SwHeaderFooterWin::Paint( const Rectangle& )
com
::
sun
::
star
::
lang
::
Locale
(),
aLineColor
)
);
// Create the 'plus' or 'arrow' primitive if not readonly
if
(
!
m_bReadonly
)
{
B2DRectangle
aSignArea
(
B2DPoint
(
aRect
.
Right
()
-
BUTTON_WIDTH
,
0.0
),
B2DSize
(
aRect
.
Right
(),
aRect
.
getHeight
()
)
);
// Create the 'plus' or 'arrow' primitive
B2DRectangle
aSignArea
(
B2DPoint
(
aRect
.
Right
()
-
BUTTON_WIDTH
,
0.0
),
B2DSize
(
aRect
.
Right
(),
aRect
.
getHeight
()
)
);
B2DPolygon
aSign
;
if
(
IsEmptyHeaderFooter
(
)
)
{
// Create the + polygon
double
nLeft
=
aSignArea
.
getMinX
()
+
TEXT_PADDING
;
double
nRight
=
aSignArea
.
getMaxX
()
-
TEXT_PADDING
;
double
nHalfW
=
(
nRight
-
nLeft
)
/
2.0
;
double
nTop
=
aSignArea
.
getCenterY
()
-
nHalfW
;
double
nBottom
=
aSignArea
.
getCenterY
()
+
nHalfW
;
aSign
.
append
(
B2DPoint
(
nLeft
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
nTop
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
nTop
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
nRight
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
nRight
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
nBottom
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
nBottom
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
append
(
B2DPoint
(
nLeft
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
setClosed
(
true
);
}
else
{
// Create the v polygon
B2DPoint
aLeft
(
aSignArea
.
getMinX
()
+
TEXT_PADDING
,
aSignArea
.
getCenterY
()
);
B2DPoint
aRight
(
aSignArea
.
getMaxX
()
-
TEXT_PADDING
,
aSignArea
.
getCenterY
()
);
B2DPoint
aBottom
(
(
aLeft
.
getX
()
+
aRight
.
getX
()
)
/
2.0
,
aLeft
.
getY
()
+
4.0
);
aSign
.
append
(
aLeft
);
aSign
.
append
(
aRight
);
aSign
.
append
(
aBottom
);
aSign
.
setClosed
(
true
);
}
B2DPolygon
aSign
;
if
(
IsEmptyHeaderFooter
(
)
)
{
// Create the + polygon
double
nLeft
=
aSignArea
.
getMinX
()
+
TEXT_PADDING
;
double
nRight
=
aSignArea
.
getMaxX
()
-
TEXT_PADDING
;
double
nHalfW
=
(
nRight
-
nLeft
)
/
2.0
;
double
nTop
=
aSignArea
.
getCenterY
()
-
nHalfW
;
double
nBottom
=
aSignArea
.
getCenterY
()
+
nHalfW
;
aSign
.
append
(
B2DPoint
(
nLeft
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
nTop
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
nTop
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
nRight
,
aSignArea
.
getCenterY
()
-
1.0
)
);
aSign
.
append
(
B2DPoint
(
nRight
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
+
1.0
,
nBottom
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
nBottom
)
);
aSign
.
append
(
B2DPoint
(
aSignArea
.
getCenterX
()
-
1.0
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
append
(
B2DPoint
(
nLeft
,
aSignArea
.
getCenterY
()
+
1.0
)
);
aSign
.
setClosed
(
true
);
}
else
{
// Create the v polygon
B2DPoint
aLeft
(
aSignArea
.
getMinX
()
+
TEXT_PADDING
,
aSignArea
.
getCenterY
()
);
B2DPoint
aRight
(
aSignArea
.
getMaxX
()
-
TEXT_PADDING
,
aSignArea
.
getCenterY
()
);
B2DPoint
aBottom
(
(
aLeft
.
getX
()
+
aRight
.
getX
()
)
/
2.0
,
aLeft
.
getY
()
+
4.0
);
aSign
.
append
(
aLeft
);
aSign
.
append
(
aRight
);
aSign
.
append
(
aBottom
);
aSign
.
setClosed
(
true
);
}
BColor
aSignColor
=
Color
(
COL_BLACK
).
getBColor
(
);
if
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
()
)
aSignColor
=
Color
(
COL_WHITE
).
getBColor
(
);
BColor
aSignColor
=
Color
(
COL_BLACK
).
getBColor
(
);
if
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
()
)
aSignColor
=
Color
(
COL_WHITE
).
getBColor
(
);
aSeq
.
realloc
(
aSeq
.
getLength
()
+
1
);
aSeq
[
aSeq
.
getLength
()
-
1
]
=
Primitive2DReference
(
new
PolyPolygonColorPrimitive2D
(
B2DPolyPolygon
(
aSign
),
aSignColor
)
);
}
aSeq
.
realloc
(
aSeq
.
getLength
()
+
1
);
aSeq
[
aSeq
.
getLength
()
-
1
]
=
Primitive2DReference
(
new
PolyPolygonColorPrimitive2D
(
B2DPolyPolygon
(
aSign
),
aSignColor
)
);
// Create the processor and process the primitives
const
drawinglayer
::
geometry
::
ViewInformation2D
aNewViewInfos
;
...
...
@@ -495,8 +491,7 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot )
void
SwHeaderFooterWin
::
SetReadonly
(
bool
bReadonly
)
{
m_bReadonly
=
bReadonly
;
Update
();
ShowAll
(
!
bReadonly
);
}
void
SwHeaderFooterWin
::
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
...
...
sw/source/ui/docvw/PageBreakWin.cxx
Dosyayı görüntüle @
beb8a857
...
...
@@ -182,30 +182,26 @@ void SwPageBreakWin::Paint( const Rectangle& )
aSeq
[
2
]
=
Primitive2DReference
(
new
DiscreteBitmapPrimitive2D
(
aImg
.
GetBitmapEx
(),
B2DPoint
(
nImgOfstX
,
1.0
)
)
);
// Paint the symbol if not readonly button
if
(
IsEnabled
()
)
{
double
nTop
=
double
(
aRect
.
getHeight
()
)
/
2.0
;
double
nBottom
=
nTop
+
4.0
;
double
nLeft
=
aRect
.
getWidth
(
)
-
ARROW_WIDTH
-
6.0
;
if
(
bRtl
)
nLeft
=
ARROW_WIDTH
-
2.0
;
double
nRight
=
nLeft
+
8.0
;
B2DPolygon
aTriangle
;
aTriangle
.
append
(
B2DPoint
(
nLeft
,
nTop
)
);
aTriangle
.
append
(
B2DPoint
(
nRight
,
nTop
)
);
aTriangle
.
append
(
B2DPoint
(
(
nLeft
+
nRight
)
/
2.0
,
nBottom
)
);
aTriangle
.
setClosed
(
true
);
BColor
aTriangleColor
=
Color
(
COL_BLACK
).
getBColor
(
);
if
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
()
)
aTriangleColor
=
Color
(
COL_WHITE
).
getBColor
(
);
aSeq
.
realloc
(
aSeq
.
getLength
()
+
1
);
aSeq
[
aSeq
.
getLength
()
-
1
]
=
Primitive2DReference
(
new
PolyPolygonColorPrimitive2D
(
B2DPolyPolygon
(
aTriangle
),
aTriangleColor
)
);
}
double
nTop
=
double
(
aRect
.
getHeight
()
)
/
2.0
;
double
nBottom
=
nTop
+
4.0
;
double
nLeft
=
aRect
.
getWidth
(
)
-
ARROW_WIDTH
-
6.0
;
if
(
bRtl
)
nLeft
=
ARROW_WIDTH
-
2.0
;
double
nRight
=
nLeft
+
8.0
;
B2DPolygon
aTriangle
;
aTriangle
.
append
(
B2DPoint
(
nLeft
,
nTop
)
);
aTriangle
.
append
(
B2DPoint
(
nRight
,
nTop
)
);
aTriangle
.
append
(
B2DPoint
(
(
nLeft
+
nRight
)
/
2.0
,
nBottom
)
);
aTriangle
.
setClosed
(
true
);
BColor
aTriangleColor
=
Color
(
COL_BLACK
).
getBColor
(
);
if
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighContrastMode
()
)
aTriangleColor
=
Color
(
COL_WHITE
).
getBColor
(
);
aSeq
.
realloc
(
aSeq
.
getLength
()
+
1
);
aSeq
[
aSeq
.
getLength
()
-
1
]
=
Primitive2DReference
(
new
PolyPolygonColorPrimitive2D
(
B2DPolyPolygon
(
aTriangle
),
aTriangleColor
)
);
Primitive2DSequence
aGhostedSeq
(
1
);
double
nFadeRate
=
double
(
m_nFadeRate
)
/
100.0
;
...
...
@@ -419,7 +415,7 @@ const SwPageFrm* SwPageBreakWin::GetPageFrame( )
void
SwPageBreakWin
::
SetReadonly
(
bool
bReadonly
)
{
Enable
(
!
bReadonly
);
ShowAll
(
!
bReadonly
);
}
void
SwPageBreakWin
::
Fade
(
bool
bFadeIn
)
...
...
sw/source/ui/inc/HeaderFooterWin.hxx
Dosyayı görüntüle @
beb8a857
...
...
@@ -41,7 +41,6 @@ class SwHeaderFooterWin : public MenuButton, public SwFrameControl
{
rtl
::
OUString
m_sLabel
;
bool
m_bIsHeader
;
bool
m_bReadonly
;
PopupMenu
*
m_pPopupMenu
;
Window
*
m_pLine
;
bool
m_bIsAppearing
;
...
...
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