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