Kaydet (Commit) 640c1788 authored tarafından Stefan Knorr (astron)'s avatar Stefan Knorr (astron) Kaydeden (comit) Jan Holesovsky

Try to draw replacement preview at original size

üst 8efd3f8f
......@@ -224,7 +224,7 @@ static FrmMap aHFlyHtmlMap[] =
{SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_FLY_REL_PG_FRAME}
};
// own vertical alignment map for to frame anchored objects
// own vertical alignment map for objects anchored to frame
#define VERT_FRAME_REL (LB_FLY_VERT_FRAME|LB_FLY_VERT_PRTAREA)
static FrmMap aVFrameMap[] =
......@@ -1941,7 +1941,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
}
/*--------------------------------------------------------------------
Description: horizonal Pos
Description: horizontal Pos
--------------------------------------------------------------------*/
IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
{
......@@ -2562,7 +2562,17 @@ void BmpWindow::Paint( const Rectangle& )
if(nRelGrf < nRelWin)
{
const long nWidth = aPntSz.Width();
// if we use a replacement preview, try to draw at original size
if ( !bGraphic && ( aGrfSize.Width() <= aPntSz.Width() ) && ( aGrfSize.Height() <= aPntSz.Height() ) )
{
const long nHeight = aPntSz.Height();
aPntSz.Width() = aGrfSize.Width();
aPntSz.Height() = aGrfSize.Height();
aPntPos.Y() += (nHeight - aPntSz.Height()) / 2;
}
else
aPntSz.Width() = aPntSz.Height() * nRelGrf /100;
if(!bLeftAlign)
aPntPos.X() += nWidth - aPntSz.Width() ;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment