diff options
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 460b894bfe4e..f989dc8b1398 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2649,25 +2649,25 @@ void BmpWindow::Paint( const Rectangle& ) aPntPos.X() += nWidth - aPntSz.Width() ; } - if ( bHorz ) - { - aPntPos.Y() += aPntSz.Height(); - aPntPos.Y() --; - aPntSz.Height() *= -1; - } - if ( bVert ) - { - aPntPos.X() += aPntSz.Width(); - aPntPos.X()--; - aPntSz.Width() *= -1; - } - // #i119307# clear window background, the graphic might have transparency DrawRect(Rectangle(aPntPos, aPntSz)); - if ( bGraphic ) + if (bHorz || bVert) + { + BitmapEx aTmpBmp(bGraphic ? aGraphic.GetBitmapEx() : aBmp); + sal_uLong nMirrorFlags(BMP_MIRROR_NONE); + if (bHorz) + nMirrorFlags |= BMP_MIRROR_VERT; + if (bVert) + nMirrorFlags |= BMP_MIRROR_HORZ; + aTmpBmp.Mirror(nMirrorFlags); + DrawBitmapEx( aPntPos, aPntSz, aTmpBmp ); + } + else if (bGraphic) //draw unmirrored preview graphic + { aGraphic.Draw( this, aPntPos, aPntSz ); - else + } + else //draw unmirrored stock sample image { DrawBitmapEx( aPntPos, aPntSz, aBmp ); } |