From 6b6088fa9cfe6f81107e4aed80f18dfdf3f664f0 Mon Sep 17 00:00:00 2001 From: Ptyl Dragon Date: Wed, 30 Oct 2013 13:33:13 +0200 Subject: [PATCH] 1st implementation of touch_lo_get_content_size Change-Id: I8b72c4366b502a71f2ed3bf917296c9553364d83 --- .../view_controllers/testing_tiles/MLOTestingTile.m | 3 +++ sw/source/core/view/viewsh.cxx | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m index 82a970f0fe2e..f709fc420be8 100644 --- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m +++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTile.m @@ -59,6 +59,9 @@ self.tester.params.tileHeight); CGContextRestoreGState(context); + + MLOContentSize size = touch_lo_get_content_size(); + NSLog(@"MLOContentSize: width=%lld, height=%lld",size.width, size.height); } @end diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index d0f27e8bea94..690105b12d2b 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1821,6 +1821,11 @@ MLOContentSize touch_lo_get_content_size() SwWrtShell *pViewShell = GetActiveWrtShell(); if (pViewShell) { + static const long WIDTH_ADDITION = 6L * DOCUMENTBORDER; + static const long HEIGHT_ADDITION = 2L * DOCUMENTBORDER; + Size documentSize =pViewShell->GetView().GetDocSz(); + return MLOContentSizeMake(documentSize.Width() + WIDTH_ADDITION, + documentSize.Height() + HEIGHT_ADDITION); } return MLOContentSizeMake(0,0); }