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
c7350070
Kaydet (Commit)
c7350070
authored
Haz 19, 2015
tarafından
Krisztian Pinter
Kaydeden (comit)
Jan Holesovsky
Tem 24, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
calc mapmode: Pass RenderContext as reference in DrawFrame
Change-Id: I6c9a476a8dea5266868c94d6a1203cfe840171cf
üst
8cfdd81b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
32 deletions
+33
-32
output.hxx
sc/source/ui/inc/output.hxx
+2
-2
gridwin4.cxx
sc/source/ui/view/gridwin4.cxx
+1
-1
output.cxx
sc/source/ui/view/output.cxx
+26
-26
printfun.cxx
sc/source/ui/view/printfun.cxx
+4
-3
No files found.
sc/source/ui/inc/output.hxx
Dosyayı görüntüle @
c7350070
...
@@ -239,7 +239,7 @@ private:
...
@@ -239,7 +239,7 @@ private:
double
GetStretch
();
double
GetStretch
();
void
DrawRotatedFrame
(
const
Color
*
pForceColor
);
// pixel
void
DrawRotatedFrame
(
vcl
::
RenderContext
&
rRenderContext
,
const
Color
*
pForceColor
);
// pixel
drawinglayer
::
processor2d
::
BaseProcessor2D
*
CreateProcessor2D
(
);
drawinglayer
::
processor2d
::
BaseProcessor2D
*
CreateProcessor2D
(
);
...
@@ -307,7 +307,7 @@ public:
...
@@ -307,7 +307,7 @@ public:
void
DrawBackground
(
vcl
::
RenderContext
&
rRenderContext
);
void
DrawBackground
(
vcl
::
RenderContext
&
rRenderContext
);
void
DrawShadow
();
void
DrawShadow
();
void
DrawExtraShadow
(
bool
bLeft
,
bool
bTop
,
bool
bRight
,
bool
bBottom
);
void
DrawExtraShadow
(
bool
bLeft
,
bool
bTop
,
bool
bRight
,
bool
bBottom
);
void
DrawFrame
();
void
DrawFrame
(
vcl
::
RenderContext
&
rRenderContext
);
// with logic MapMode set!
// with logic MapMode set!
void
DrawEdit
(
bool
bPixelToLogic
);
void
DrawEdit
(
bool
bPixelToLogic
);
...
...
sc/source/ui/view/gridwin4.cxx
Dosyayı görüntüle @
c7350070
...
@@ -743,7 +743,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
...
@@ -743,7 +743,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
}
}
aOutputData
.
DrawShadow
();
aOutputData
.
DrawShadow
();
aOutputData
.
DrawFrame
();
aOutputData
.
DrawFrame
(
*
pContentDev
);
// Show Note Mark
// Show Note Mark
if
(
rOpts
.
GetOption
(
VOPT_NOTES
)
)
if
(
rOpts
.
GetOption
(
VOPT_NOTES
)
)
...
...
sc/source/ui/view/output.cxx
Dosyayı görüntüle @
c7350070
...
@@ -1286,9 +1286,9 @@ size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoF
...
@@ -1286,9 +1286,9 @@ size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoF
return
static_cast
<
size_t
>
(
bRTL
?
(
nCellInfoLastX
+
2
-
nCellInfoX
)
:
(
nCellInfoX
-
nCellInfoFirstX
)
);
return
static_cast
<
size_t
>
(
bRTL
?
(
nCellInfoLastX
+
2
-
nCellInfoX
)
:
(
nCellInfoX
-
nCellInfoFirstX
)
);
}
}
void
ScOutputData
::
DrawFrame
()
void
ScOutputData
::
DrawFrame
(
vcl
::
RenderContext
&
rRenderContext
)
{
{
DrawModeFlags
nOldDrawMode
=
mpDev
->
GetDrawMode
();
DrawModeFlags
nOldDrawMode
=
rRenderContext
.
GetDrawMode
();
Color
aSingleColor
;
Color
aSingleColor
;
bool
bUseSingleColor
=
false
;
bool
bUseSingleColor
=
false
;
...
@@ -1302,13 +1302,13 @@ void ScOutputData::DrawFrame()
...
@@ -1302,13 +1302,13 @@ void ScOutputData::DrawFrame()
if
(
(
nOldDrawMode
&
DrawModeFlags
::
WhiteFill
)
&&
(
nOldDrawMode
&
DrawModeFlags
::
BlackLine
)
)
if
(
(
nOldDrawMode
&
DrawModeFlags
::
WhiteFill
)
&&
(
nOldDrawMode
&
DrawModeFlags
::
BlackLine
)
)
{
{
mpDev
->
SetDrawMode
(
nOldDrawMode
&
(
~
DrawModeFlags
::
WhiteFill
)
);
rRenderContext
.
SetDrawMode
(
nOldDrawMode
&
(
~
DrawModeFlags
::
WhiteFill
)
);
aSingleColor
.
SetColor
(
COL_BLACK
);
aSingleColor
.
SetColor
(
COL_BLACK
);
bUseSingleColor
=
true
;
bUseSingleColor
=
true
;
}
}
else
if
(
(
nOldDrawMode
&
DrawModeFlags
::
SettingsFill
)
&&
(
nOldDrawMode
&
DrawModeFlags
::
SettingsLine
)
)
else
if
(
(
nOldDrawMode
&
DrawModeFlags
::
SettingsFill
)
&&
(
nOldDrawMode
&
DrawModeFlags
::
SettingsLine
)
)
{
{
mpDev
->
SetDrawMode
(
nOldDrawMode
&
(
~
DrawModeFlags
::
SettingsFill
)
);
rRenderContext
.
SetDrawMode
(
nOldDrawMode
&
(
~
DrawModeFlags
::
SettingsFill
)
);
aSingleColor
=
rStyleSettings
.
GetWindowTextColor
();
// same as used in VCL for DrawModeFlags::SettingsLine
aSingleColor
=
rStyleSettings
.
GetWindowTextColor
();
// same as used in VCL for DrawModeFlags::SettingsLine
bUseSingleColor
=
true
;
bUseSingleColor
=
true
;
}
}
...
@@ -1321,12 +1321,12 @@ void ScOutputData::DrawFrame()
...
@@ -1321,12 +1321,12 @@ void ScOutputData::DrawFrame()
const
Color
*
pForceColor
=
bUseSingleColor
?
&
aSingleColor
:
0
;
const
Color
*
pForceColor
=
bUseSingleColor
?
&
aSingleColor
:
0
;
if
(
bAnyRotated
)
if
(
bAnyRotated
)
DrawRotatedFrame
(
pForceColor
);
// removes the lines that must not be painted here
DrawRotatedFrame
(
rRenderContext
,
pForceColor
);
// removes the lines that must not be painted here
long
nInitPosX
=
nScrX
;
long
nInitPosX
=
nScrX
;
if
(
bLayoutRTL
)
if
(
bLayoutRTL
)
{
{
Size
aOnePixel
=
mpDev
->
PixelToLogic
(
Size
(
1
,
1
));
Size
aOnePixel
=
rRenderContext
.
PixelToLogic
(
Size
(
1
,
1
));
long
nOneX
=
aOnePixel
.
Width
();
long
nOneX
=
aOnePixel
.
Width
();
nInitPosX
+=
nMirrorW
-
nOneX
;
nInitPosX
+=
nMirrorW
-
nOneX
;
}
}
...
@@ -1343,12 +1343,12 @@ void ScOutputData::DrawFrame()
...
@@ -1343,12 +1343,12 @@ void ScOutputData::DrawFrame()
// row 0 is not visible (dummy for borders from top) - subtract its height from initial position
// row 0 is not visible (dummy for borders from top) - subtract its height from initial position
// subtract 1 unit more, because position 0 is first *in* cell, grid line is one unit before
// subtract 1 unit more, because position 0 is first *in* cell, grid line is one unit before
long
nOldPosY
=
nScrY
-
1
-
pRowInfo
[
0
].
nHeight
;
long
nOldPosY
=
nScrY
-
1
-
pRowInfo
[
0
].
nHeight
;
long
nOldSnapY
=
lclGetSnappedY
(
*
mpDev
,
nOldPosY
,
bSnapPixel
);
long
nOldSnapY
=
lclGetSnappedY
(
rRenderContext
,
nOldPosY
,
bSnapPixel
);
rArray
.
SetYOffset
(
nOldSnapY
);
rArray
.
SetYOffset
(
nOldSnapY
);
for
(
size_t
nRow
=
0
;
nRow
<
nRowCount
;
++
nRow
)
for
(
size_t
nRow
=
0
;
nRow
<
nRowCount
;
++
nRow
)
{
{
long
nNewPosY
=
nOldPosY
+
pRowInfo
[
nRow
].
nHeight
;
long
nNewPosY
=
nOldPosY
+
pRowInfo
[
nRow
].
nHeight
;
long
nNewSnapY
=
lclGetSnappedY
(
*
mpDev
,
nNewPosY
,
bSnapPixel
);
long
nNewSnapY
=
lclGetSnappedY
(
rRenderContext
,
nNewPosY
,
bSnapPixel
);
rArray
.
SetRowHeight
(
nRow
,
nNewSnapY
-
nOldSnapY
);
rArray
.
SetRowHeight
(
nRow
,
nNewSnapY
-
nOldSnapY
);
nOldPosY
=
nNewPosY
;
nOldPosY
=
nNewPosY
;
nOldSnapY
=
nNewSnapY
;
nOldSnapY
=
nNewSnapY
;
...
@@ -1359,7 +1359,7 @@ void ScOutputData::DrawFrame()
...
@@ -1359,7 +1359,7 @@ void ScOutputData::DrawFrame()
// column nX1 is not visible (dummy for borders from left) - subtract its width from initial position
// column nX1 is not visible (dummy for borders from left) - subtract its width from initial position
// subtract 1 unit more, because position 0 is first *in* cell, grid line is one unit above
// subtract 1 unit more, because position 0 is first *in* cell, grid line is one unit above
long
nOldPosX
=
nInitPosX
-
nLayoutSign
*
(
1
+
pRowInfo
[
0
].
pCellInfo
[
nX1
].
nWidth
);
long
nOldPosX
=
nInitPosX
-
nLayoutSign
*
(
1
+
pRowInfo
[
0
].
pCellInfo
[
nX1
].
nWidth
);
long
nOldSnapX
=
lclGetSnappedX
(
*
mpDev
,
nOldPosX
,
bSnapPixel
);
long
nOldSnapX
=
lclGetSnappedX
(
rRenderContext
,
nOldPosX
,
bSnapPixel
);
// set X offset for left-to-right sheets; for right-to-left sheets this is done after for() loop
// set X offset for left-to-right sheets; for right-to-left sheets this is done after for() loop
if
(
!
bLayoutRTL
)
if
(
!
bLayoutRTL
)
rArray
.
SetXOffset
(
nOldSnapX
);
rArray
.
SetXOffset
(
nOldSnapX
);
...
@@ -1367,7 +1367,7 @@ void ScOutputData::DrawFrame()
...
@@ -1367,7 +1367,7 @@ void ScOutputData::DrawFrame()
{
{
size_t
nCol
=
lclGetArrayColFromCellInfoX
(
nInfoIdx
,
nX1
,
nX2
,
bLayoutRTL
);
size_t
nCol
=
lclGetArrayColFromCellInfoX
(
nInfoIdx
,
nX1
,
nX2
,
bLayoutRTL
);
long
nNewPosX
=
nOldPosX
+
pRowInfo
[
0
].
pCellInfo
[
nInfoIdx
].
nWidth
*
nLayoutSign
;
long
nNewPosX
=
nOldPosX
+
pRowInfo
[
0
].
pCellInfo
[
nInfoIdx
].
nWidth
*
nLayoutSign
;
long
nNewSnapX
=
lclGetSnappedX
(
*
mpDev
,
nNewPosX
,
bSnapPixel
);
long
nNewSnapX
=
lclGetSnappedX
(
rRenderContext
,
nNewPosX
,
bSnapPixel
);
rArray
.
SetColWidth
(
nCol
,
std
::
abs
(
nNewSnapX
-
nOldSnapX
)
);
rArray
.
SetColWidth
(
nCol
,
std
::
abs
(
nNewSnapX
-
nOldSnapX
)
);
nOldPosX
=
nNewPosX
;
nOldPosX
=
nNewPosX
;
nOldSnapX
=
nNewSnapX
;
nOldSnapX
=
nNewSnapX
;
...
@@ -1404,7 +1404,7 @@ void ScOutputData::DrawFrame()
...
@@ -1404,7 +1404,7 @@ void ScOutputData::DrawFrame()
}
}
pProcessor
.
reset
();
pProcessor
.
reset
();
mpDev
->
SetDrawMode
(
nOldDrawMode
);
rRenderContext
.
SetDrawMode
(
nOldDrawMode
);
}
}
// Line below the cell
// Line below the cell
...
@@ -1474,7 +1474,7 @@ static long lcl_getRotate( ScDocument* pDoc, SCTAB nTab, SCCOL nX, SCROW nY )
...
@@ -1474,7 +1474,7 @@ static long lcl_getRotate( ScDocument* pDoc, SCTAB nTab, SCCOL nX, SCROW nY )
return
nRotate
;
return
nRotate
;
}
}
void
ScOutputData
::
DrawRotatedFrame
(
const
Color
*
pForceColor
)
void
ScOutputData
::
DrawRotatedFrame
(
vcl
::
RenderContext
&
rRenderContext
,
const
Color
*
pForceColor
)
{
{
//! save nRotMax
//! save nRotMax
SCCOL
nRotMax
=
nX2
;
SCCOL
nRotMax
=
nX2
;
...
@@ -1493,7 +1493,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
...
@@ -1493,7 +1493,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
long
nInitPosX
=
nScrX
;
long
nInitPosX
=
nScrX
;
if
(
bLayoutRTL
)
if
(
bLayoutRTL
)
{
{
Size
aOnePixel
=
mpDev
->
PixelToLogic
(
Size
(
1
,
1
));
Size
aOnePixel
=
rRenderContext
.
PixelToLogic
(
Size
(
1
,
1
));
long
nOneX
=
aOnePixel
.
Width
();
long
nOneX
=
aOnePixel
.
Width
();
nInitPosX
+=
nMirrorW
-
nOneX
;
nInitPosX
+=
nMirrorW
-
nOneX
;
}
}
...
@@ -1502,11 +1502,11 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
...
@@ -1502,11 +1502,11 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
Rectangle
aClipRect
(
Point
(
nScrX
,
nScrY
),
Size
(
nScrW
,
nScrH
)
);
Rectangle
aClipRect
(
Point
(
nScrX
,
nScrY
),
Size
(
nScrW
,
nScrH
)
);
if
(
bMetaFile
)
if
(
bMetaFile
)
{
{
mpDev
->
Push
();
rRenderContext
.
Push
();
mpDev
->
IntersectClipRegion
(
aClipRect
);
rRenderContext
.
IntersectClipRegion
(
aClipRect
);
}
}
else
else
mpDev
->
SetClipRegion
(
vcl
::
Region
(
aClipRect
)
);
rRenderContext
.
SetClipRegion
(
vcl
::
Region
(
aClipRect
)
);
svx
::
frame
::
Array
&
rArray
=
mrTabInfo
.
maArray
;
svx
::
frame
::
Array
&
rArray
=
mrTabInfo
.
maArray
;
boost
::
scoped_ptr
<
drawinglayer
::
processor2d
::
BaseProcessor2D
>
pProcessor
(
CreateProcessor2D
(
));
boost
::
scoped_ptr
<
drawinglayer
::
processor2d
::
BaseProcessor2D
>
pProcessor
(
CreateProcessor2D
(
));
...
@@ -1643,11 +1643,11 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
...
@@ -1643,11 +1643,11 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
// ohne Pen wird bei DrawPolygon rechts und unten
// ohne Pen wird bei DrawPolygon rechts und unten
// ein Pixel weggelassen...
// ein Pixel weggelassen...
if
(
rColor
.
GetTransparency
()
==
0
)
if
(
rColor
.
GetTransparency
()
==
0
)
mpDev
->
SetLineColor
(
rColor
);
rRenderContext
.
SetLineColor
(
rColor
);
else
else
mpDev
->
SetLineColor
();
rRenderContext
.
SetLineColor
();
mpDev
->
SetFillColor
(
rColor
);
rRenderContext
.
SetFillColor
(
rColor
);
mpDev
->
DrawPolygon
(
aPoly
);
rRenderContext
.
DrawPolygon
(
aPoly
);
}
}
}
}
}
}
...
@@ -1659,11 +1659,11 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
...
@@ -1659,11 +1659,11 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
// ohne Pen wird bei DrawPolygon rechts und unten
// ohne Pen wird bei DrawPolygon rechts und unten
// ein Pixel weggelassen...
// ein Pixel weggelassen...
if
(
pColor
->
GetTransparency
()
==
0
)
if
(
pColor
->
GetTransparency
()
==
0
)
mpDev
->
SetLineColor
(
*
pColor
);
rRenderContext
.
SetLineColor
(
*
pColor
);
else
else
mpDev
->
SetLineColor
();
rRenderContext
.
SetLineColor
();
mpDev
->
SetFillColor
(
*
pColor
);
rRenderContext
.
SetFillColor
(
*
pColor
);
mpDev
->
DrawPolygon
(
aPoly
);
rRenderContext
.
DrawPolygon
(
aPoly
);
}
}
...
@@ -1813,9 +1813,9 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
...
@@ -1813,9 +1813,9 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
pProcessor
.
reset
();
pProcessor
.
reset
();
if
(
bMetaFile
)
if
(
bMetaFile
)
mpDev
->
Pop
();
rRenderContext
.
Pop
();
else
else
mpDev
->
SetClipRegion
();
rRenderContext
.
SetClipRegion
();
}
}
drawinglayer
::
processor2d
::
BaseProcessor2D
*
ScOutputData
::
CreateProcessor2D
(
)
drawinglayer
::
processor2d
::
BaseProcessor2D
*
ScOutputData
::
CreateProcessor2D
(
)
...
...
sc/source/ui/view/printfun.cxx
Dosyayı görüntüle @
c7350070
...
@@ -549,8 +549,9 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
...
@@ -549,8 +549,9 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
pDev
->
SetMapMode
(
aMode
);
pDev
->
SetMapMode
(
aMode
);
aOutputData
.
DrawBackground
(
*
pDev
);
aOutputData
.
DrawBackground
(
*
pDev
);
aOutputData
.
DrawShadow
();
aOutputData
.
DrawShadow
();
aOutputData
.
DrawFrame
();
aOutputData
.
DrawFrame
(
*
pDev
);
aOutputData
.
DrawStrings
();
aOutputData
.
DrawStrings
();
if
(
!
bMetaFile
&&
pViewData
)
if
(
!
bMetaFile
&&
pViewData
)
...
@@ -1349,7 +1350,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
...
@@ -1349,7 +1350,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
aOutputData
.
SetUseStyleColor
(
bUseStyleColor
);
aOutputData
.
SetUseStyleColor
(
bUseStyleColor
);
if
(
pBorderData
)
if
(
pBorderData
)
aOutputData
.
DrawFrame
();
aOutputData
.
DrawFrame
(
*
pDev
);
}
}
}
}
...
@@ -1613,7 +1614,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
...
@@ -1613,7 +1614,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
if
(
aTableParam
.
bCellContent
)
if
(
aTableParam
.
bCellContent
)
{
{
aOutputData
.
DrawExtraShadow
(
bShLeft
,
bShTop
,
bShRight
,
bShBottom
);
aOutputData
.
DrawExtraShadow
(
bShLeft
,
bShTop
,
bShRight
,
bShBottom
);
aOutputData
.
DrawFrame
();
aOutputData
.
DrawFrame
(
*
pDev
);
aOutputData
.
DrawStrings
();
aOutputData
.
DrawStrings
();
aOutputData
.
DrawEdit
(
false
);
aOutputData
.
DrawEdit
(
false
);
}
}
...
...
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