LibreOffice Module sw (master) 1
|
#include <EnhancedPDFExportHelper.hxx>
Public Member Functions | |
SwEnhancedPDFExportHelper (SwEditShell &rSh, OutputDevice &rOut, const OUString &rPageRange, bool bSkipEmptyPages, bool bEditEngineOnly, const SwPrintData &rPrintData) | |
~SwEnhancedPDFExportHelper () | |
tools::Rectangle | SwRectToPDFRect (const SwPageFrame *pCurrPage, const tools::Rectangle &rRectangle) const |
Static Public Member Functions | |
static TableColumnsMap & | GetTableColumnsMap () |
static LinkIdMap & | GetLinkIdMap () |
static NumListIdMap & | GetNumListIdMap () |
static NumListBodyIdMap & | GetNumListBodyIdMap () |
static FrameTagIdMap & | GetFrameTagIdMap () |
static LanguageType | GetDefaultLanguage () |
Private Member Functions | |
void | EnhancedPDFExport () |
void | ExportAuthorityEntryLinks () |
Exports bibliography entry links. More... | |
sal_Int32 | CalcOutputPageNum (const SwRect &rRect) const |
std::vector< sal_Int32 > | CalcOutputPageNums (const SwRect &rRect) const |
void | MakeHeaderFooterLinks (vcl::PDFExtOutDevData &rPDFExtOutDevData, const SwTextNode &rTNd, const SwRect &rLinkRect, sal_Int32 nDestId, const OUString &rURL, bool bIntern, OUString const &rContent) const |
Private Attributes | |
SwEditShell & | mrSh |
OutputDevice & | mrOut |
std::unique_ptr< StringRangeEnumerator > | mpRangeEnum |
std::vector< sal_Int32 > | maPageNumberMap |
The problem is that numbers in StringRangeEnumerator aren't accordant to real page numbers if mbSkipEmptyPages is true, because in this case empty pages are excluded from a page range and numbers in StringRangeEnumerator are shifted. More... | |
bool | mbSkipEmptyPages |
bool | mbEditEngineOnly |
const SwPrintData & | mrPrintData |
Static Private Attributes | |
static TableColumnsMap | s_aTableColumnsMap |
static LinkIdMap | s_aLinkIdMap |
static NumListIdMap | s_aNumListIdMap |
static NumListBodyIdMap | s_aNumListBodyIdMap |
static FrameTagIdMap | s_aFrameTagIdMap |
static LanguageType | s_eLanguageDefault = LANGUAGE_SYSTEM |
Definition at line 192 of file EnhancedPDFExportHelper.hxx.
SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper | ( | SwEditShell & | rSh, |
OutputDevice & | rOut, | ||
const OUString & | rPageRange, | ||
bool | bSkipEmptyPages, | ||
bool | bEditEngineOnly, | ||
const SwPrintData & | rPrintData | ||
) |
Definition at line 1647 of file EnhancedPDFExportHelper.cxx.
References aStructStack, EnhancedPDFExport(), GetAppLanguage(), SwDoc::GetDefault(), SwViewShell::GetDoc(), SvtLanguageOptions::GetI18NScriptTypeOfLanguage(), SwLangHelper::GetLanguage(), SwViewShell::GetLayout(), SwFrame::GetNext(), SwViewShell::GetPageCount(), i, SwPageFrame::IsEmptyPage(), SwLayoutFrame::Lower(), maPageNumberMap, mbSkipEmptyPages, mpRangeEnum, mrSh, n, RES_CHRATR_CJK_LANGUAGE(), RES_CHRATR_CTL_LANGUAGE(), RES_CHRATR_LANGUAGE(), s_aFrameTagIdMap, s_aLinkIdMap, s_aNumListBodyIdMap, s_aNumListIdMap, s_aTableColumnsMap, and s_eLanguageDefault.
SwEnhancedPDFExportHelper::~SwEnhancedPDFExportHelper | ( | ) |
Definition at line 1702 of file EnhancedPDFExportHelper.cxx.
|
private |
Definition at line 2545 of file EnhancedPDFExportHelper.cxx.
References CalcOutputPageNums().
Referenced by EnhancedPDFExport(), and ExportAuthorityEntryLinks().
|
private |
Definition at line 2556 of file EnhancedPDFExportHelper.cxx.
References SwViewShell::GetPageNumAndSetOffsetForPDF(), i, maPageNumberMap, mbSkipEmptyPages, mpRangeEnum, mrOut, and mrSh.
Referenced by CalcOutputPageNum(), EnhancedPDFExport(), ExportAuthorityEntryLinks(), and MakeHeaderFooterLinks().
|
private |
Definition at line 1729 of file EnhancedPDFExportHelper.cxx.
References sw::sidebar::aArr, SwPosition::Assign(), aURL, CalcOutputPageNum(), CalcOutputPageNums(), SwRect::Center(), Chars, vcl::PDFNote::Contents, vcl::PDFExtOutDevData::CreateDest(), vcl::PDFExtOutDevData::CreateLink(), vcl::PDFExtOutDevData::CreateNamedDest(), vcl::PDFExtOutDevData::CreateNote(), vcl::PDFExtOutDevData::CreateOutlineItem(), vcl::PDFExtOutDevData::CreateScreen(), INetURLObject::decode(), SwCursorShell::DeleteCurrent, vcl::PDFExtOutDevData::DescribeRegisteredDest(), SwField::ExpandField(), ExportAuthorityEntryLinks(), SwFrameFormat::FindLayoutRect(), SwFrameFormat::FindRealSdrObject(), Fly, SwFieldType::GatherFields(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetAnchorNode(), SwFormat::GetAttrSet(), vcl::PDFExtOutDevData::GetBookmarks(), IDocumentMarkAccess::getBookmarksBegin(), IDocumentMarkAccess::getBookmarksEnd(), SwCursorShell::GetCharRect(), SwCursorShell::GetCursor_(), Date::GetDate(), SwPostItField::GetDate(), GetDefaultLanguage(), SwViewShell::GetDoc(), OutputDevice::GetExtOutDevData(), SwEditShell::GetFieldType(), SwTextAttr::GetFootnote(), SwDoc::GetFootnoteIdxs(), SwFrameAreaDefinition::getFrameArea(), GetFrameOfModify(), SwDoc::getIDocumentMarkAccess(), SwViewShell::getIDocumentOutlineNodesAccess(), SwDoc::getIDocumentRedlineAccess(), SwEditShell::GetINetAttrs(), vcl::PDFExtOutDevData::GetIsExportBookmarks(), vcl::PDFExtOutDevData::GetIsExportNamedDestinations(), vcl::PDFExtOutDevData::GetIsExportNotes(), SfxItemSet::GetItemIfSet(), SwField::GetLanguage(), SwViewShell::GetLayout(), SwFrame::GetLeftMargin(), getLocale(), OutputDevice::GetMapMode(), SwFormat::GetName(), SwViewShell::GetNodes(), SvNumberFormatter::GetNullDate(), SwDoc::GetNumberFormatter(), IDocumentOutlineNodes::getOutlineLevel(), SwNodes::GetOutLineNds(), IDocumentOutlineNodes::getOutlineNodesCount(), IDocumentOutlineNodes::getOutlineText(), SvNumberFormatter::GetOutputString(), SwRootFrame::GetPageAtPos(), SwRootFrame::GetPageByPageNum(), SwPostItField::GetPar1(), SwPaM::GetPoint(), GetRef, SwPostItField::GetResolved(), SwFrame::GetRightMargin(), SwFrame::getRootFrame(), SwCursorShell::GetSelText(), SwGetRefField::GetSeqNo(), SwGetRefField::GetSetRefName(), SwDoc::GetSpzFrameFormats(), SvNumberFormatter::GetStandardFormat(), SwTextAttr::GetStart(), SwGetRefField::GetSubType(), SwPostItField::GetText(), SwTextNode::GetText(), SwNode::GetTextNode(), SwTextFootnote::GetTextNode(), SwFrame::GetTopMargin(), SwFormatURL::GetURL(), SwFormatFootnote::GetViewNumStr(), SwCursorShell::GotoFootnoteAnchor(), SwCursorShell::GotoFootnoteText(), SwCursorShell::GotoINetAttr(), SwCursorShell::GotoOutline(), SwCursorShell::GotoRefMark(), SwRect::Height(), i, sw::IsFootnoteDeleted(), SwTextNode::IsHidden(), SwRootFrame::IsHideRedlines(), SwDoc::IsInHeaderFooter(), SwCursorShell::IsInHiddenRange(), sw::IsParaPropsNode(), SwFrame::IsRightToLeft(), SwFrame::IsVertical(), SwViewShell::IsViewLocked(), JumpToSwMark(), SwRect::Left(), SwViewShell::LockView(), SwLayoutFrame::Lower(), MakeHeaderFooterLinks(), vcl::MAPMODE, mbEditEngineOnly, mrOut, mrSh, n, p, pObject, Point, OutputDevice::Pop(), SwRect::Pos(), Postit, OutputDevice::Push(), RES_DRAWFRMFMT(), RES_TXTATR_INETFMT(), RES_URL(), SwCursor::RestoreSavePos(), SwRect::Right(), s_aLinkIdMap, vcl::PDFExtOutDevData::SetDocumentLocale(), vcl::PDFExtOutDevData::SetLinkDest(), vcl::PDFExtOutDevData::SetLinkURL(), OutputDevice::SetMapMode(), MapMode::SetMapUnit(), vcl::PDFExtOutDevData::SetScreenStream(), vcl::PDFExtOutDevData::SetScreenURL(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size(), SwFrameFormats::size(), SwRect::SVRect(), SwRectToPDFRect(), SwResId(), vcl::PDFNote::Title, SwRect::Top(), INetURLObject::Unambiguous, SwFormat::Which(), and SwRect::Width().
Referenced by SwEnhancedPDFExportHelper().
|
private |
Exports bibliography entry links.
Definition at line 2386 of file EnhancedPDFExportHelper.cxx.
References AUTH_FIELD_TARGET_URL, AUTH_FIELD_URL, CalcOutputPageNum(), CalcOutputPageNums(), Chars, SwNode::FindSectionNode(), fnParaStart, SwFieldType::GatherFields(), SwAuthorityField::GetAuthEntry(), SwAuthEntry::GetAuthorField(), SwCursorShell::GetCharRect(), SwCursorShell::GetCursor(), SwEditShell::GetCurTOX(), OutputDevice::GetExtOutDevData(), SwEditShell::GetFieldType(), SwViewShell::GetLayout(), SwPosition::GetNode(), SwNode::GetNodeType(), SwPaM::GetPoint(), SwSectionNode::GetSection(), SwNode::GetTextNode(), SwSection::GetType(), SwTOXBase::GetType(), GoNextPara(), SwCursorShell::GotoNextTOXBase(), SwCursorShell::GotoPage(), SwLayoutFrame::Lower(), SwCursorShell::MovePara(), mrOut, mrSh, s_aLinkIdMap, SwRect::SVRect(), SwRectToPDFRect(), TableOfAuthorities, Text, TOX_AUTHORITIES, and ToxContent.
Referenced by EnhancedPDFExport().
|
inlinestatic |
Definition at line 252 of file EnhancedPDFExportHelper.hxx.
References s_eLanguageDefault.
Referenced by SwTaggedPDFHelper::BeginInlineStructureElements(), EnhancedPDFExport(), and SwTaggedPDFHelper::SetAttributes().
|
inlinestatic |
Definition at line 250 of file EnhancedPDFExportHelper.hxx.
References s_aFrameTagIdMap.
Referenced by SwTaggedPDFHelper::BeginTag(), and GetReopenTagFromFrame().
|
inlinestatic |
Definition at line 247 of file EnhancedPDFExportHelper.hxx.
References s_aLinkIdMap.
Referenced by SwTaggedPDFHelper::SetAttributes().
|
inlinestatic |
Definition at line 249 of file EnhancedPDFExportHelper.hxx.
References s_aNumListBodyIdMap.
Referenced by SwTaggedPDFHelper::BeginNumberedListStructureElements(), and SwTaggedPDFHelper::BeginTag().
|
inlinestatic |
Definition at line 248 of file EnhancedPDFExportHelper.hxx.
References s_aNumListIdMap.
Referenced by SwTaggedPDFHelper::BeginNumberedListStructureElements(), and SwTaggedPDFHelper::BeginTag().
|
inlinestatic |
Definition at line 246 of file EnhancedPDFExportHelper.hxx.
References s_aTableColumnsMap.
Referenced by SwTaggedPDFHelper::BeginBlockStructureElements(), and SwTaggedPDFHelper::SetAttributes().
|
private |
Definition at line 2611 of file EnhancedPDFExportHelper.cxx.
References CalcOutputPageNums(), vcl::PDFExtOutDevData::CreateLink(), SwFrame::FindPageFrame(), SwIterator< TElementType, TSource, eMode >::First(), SwFrameAreaDefinition::getFrameArea(), OutputDevice::GetMapMode(), MapMode::GetOrigin(), mrOut, SwIterator< TElementType, TSource, eMode >::Next(), Point, SwRect::Pos(), vcl::PDFExtOutDevData::SetLinkDest(), vcl::PDFExtOutDevData::SetLinkURL(), SwRect::SVRect(), and SwRectToPDFRect().
Referenced by EnhancedPDFExport().
tools::Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect | ( | const SwPageFrame * | pCurrPage, |
const tools::Rectangle & | rRectangle | ||
) | const |
Definition at line 1706 of file EnhancedPDFExportHelper.cxx.
References SwFrameAreaDefinition::getFrameArea(), SwPrintData::GetPrintPostIts(), tools::Rectangle::GetSize(), Size::Height(), SwRect::Height(), InMargins, tools::Rectangle::Left(), tools::Rectangle::Move(), mrPrintData, Size::setHeight(), tools::Rectangle::SetLeft(), tools::Rectangle::SetSize(), tools::Rectangle::SetTop(), Size::setWidth(), tools::Rectangle::Top(), and Size::Width().
Referenced by EnhancedPDFExport(), ExportAuthorityEntryLinks(), and MakeHeaderFooterLinks().
|
private |
The problem is that numbers in StringRangeEnumerator aren't accordant to real page numbers if mbSkipEmptyPages is true, because in this case empty pages are excluded from a page range and numbers in StringRangeEnumerator are shifted.
maPageNumberMap[real_page_number] is either a corresponding page number in a page range without empty pages, or -1 if this page is empty.
Definition at line 207 of file EnhancedPDFExportHelper.hxx.
Referenced by CalcOutputPageNums(), and SwEnhancedPDFExportHelper().
|
private |
Definition at line 210 of file EnhancedPDFExportHelper.hxx.
Referenced by EnhancedPDFExport().
|
private |
Definition at line 209 of file EnhancedPDFExportHelper.hxx.
Referenced by CalcOutputPageNums(), and SwEnhancedPDFExportHelper().
|
private |
Definition at line 199 of file EnhancedPDFExportHelper.hxx.
Referenced by CalcOutputPageNums(), and SwEnhancedPDFExportHelper().
|
private |
Definition at line 197 of file EnhancedPDFExportHelper.hxx.
Referenced by CalcOutputPageNums(), EnhancedPDFExport(), ExportAuthorityEntryLinks(), and MakeHeaderFooterLinks().
|
private |
Definition at line 212 of file EnhancedPDFExportHelper.hxx.
Referenced by SwRectToPDFRect().
|
private |
Definition at line 196 of file EnhancedPDFExportHelper.hxx.
Referenced by CalcOutputPageNums(), EnhancedPDFExport(), ExportAuthorityEntryLinks(), and SwEnhancedPDFExportHelper().
|
staticprivate |
Definition at line 218 of file EnhancedPDFExportHelper.hxx.
Referenced by GetFrameTagIdMap(), and SwEnhancedPDFExportHelper().
|
staticprivate |
Definition at line 215 of file EnhancedPDFExportHelper.hxx.
Referenced by EnhancedPDFExport(), ExportAuthorityEntryLinks(), GetLinkIdMap(), and SwEnhancedPDFExportHelper().
|
staticprivate |
Definition at line 217 of file EnhancedPDFExportHelper.hxx.
Referenced by GetNumListBodyIdMap(), and SwEnhancedPDFExportHelper().
|
staticprivate |
Definition at line 216 of file EnhancedPDFExportHelper.hxx.
Referenced by GetNumListIdMap(), and SwEnhancedPDFExportHelper().
|
staticprivate |
Definition at line 214 of file EnhancedPDFExportHelper.hxx.
Referenced by GetTableColumnsMap(), and SwEnhancedPDFExportHelper().
|
staticprivate |
Definition at line 220 of file EnhancedPDFExportHelper.hxx.
Referenced by GetDefaultLanguage(), and SwEnhancedPDFExportHelper().