[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page?
[Thread Prev] | [Thread Next]
- Subject: Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page?
- From: Dotan Cohen <dotancohen@gmail.com>
- Date: Mon, 14 May 2012 21:15:07 +0300
- To: users@global.libreoffice.org
On Mon, May 14, 2012 at 7:22 PM, Fernand Vanrie <sos@pmgroup.be> wrote:
> On 14/05/2012 17:55, Dotan ,
>
> OK, then we use the table and some basic macro code
>
> oDesktop = createUnoService("com.sun.star.frame.Desktop")
> oDocument = ThisComponent
> oVCursor = ThisComponent.CurrentController.getViewCursor()
> oText = oDocument.getText()
> oFrame = oDocument.CurrentController.Frame
> oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
> oTable = ThisComponent.getTextTables().getByName("Table1")
> ovcursor.gotoStart(false)
>
> now the Viewcursor is in the top left cell of the table
>
> do xray on oVcursor to find the rest
>
Wow, thanks Fernand. I must admit that I don't even know where to
begin with macros and I will have to do some reading before I get very
far with this. The official Writer Guide does not have any real
information on macros, but with your example code I should be able to
google my way around.
Thank you very much!
For the archives, that is for my future self next time I get stuck
with this: I simply increased the page zoom to a few hundred percent
and then looked at where on the ruler fell the cell border in
question. It was at 5.6 units, which makes sense as it represents the
fold of the page, which is itself just a tad over 11 units tall.
--
Dotan Cohen
http://gibberish.co.il
http://what-is-what.com
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
| Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page? | Tom Davies <tomdavies04@yahoo.co.uk> |
| [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page? | Dotan Cohen <dotancohen@gmail.com> |
| Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page? | Fernand Vanrie <sos@pmgroup.be> |
| Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page? | Dotan Cohen <dotancohen@gmail.com> |
| Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page? | Fernand Vanrie <sos@pmgroup.be> |
- Prev by Date: Re: [libreoffice-users] Adding a footer to a page
- Next by Date: Re: [libreoffice-users] Adding a footer to a page
- Previous by thread: Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page?
- Next by thread: Re: [libreoffice-users] Writer: How to know the X, Y coordinates of an object on the page?
- Index(es):
Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.