LibreOffice Module sfx2 (master) 1
Static Public Member Functions | Static Private Attributes | List of all members
SfxRedactionHelper Class Reference

#include <SfxRedactionHelper.hxx>

Static Public Member Functions

static bool isRedactMode (const SfxRequest &rReq)
 Checks to see if the request has a parameter of IsRedactMode:bool=true. More...
 
static OUString getStringParam (const SfxRequest &rReq, sal_uInt16 nParamId)
 
static void getPageMetaFilesFromDoc (std::vector< GDIMetaFile > &aMetaFiles, std::vector<::Size > &aPageSizes, sal_Int32 nPages, DocumentToGraphicRenderer &aRenderer)
 
static void addPagesToDraw (const uno::Reference< XComponent > &xComponent, sal_Int32 nPages, const std::vector< GDIMetaFile > &aMetaFiles, const std::vector<::Size > &aPageSizes, const PageMargins &aPageMargins, const std::vector< std::pair< RedactionTarget, OUString > > &r_aTableTargets, bool bIsAutoRedact)
 
static void showRedactionToolbar (const SfxViewFrame *pViewFrame)
 
static PageMargins getPageMarginsForWriter (const css::uno::Reference< css::frame::XModel > &xModel)
 
static PageMargins getPageMarginsForCalc (const css::uno::Reference< css::frame::XModel > &xModel)
 
static void searchInMetaFile (const RedactionTarget &rRedactionTarget, const GDIMetaFile &rMtf, std::vector< tools::Rectangle > &aRedactionRectangles, const uno::Reference< XComponent > &xComponent)
 
static void addRedactionRectToPage (const uno::Reference< XComponent > &xComponent, const uno::Reference< drawing::XDrawPage > &xPage, const std::vector< tools::Rectangle > &aNewRectangles)
 
static void autoRedactPage (const RedactionTarget &rRedactionTarget, const GDIMetaFile &rGDIMetaFile, const uno::Reference< drawing::XDrawPage > &xPage, const uno::Reference< XComponent > &xComponent)
 
static void fillSearchOptions (i18nutil::SearchOptions2 &rSearchOpt, const RedactionTarget &rTarget)
 Fill the search options based on the given redaction target. More...
 

Static Private Attributes

static constexpr std::u16string_view m_aPredefinedTargets [6]
 

Detailed Description

Definition at line 54 of file SfxRedactionHelper.hxx.

Member Function Documentation

◆ addPagesToDraw()

void SfxRedactionHelper::addPagesToDraw ( const uno::Reference< XComponent > &  xComponent,
sal_Int32  nPages,
const std::vector< GDIMetaFile > &  aMetaFiles,
const std::vector<::Size > &  aPageSizes,
const PageMargins aPageMargins,
const std::vector< std::pair< RedactionTarget, OUString > > &  r_aTableTargets,
bool  bIsAutoRedact 
)
static

◆ addRedactionRectToPage()

void SfxRedactionHelper::addRedactionRectToPage ( const uno::Reference< XComponent > &  xComponent,
const uno::Reference< drawing::XDrawPage > &  xPage,
const std::vector< tools::Rectangle > &  aNewRectangles 
)
static

Definition at line 475 of file SfxRedactionHelper.cxx.

References COL_GRAY7(), and xFactory.

Referenced by autoRedactPage().

◆ autoRedactPage()

void SfxRedactionHelper::autoRedactPage ( const RedactionTarget rRedactionTarget,
const GDIMetaFile rGDIMetaFile,
const uno::Reference< drawing::XDrawPage > &  xPage,
const uno::Reference< XComponent > &  xComponent 
)
static

◆ fillSearchOptions()

void SfxRedactionHelper::fillSearchOptions ( i18nutil::SearchOptions2 rSearchOpt,
const RedactionTarget rTarget 
)
static

◆ getPageMarginsForCalc()

PageMargins SfxRedactionHelper::getPageMarginsForCalc ( const css::uno::Reference< css::frame::XModel > &  xModel)
static

◆ getPageMarginsForWriter()

PageMargins SfxRedactionHelper::getPageMarginsForWriter ( const css::uno::Reference< css::frame::XModel > &  xModel)
static

◆ getPageMetaFilesFromDoc()

void SfxRedactionHelper::getPageMetaFilesFromDoc ( std::vector< GDIMetaFile > &  aMetaFiles,
std::vector<::Size > &  aPageSizes,
sal_Int32  nPages,
DocumentToGraphicRenderer aRenderer 
)
static

◆ getStringParam()

OUString SfxRedactionHelper::getStringParam ( const SfxRequest rReq,
sal_uInt16  nParamId 
)
static

◆ isRedactMode()

bool SfxRedactionHelper::isRedactMode ( const SfxRequest rReq)
static

Checks to see if the request has a parameter of IsRedactMode:bool=true.

Definition at line 64 of file SfxRedactionHelper.cxx.

References SfxRequest::GetArg(), SfxRequest::GetArgs(), and SfxBoolItem::GetValue().

Referenced by SfxObjectShell::ExecFile_Impl().

◆ searchInMetaFile()

void SfxRedactionHelper::searchInMetaFile ( const RedactionTarget rRedactionTarget,
const GDIMetaFile rMtf,
std::vector< tools::Rectangle > &  aRedactionRectangles,
const uno::Reference< XComponent > &  xComponent 
)
static

◆ showRedactionToolbar()

void SfxRedactionHelper::showRedactionToolbar ( const SfxViewFrame pViewFrame)
static

Member Data Documentation

◆ m_aPredefinedTargets

constexpr std::u16string_view SfxRedactionHelper::m_aPredefinedTargets[6]
staticconstexprprivate
Initial value:
= {
u"\\b(?:\\d[ -]*?){13,16}\\b",
u"\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\\b",
u"\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
"\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
"\\b",
u"([12]\\d{3}[./-](0[1-9]|1[0-2])[./"
"-](0[1-9]|[12]\\d|3[01]))|((0[1-9]|[12]\\d|3[01])[./-](0[1-9]|1[0-2])[./"
"-][12]\\d{3})",
u"\\s*[a-zA-Z]{2}(?:\\s*\\d\\s*){6}[a-zA-Z]?\\s*",
u"([1-9])(?!\\1{2}-\\1{2}-\\1{4})[1-9]{2}-[1-9]{2}-[1-9]{4}"
}
float u

Definition at line 130 of file SfxRedactionHelper.hxx.

Referenced by fillSearchOptions().


The documentation for this class was generated from the following files: