summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-01-23 10:29:44 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-01-29 10:16:55 +0100
commitc5a3cae89660164f68565ee391ed8cf931f1d4da (patch)
tree95e428c408137583d09ea215b1878a2bc2bf4b2d /sc
parentb28360c66bc856176ff84bc6c2516f710a7196ab (diff)
BorderlineFix: Corrected handling for 'rotated' CellBorders
CellBorders can be rotated (including their Text) and need special visualization that is based on an own sheared/rotated coordinate system. Currently only possible for single cells (not merged ones) and needs to handle all borders (also bottom-right directly in the rotated cell, not in the neighboured ones to have the geometry, plus avoiding these in the non-rotated neighbour cells. Also corrected adding CellRotation data to svx::frame::Array in calc using SetCellRotations() which now gets called in the ScOutputData constructor to ensure it gets called in all places where it is used. Change-Id: I47bdfc29ba5ca76bbc07d98cb64733f867b1ee20
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/inc/output.hxx7
-rw-r--r--sc/source/ui/view/gridwin4.cxx4
-rw-r--r--sc/source/ui/view/output.cxx3
3 files changed, 8 insertions, 6 deletions
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index f23dabae3de0..c41433609b9e 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -255,6 +255,11 @@ private:
long SetEngineTextAndGetWidth( DrawEditParam& rParam, const OUString& rSetString,
long& rNeededPixel, long nAddWidthPixels );
+ // Check for and set cell rotations at OutputData to have it available
+ // in the svx tooling to render the borders. Moved to private section
+ // and the single call to end of constructor to be sure this always happens
+ void SetCellRotations();
+
public:
/**
* @param nNewScrX: X-Offset in the output device for the table
@@ -311,8 +316,6 @@ public:
// with logic MapMode set!
void DrawEdit(bool bPixelToLogic);
-
- void SetCellRotations();
void DrawRotated(bool bPixelToLogic); // logical
void DrawClear();
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 22e07763decb..64cd440e9902 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -696,10 +696,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
pContentDev->SetMapMode(aCurrentMapMode);
}
- // check for and set cell rotations at OutputData to have it available
- // in the svx tooling to render the borders
- aOutputData.SetCellRotations();
-
if ( rDoc.HasBackgroundDraw( nTab, aDrawingRectLogic ) )
{
pContentDev->SetMapMode(MapMode(MapUnit::MapPixel));
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index bd3687cd1cd3..064bb14ce1a1 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -214,6 +214,9 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
bTabProtected = mpDoc->IsTabProtected( nTab );
bLayoutRTL = mpDoc->IsLayoutRTL( nTab );
+
+ // always needed, so call at the end of the constructor
+ SetCellRotations();
}
ScOutputData::~ScOutputData()