path: root/sw/source/core/layout/calcmove.cxx
diff options
authorMiklos Vajna <>2019-02-12 16:38:47 +0100
committerMiklos Vajna <>2019-02-12 18:18:53 +0100
commite8b9572bf89f55463f2c879a401ed62efc165d95 (patch)
treebb14bef40f4ee43df2249c0e9ea43a449e84f331 /sw/source/core/layout/calcmove.cxx
parent4bbb0bcb88614d3ccaaab4bea4fe2309c92b881e (diff)
sw btlr writing mode: implement initial layout
The bulk of this commit is reasonably straightforward, the interesting parts are: - SwFrame::CheckDir() is where the layout reads the doc model, i.e. sets the new SwFrame::mbVertLRBT. - We had 3 text directions previously: horizontal, vertical (implicitly RL) and vertical LR (implicitly TB). This adds a 4th text direction for the LRBT case. - SwTextFrame::SwitchHorizontalToVertical() is responsible for re-locating the origo of a string to be painted from the top left to the bottom left corner (in addition to the height/width swap that's done for all vertical directions). - Finally MapDirection() is the place where we map Writer's new btlr mode (with no character rotation) to VCL's 900 (90 degrees) rotated direction. No functional changes intended for existing text directions. Lots of places are still not yet adapted, but this is good enough to paint a single word in a table cell at the correct position with the correct direction. Change-Id: I465c62db6562d8a2be140c3d37473e590830139e Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/layout/calcmove.cxx')
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index c8541459aeda..05260abf2dad 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -893,7 +893,7 @@ void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const SwLayNotify aNotify( this );
bool bVert = IsVertical();
- SwRectFn fnRect = ( IsNeighbourFrame() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert );
+ SwRectFn fnRect = ( IsNeighbourFrame() == bVert )? fnRectHori : ( IsVertLR() ? (IsVertLRBT() ? fnRectVertL2RB2T : fnRectVertL2R) : fnRectVert );
std::unique_ptr<SwBorderAttrAccess> pAccess;
const SwBorderAttrs*pAttrs = nullptr;