diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm index f9678c4f7393..9f72b3543626 100644 --- a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm +++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm @@ -45,6 +45,8 @@ static UIWindow *theWindow; self.window.pixelBuffer = pixelBuffer; self.window.image = image; + lo_set_view_size(bounds.size.width, bounds.size.height); + [self.window makeKeyAndVisible]; NSThread* thread = [[NSThread alloc] initWithTarget:self diff --git a/sal/inc/osl/detail/ios-bootstrap.h b/sal/inc/osl/detail/ios-bootstrap.h index d5fd9471cbf7..4738f28a054b 100644 --- a/sal/inc/osl/detail/ios-bootstrap.h +++ b/sal/inc/osl/detail/ios-bootstrap.h @@ -42,6 +42,7 @@ void lo_damaged(); /* 2) */ void lo_runMain(); +void lo_set_view_size(int width, int height); void lo_render_windows(char *pixelBuffer, int width, int height); #ifdef __cplusplus diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index b2178e99ef30..8e3137b24d4e 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -296,6 +296,14 @@ int IosSalSystem::ShowNativeDialog( const rtl::OUString& rTitle, return 0; } +extern "C" +void lo_set_view_size(int width, int height) +{ + // Horrible + viewWidth = width; + viewHeight = height; +} + extern "C" void lo_render_windows(char *pixelBuffer, int width, int height) {