trigger MapMode ScaleX change in writer

Mark Hung marklh9 at
Wed May 25 13:42:31 UTC 2022

Hi Luboš,

Luboš Luňák <l.lunak at> 於 2022年5月25日 週三 下午12:13寫道:

> On Wednesday 25 of May 2022, Mark Hung wrote:
> > Hi,
> >
> > I'm refactoring SwFntObj::DrawText() in
> sw/soucre/core/txtnode/fntcache.c,
> > and writing unit test for it. I'm looking for a way to trigger the
> > situation that
> > GetMapMode().GetScaleX()  doesn't equal to 1.
>  Getting GetScaleX() not be 1 is easy here, I just need to open a new
> Writer
> document and Ctrl+wheel to zoom. Are you sure that is the part you have a
> problem reproducing?
You're right. GetScaleX() changes as soon as I zoom the document in or out.
I have just neglected that there is another precondition: OutputDevice must
be a printer (bPrt ==true)
I'm still trying to figure out how to have a OutputDevice use a different
scale value.
I'm using a Linux VM so I don't know if a physical printer can make a

> --
>  Luboš Luňák
>  l.lunak at

Thank you.

Mark Hung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the LibreOffice mailing list