Kaydet (Commit) f387c5da authored tarafından Fridrich Štrba's avatar Fridrich Štrba

Pass also the bounding box in device units to the EMF+ part

Change-Id: I71d3029d4b3aafdc44d82b0bd9db9a54f9b8b81f
üst d9b7d3a2
...@@ -295,6 +295,10 @@ static float GetSwapFloat( SvStream& rSt ) ...@@ -295,6 +295,10 @@ static float GetSwapFloat( SvStream& rSt )
sal_Int32 nHDPI; sal_Int32 nHDPI;
sal_Int32 nVDPI; sal_Int32 nVDPI;
/* EMF+ emf header info */ /* EMF+ emf header info */
sal_Int32 nBoundsLeft;
sal_Int32 nBoundsTop;
sal_Int32 nBoundsRight;
sal_Int32 nBoundsBottom;
sal_Int32 nFrameLeft; sal_Int32 nFrameLeft;
sal_Int32 nFrameTop; sal_Int32 nFrameTop;
sal_Int32 nFrameRight; sal_Int32 nFrameRight;
......
...@@ -1867,6 +1867,8 @@ namespace cppcanvas ...@@ -1867,6 +1867,8 @@ namespace cppcanvas
SvMemoryStream rMF ((void*) pAct->GetData (), pAct->GetDataSize (), STREAM_READ); SvMemoryStream rMF ((void*) pAct->GetData (), pAct->GetDataSize (), STREAM_READ);
rMF >> nBoundsLeft >> nBoundsTop >> nBoundsRight >> nBoundsBottom;
SAL_INFO ("cppcanvas.emf", "EMF+ picture bounds: " << nBoundsLeft << "," << nBoundsTop << " - " << nBoundsRight << "," << nBoundsBottom);
rMF >> nFrameLeft >> nFrameTop >> nFrameRight >> nFrameBottom; rMF >> nFrameLeft >> nFrameTop >> nFrameRight >> nFrameBottom;
SAL_INFO ("cppcanvas.emf", "EMF+ picture frame: " << nFrameLeft << "," << nFrameTop << " - " << nFrameRight << "," << nFrameBottom); SAL_INFO ("cppcanvas.emf", "EMF+ picture frame: " << nFrameLeft << "," << nFrameTop << " - " << nFrameRight << "," << nFrameBottom);
rMF >> nPixX >> nPixY >> nMmX >> nMmY; rMF >> nPixX >> nPixY >> nMmX >> nMmY;
......
...@@ -2233,14 +2233,21 @@ void WinMtfOutput::PassEMFPlusHeaderInfo() ...@@ -2233,14 +2233,21 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS header info\n")); EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS header info\n"));
SvMemoryStream mem; SvMemoryStream mem;
sal_Int32 nDevLeft, nDevRight, nDevTop, nDevBottom;
sal_Int32 nLeft, nRight, nTop, nBottom; sal_Int32 nLeft, nRight, nTop, nBottom;
nDevLeft = mrclBounds.Left();
nDevRight = mrclBounds.Right();
nDevTop = mrclBounds.Top();
nDevBottom = mrclBounds.Bottom();
nLeft = mrclFrame.Left(); nLeft = mrclFrame.Left();
nTop = mrclFrame.Top(); nTop = mrclFrame.Top();
nRight = mrclFrame.Right(); nRight = mrclFrame.Right();
nBottom = mrclFrame.Bottom(); nBottom = mrclFrame.Bottom();
// emf header info // emf header info
mem << nDevLeft << nDevTop << nDevRight << nDevBottom;
mem << nLeft << nTop << nRight << nBottom; mem << nLeft << nTop << nRight << nBottom;
mem << mnPixX << mnPixY << mnMillX << mnMillY; mem << mnPixX << mnPixY << mnMillX << mnMillY;
......
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