|
List Info
Thread: right border of current body frm
|
|
| right border of current body frm |

|
2007-09-07 09:43:36 |
Hi,
I would like to get the right border of the current page,
which I am
currently getting with
mpWrtShell->GetAnyCurRect(RECT_FRM).Right()
This does not work of course if I am not in the body, but
inside a frame,
table etc. Is there a different function call to get the
value I am looking
for or must this be done manually?
If it has to be done manually, I was wondering if pLower of
SwPageFrm is
always a SwHeaderFrm or SwBodyFrm, or could it be also a
floating frame
which is placed in the top left corner?
Best regards
Max
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe sw.openoffice.org
For additional commands, e-mail: dev-help sw.openoffice.org
|
|
| Re: right border of current body frm |

|
2007-09-07 09:00:36 |
Hi Max,
Maximilian Odendahl wrote:
> Hi,
>
> I would like to get the right border of the current
page, which I am
> currently getting with
mpWrtShell->GetAnyCurRect(RECT_FRM).Right()
>
> This does not work of course if I am not in the body,
but inside a
> frame, table etc. Is there a different function call to
get the value
> I am looking for or must this be done manually?
If you use RECT_PAGE instead of RECT_FRM, you will get the
rectangle of
the current page.
> If it has to be done manually, I was wondering if
pLower of SwPageFrm
> is always a SwHeaderFrm or SwBodyFrm, or could it be
also a floating
> frame which is placed in the top left corner?
No, a floating frame will not be a lower of a SwPageFrm.
Only
SwHeaderFrm and SwBodyFrm are possible lowers of
SwPageFrm..
> Best regards
> Max
Regards
Andreas
--
Andreas Martens (ama) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/Gu
llFOSS
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe sw.openoffice.org
For additional commands, e-mail: dev-help sw.openoffice.org
|
|
| Re: right border of current body frm |

|
2007-09-07 10:25:54 |
Hi,
>> I would like to get the right border of the current
page, which I am
>> currently getting with
mpWrtShell->GetAnyCurRect(RECT_FRM).Right()
>>
> If you use RECT_PAGE instead of RECT_FRM, you will get
the rectangle of
> the current page.
I am actually looking for the borders inside the page, so
the body form and
not the page itself. If the cursor is inside a table or
frame, I get this
border instead of the body form border.
Regards
Max
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe sw.openoffice.org
For additional commands, e-mail: dev-help sw.openoffice.org
|
|
| Re: right border of current body frm |

|
2007-09-07 09:35:19 |
Hi Max,
Maximilian Odendahl wrote:
> Hi,
>
>>> I would like to get the right border of the
current page, which I am
>>> currently getting with
mpWrtShell->GetAnyCurRect(RECT_FRM).Right()
>>>
> If you use RECT_PAGE instead of RECT_FRM, you will get
the rectangle
> of the current page.
>
> I am actually looking for the borders inside the page,
so the body
> form and not the page itself. If the cursor is inside a
table or
> frame, I get this border instead of the body form
border.
What about RECT_PAGE_PRT? This should deliver the
"inner" rectangle of
the page.
Regards
Andreas
--
Andreas Martens (ama) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/Gu
llFOSS
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe sw.openoffice.org
For additional commands, e-mail: dev-help sw.openoffice.org
|
|
| Re: right border of current body frm |

|
2007-09-07 12:01:07 |
Hi Andreas,
> What about RECT_PAGE_PRT? This should deliver the
"inner" rectangle of the
> page.
not sure exactly what this is supposed to return, but the
right border of
this rect is in the middle of a page.
But I managed to solve my problem with
SwRect aPageRect =
mpWrtShell->GetCurrFrm()->FindPageFrm()->Lower()-&g
t;Frm();
although this might be not the most ellegant way
Regards
Max
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe sw.openoffice.org
For additional commands, e-mail: dev-help sw.openoffice.org
|
|
| Re: right border of current body frm |

|
2007-09-10 01:43:16 |
On 09/07/07 19:01, Maximilian Odendahl wrote:
> Hi Andreas,
>
>> What about RECT_PAGE_PRT? This should deliver the
"inner" rectangle of
>> the page.
>
> not sure exactly what this is supposed to return, but
the right border
> of this rect is in the middle of a page.
the printing area rectangle is relative to the frame
rectangle, so what
you are looking for is
const SwRect aPageFrm( GetAnyCurRect( RECT_PAGE ) );
const SwRect aPagePrt( GetAnyCurRect( RECT_PAGE_PRT ) );
SwRect aWhatIWant( aPagePrt );
aWhatIWant.Pos() += aPageFrm.Pos();
Hope this helps,
Frank
--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/Gu
llFOSS
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe sw.openoffice.org
For additional commands, e-mail: dev-help sw.openoffice.org
|
|
[1-6]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|