Get a xcell position and size on screen using C++ SDK

Java, C++, C#, Delphi, ??? - Using the UNO bridges

Get a xcell position and size on screen using C++ SDK

Postby repeat4 » Mon Sep 19, 2016 4:02 am

how to get a xcell position and size on screen.
I find an article"Calc : screen infos of a(ctive) cell". which sounds solved the problem.next is the main code from this article.
cellRectangleOnScreen.X = VisibleAreaOnScreen.X + VisibleAreaOnScreen.Width * (cellRectangle.X - VisibleArea.X) / VisibleArea.Width;
cellRectangleOnScreen.Y = VisibleAreaOnScreen.Y + VisibleAreaOnScreen.Height * (cellRectangle.Y - VisibleArea.Y) / VisibleArea.Height;
cellRectangleOnScreen.Width = cellRectangle.Width * VisibleAreaOnScreen.Width / VisibleArea.Width;
cellRectangleOnScreen.Height = cellRectangle.Height * VisibleAreaOnScreen.Height / VisibleArea.Height;


but I still don't know how to write the funcion using c++ sdk,can anyone help me
CRect GetRectOnSreen(Reference<XCell> rcell)
{
}
openoffice 4.1.2 on windows vista
repeat4
 
Posts: 7
Joined: Sat Sep 10, 2016 7:37 am

Re: how to get a xcell position and size on screen using c++

Postby repeat4 » Mon Sep 19, 2016 11:25 am

infact,I need get position and size of the selection cell (include mergerd cell) .
openoffice 4.1.2 on windows vista
repeat4
 
Posts: 7
Joined: Sat Sep 10, 2016 7:37 am


Return to External Programs

Who is online

Users browsing this forum: No registered users and 2 guests