incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernand Vanrie <...@pmgroup.be>
Subject Re: Size of page headder
Date Tue, 22 May 2012 16:19:08 GMT
fabian,

Your headers have a "dynamic" height ?

Maybe you can move the viewcursor init and calculate the height from its 
position on start en end of the header ?
> Hi Fernand,
>
> I programing in Java but I already did what you described below. The pagestyles contain
the the property "HeaderHeight" but as I wrote this always returns 0 independently of how
many lines I wrote in the header.
> There is also the attribute "HeaderText" which gives me a XText of the Header content
but this won't help since it's only the text.
>
> I haven't tried to iterate over the frames yet, this might work for me…
>
> best,
> Fabian
>
>
> On May 21, 2012, at 4:08 PM, Fernand Vanrie wrote:
>
>> fabian ,
>>
>> You can find it in the "page styles"
>>
>> Find my code belmow to handle some "text" i placed in a textframe (named "MyFooterFrame"
)in the footer, you can do the same with the Header. Do a xray on the pagestyles to have additional
information about the Header.
>>
>> Hop it helps
>>
>> Fernand
>>
>> Sub FooterText
>> ' On Local Error GoTo GeenFooterFrame
>> If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
>>            GlobalScope.BasicLibraries.LoadLibrary("Tools")
>> End If
>> oDocument = thisComponent
>> oStyles = oDocument.getStyleFamilies.getByName("PageStyles")
>> oFrames = oDocument.getTextFrames
>> xray ostyles.getbyindex(0)
>> oFooterframe = Oframes.getByName("MyFooterFrame")
>>
>> oFooterText = oFooterFrame.Text
>> oFootertext.setstring("")
>> oFooterCursor = oFooterText.createTextCursor()
>> oFooterText.insertString(oFooterCursor, FileNameoutofPath(oDocument.Url , "/") ,
true)
>> exit sub
>>
>> GeenFooterFrame:
>> beep
>> msgbox( "Er is geen ""FooterFrame"" meer, copieer het frame uit een ander document
en ga verder" ,48)
>> exit sub
>>
>> End Sub
>>
>>> Hi,
>>>
>>> I want to find out the height of a document's header. Reading out the attribute
HeaderHeight of the page properties only returns 0 and getting the XText of the header also
didn't get me nowhere so far.
>>>
>>> My goal is to insert a graphic at a user specified position of the page and for
different reasons I can't simply use page as anchor. Therefore I need to know the height and
width of the page margins and the page header to position the image independently of those
dimensions.
>>>
>>> Has anybody a hint how to get the header's height.
>>>
>>> best Fabian.
>>>
>>>
>>>
>


Mime
View raw message