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

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
repeat4
Posts: 7
Joined: Sat Sep 10, 2016 7:37 am

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

Post by repeat4 »

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++

Post by repeat4 »

infact,I need get position and size of the selection cell (include mergerd cell) .
openoffice 4.1.2 on windows vista
Post Reply