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
7c927b64
Kaydet (Commit)
7c927b64
authored
Tem 24, 2015
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
calc mapmode: Cleanup DrawBackground + fix one pixel size.
Change-Id: I2ff1aa1d83a3228ee76eda7cd2e411cf084079f6
üst
e24d47fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
32 deletions
+33
-32
output.cxx
sc/source/ui/view/output.cxx
+33
-32
No files found.
sc/source/ui/view/output.cxx
Dosyayı görüntüle @
7c927b64
...
...
@@ -327,8 +327,21 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
// It is a big mess to distinguish when we are using pixels and when logic
// units for drawing. Ultimately we want to work only in the logic units,
// but until that happens, we need to special-case:
// * metafile
// * drawing to the screen - everything is internally counted in pixels there
//
// * metafile
// * drawing to the screen - everything is internally counted in pixels there
//
// 'Internally' in the above means the pCellInfo[...].nWidth and
// pRowInfo[...]->nHeight:
//
// * when bWorksInPixels is true: these are in pixels
// * when bWorksInPixels is false: these are in the logic units
//
// This is where all the confusion comes from, ultimately we want them
// always in the logic units (100th of milimiters), but we need to get
// there gradually (get rid of setting MAP_PIXEL first), otherwise we'd
// break all the drawing by one change.
// So until that happens, we need to special case.
bool
bWorksInPixels
=
bMetaFile
;
if
(
eType
==
OUTTYPE_WINDOW
)
...
...
@@ -956,20 +969,21 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
{
FindRotated
();
//! from the outside?
bool
bWorksInPixels
=
bMetaFile
;
Size
aOnePixel
=
rRenderContext
.
PixelToLogic
(
Size
(
1
,
1
));
long
nOneXLogic
=
aOnePixel
.
Width
();
long
nOneYLogic
=
aOnePixel
.
Height
();
if
(
eType
==
OUTTYPE_WINDOW
)
{
// See more about bWorksInPixels in ScOutputData::DrawGrid
bool
bWorksInPixels
=
false
;
if
(
eType
==
OUTTYPE_WINDOW
)
bWorksInPixels
=
true
;
}
long
nOneX
=
1
;
long
nOneY
=
1
;
if
(
!
bWorksInPixels
)
{
Size
aOnePixel
=
rRenderContext
.
PixelToLogic
(
Size
(
1
,
1
));
nOneX
=
aOnePixel
.
Width
();
nOneY
=
aOnePixel
.
Height
();
nOneX
=
nOneXLogic
;
nOneY
=
nOneYLogic
;
}
Rectangle
aRect
;
...
...
@@ -1014,6 +1028,8 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
nPosX
+=
nMirrorW
-
nOneX
;
aRect
=
Rectangle
(
nPosX
,
nPosY
-
nOneY
,
nPosX
,
nPosY
-
nOneY
+
nRowHeight
);
if
(
bWorksInPixels
)
aRect
=
rRenderContext
.
PixelToLogic
(
aRect
);
// internal data in pixels, but we'll be drawing in logic units
const
SvxBrushItem
*
pOldBackground
=
NULL
;
const
SvxBrushItem
*
pBackground
;
...
...
@@ -1067,18 +1083,11 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
const
ScDataBarInfo
*
pDataBarInfo
=
pInfo
->
pDataBar
.
get
();
const
ScIconSetInfo
*
pIconSetInfo
=
pInfo
->
pIconSet
.
get
();
Rectangle
aRectC
=
aRect
;
long
nPosXC
=
nPosX
;
long
nPosXLogic
=
nPosX
;
if
(
bWorksInPixels
)
nPosXLogic
=
rRenderContext
.
PixelToLogic
(
Point
(
nPosX
,
0
)).
X
();
if
(
bWorksInPixels
)
{
aRectC
=
rRenderContext
.
PixelToLogic
(
aRect
);
nPosXC
=
rRenderContext
.
PixelToLogic
(
Point
(
nPosX
,
0
)).
X
();
}
drawCells
(
rRenderContext
,
pColor
,
pBackground
,
pOldColor
,
pOldBackground
,
aRectC
,
nPosXC
,
nLayoutSign
,
nOneX
,
nOneY
,
pDataBarInfo
,
pOldDataBarInfo
,
pIconSetInfo
,
pOldIconSetInfo
);
if
(
bWorksInPixels
)
aRect
=
rRenderContext
.
LogicToPixel
(
aRectC
);
drawCells
(
rRenderContext
,
pColor
,
pBackground
,
pOldColor
,
pOldBackground
,
aRect
,
nPosXLogic
,
nLayoutSign
,
nOneXLogic
,
nOneYLogic
,
pDataBarInfo
,
pOldDataBarInfo
,
pIconSetInfo
,
pOldIconSetInfo
);
// extend for all merged cells
nMergedCells
=
1
;
...
...
@@ -1095,19 +1104,11 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
}
}
Rectangle
aRectC
=
aRect
;
long
nPosXC
=
nPosX
;
if
(
bWorksInPixels
)
{
aRectC
=
rRenderContext
.
PixelToLogic
(
aRect
);
nPosXC
=
rRenderContext
.
PixelToLogic
(
Point
(
nPosX
,
0
)).
X
();
}
drawCells
(
rRenderContext
,
NULL
,
NULL
,
pOldColor
,
pOldBackground
,
aRectC
,
nPosXC
,
nLayoutSign
,
nOneX
,
nOneY
,
NULL
,
pOldDataBarInfo
,
NULL
,
pOldIconSetInfo
);
long
nPosXLogic
=
nPosX
;
if
(
bWorksInPixels
)
nPosXLogic
=
rRenderContext
.
PixelToLogic
(
Point
(
nPosX
,
0
)).
X
();
if
(
bWorksInPixels
)
aRect
=
rRenderContext
.
LogicToPixel
(
aRectC
);
drawCells
(
rRenderContext
,
NULL
,
NULL
,
pOldColor
,
pOldBackground
,
aRect
,
nPosXLogic
,
nLayoutSign
,
nOneXLogic
,
nOneYLogic
,
NULL
,
pOldDataBarInfo
,
NULL
,
pOldIconSetInfo
);
nArrY
+=
nSkip
;
}
...
...
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