Kaydet (Commit) c1cad9bb authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#78204 adjust note icons on comments-in-margins case

the page has been scaled by 75% and vertically centered so the page positions
need to be also adjusted.

Change-Id: I7ab6b4956933ba444441c857e78aee8e5c1cf97a
üst c008e4a4
......@@ -36,6 +36,8 @@ namespace vcl
class OutputDevice;
class SwFrm;
class SwLinePortion;
class SwPageFrm;
class SwPrintData;
class SwTxtPainter;
class SwEditShell;
class StringRangeEnumerator;
......@@ -207,6 +209,8 @@ class SwEnhancedPDFExportHelper
bool mbSkipEmptyPages;
bool mbEditEngineOnly;
const SwPrintData& mrPrintData;
static TableColumnsMap aTableColumnsMap;
static LinkIdMap aLinkIdMap;
static NumListIdMap aNumListIdMap;
......@@ -229,7 +233,8 @@ class SwEnhancedPDFExportHelper
OutputDevice& rOut,
const OUString& rPageRange,
bool bSkipEmptyPages,
bool bEditEngineOnly );
bool bEditEngineOnly,
const SwPrintData& rPrintData );
~SwEnhancedPDFExportHelper();
......@@ -240,6 +245,10 @@ class SwEnhancedPDFExportHelper
static FrmTagIdMap& GetFrmTagIdMap() { return aFrmTagIdMap; }
static LanguageType GetDefaultLanguage() {return eLanguageDefault; }
//scale and position rRectangle if we're scaling due to notes in margins.
Rectangle SwRectToPDFRect(const SwPageFrm* pCurrPage,
const Rectangle& rRectangle) const;
};
#endif
......
......@@ -3012,13 +3012,14 @@ void SAL_CALL SwXTextDocument::render(
((SwView*)pView)->GetWrtShellPtr() :
0;
SwPrintData const& rSwPrtOptions =
*m_pRenderData->GetSwPrtOptions();
if (bIsPDFExport && bFirstPage && pWrtShell)
{
SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, false );
SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, false, rSwPrtOptions );
}
SwPrintData const& rSwPrtOptions =
*m_pRenderData->GetSwPrtOptions();
if (bPrintProspect)
pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer );
else // normal printing and PDF export
......@@ -3032,7 +3033,7 @@ void SAL_CALL SwXTextDocument::render(
if (bIsPDFExport && bLastPage && pWrtShell)
{
SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, true );
SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, true, rSwPrtOptions );
}
pVwSh->SetPDFExportOption( false );
......
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