LibreOffice Module vcl (master) 1
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
psp::PPDParser Class Reference

#include <ppdparser.hxx>

Collaboration diagram for psp::PPDParser:
[legend]

Classes

struct  PPDConstraint
 

Public Member Functions

 ~PPDParser ()
 
const PPDKeygetKey (int n) const
 
const PPDKeygetKey (const OUString &rKey) const
 
int getKeys () const
 
bool hasKey (const PPDKey *) const
 
const ::std::vector< PPDConstraint > & getConstraints () const
 
bool isColorDevice () const
 
bool isType42Capable () const
 
sal_uLong getLanguageLevel () const
 
OUString getDefaultPaperDimension () const
 
void getDefaultPaperDimension (int &rWidth, int &rHeight) const
 
bool getPaperDimension (std::u16string_view rPaperName, int &rWidth, int &rHeight) const
 
OUString matchPaper (int nWidth, int nHeight, psp::orientation *pOrientation=nullptr) const
 
bool getMargins (std::u16string_view rPaperName, int &rLeft, int &rRight, int &rUpper, int &rLower) const
 
OUString getDefaultInputSlot () const
 
void getDefaultResolution (int &rXRes, int &rYRes) const
 
OUString translateKey (const OUString &i_rKey) const
 
OUString translateOption (std::u16string_view i_rKey, const OUString &i_rOption) const
 

Static Public Member Functions

static const PPDParsergetParser (const OUString &rFile)
 
static void getResolutionFromString (std::u16string_view, int &, int &)
 

Private Types

typedef std::unordered_map< OUString, std::unique_ptr< PPDKey > > hash_type
 
typedef std::vector< PPDKey * > value_type
 

Private Member Functions

void insertKey (std::unique_ptr< PPDKey > pKey)
 
 PPDParser (OUString aFile)
 
 PPDParser (OUString aFile, const std::vector< PPDKey * > &keys)
 
void parseOrderDependency (const OString &rLine)
 
void parseOpenUI (const OString &rLine, std::string_view rPPDGroup)
 
void parseConstraint (const OString &rLine)
 
void parse (std::vector< OString > &rLines)
 
OUString handleTranslation (const OString &i_rString, bool i_bIsGlobalized)
 
OUString matchPaperImpl (int nWidth, int nHeight, bool bDontSwap=false, psp::orientation *pOrientation=nullptr) const
 

Static Private Member Functions

static void scanPPDDir (const OUString &rDir)
 
static void initPPDFiles (PPDCache &rPPDCache)
 
static OUString getPPDFile (const OUString &rFile)
 

Private Attributes

hash_type m_aKeys
 
value_type m_aOrderedKeys
 
::std::vector< PPDConstraintm_aConstraints
 
OUString m_aFile
 
bool m_bColorDevice
 
bool m_bType42Capable
 
sal_uLong m_nLanguageLevel
 
rtl_TextEncoding m_aFileEncoding
 
const PPDKeym_pImageableAreas
 
const PPDValuem_pDefaultPaperDimension
 
const PPDKeym_pPaperDimensions
 
const PPDValuem_pDefaultInputSlot
 
const PPDValuem_pDefaultResolution
 
std::unique_ptr< PPDTranslator > m_pTranslator
 

Friends

class PPDContext
 
class CUPSManager
 
class CPDManager
 
class PPDCache
 

Detailed Description

Definition at line 119 of file ppdparser.hxx.

Member Typedef Documentation

◆ hash_type

typedef std::unordered_map< OUString, std::unique_ptr<PPDKey> > psp::PPDParser::hash_type
private

Definition at line 126 of file ppdparser.hxx.

◆ value_type

typedef std::vector< PPDKey* > psp::PPDParser::value_type
private

Definition at line 127 of file ppdparser.hxx.

Constructor & Destructor Documentation

◆ PPDParser() [1/2]

psp::PPDParser::PPDParser ( OUString  aFile)
private

◆ PPDParser() [2/2]

psp::PPDParser::PPDParser ( OUString  aFile,
const std::vector< PPDKey * > &  keys 
)
private

◆ ~PPDParser()

psp::PPDParser::~PPDParser ( )

Member Function Documentation

◆ getConstraints()

const ::std::vector< PPDConstraint > & psp::PPDParser::getConstraints ( ) const
inline

Definition at line 193 of file ppdparser.hxx.

References m_aConstraints.

◆ getDefaultInputSlot()

OUString psp::PPDParser::getDefaultInputSlot ( ) const

◆ getDefaultPaperDimension() [1/2]

OUString psp::PPDParser::getDefaultPaperDimension ( ) const

◆ getDefaultPaperDimension() [2/2]

void psp::PPDParser::getDefaultPaperDimension ( int rWidth,
int rHeight 
) const
inline

Definition at line 200 of file ppdparser.hxx.

References getDefaultPaperDimension(), and getPaperDimension().

◆ getDefaultResolution()

void psp::PPDParser::getDefaultResolution ( int rXRes,
int rYRes 
) const

◆ getKey() [1/2]

const PPDKey * psp::PPDParser::getKey ( const OUString &  rKey) const

◆ getKey() [2/2]

const PPDKey * psp::PPDParser::getKey ( int  n) const

◆ getKeys()

int psp::PPDParser::getKeys ( ) const
inline

Definition at line 190 of file ppdparser.hxx.

References m_aKeys.

◆ getLanguageLevel()

sal_uLong psp::PPDParser::getLanguageLevel ( ) const
inline

Definition at line 197 of file ppdparser.hxx.

References m_nLanguageLevel.

◆ getMargins()

bool psp::PPDParser::getMargins ( std::u16string_view  rPaperName,
int rLeft,
int rRight,
int rUpper,
int rLower 
) const

◆ getPaperDimension()

bool psp::PPDParser::getPaperDimension ( std::u16string_view  rPaperName,
int rWidth,
int rHeight 
) const

◆ getParser()

static const PPDParser * psp::PPDParser::getParser ( const OUString &  rFile)
static

◆ getPPDFile()

static OUString psp::PPDParser::getPPDFile ( const OUString &  rFile)
staticprivate

◆ getResolutionFromString()

static void psp::PPDParser::getResolutionFromString ( std::u16string_view  ,
int ,
int  
)
static

◆ handleTranslation()

OUString psp::PPDParser::handleTranslation ( const OString &  i_rString,
bool  i_bIsGlobalized 
)
private

◆ hasKey()

bool psp::PPDParser::hasKey ( const PPDKey ) const

◆ initPPDFiles()

static void psp::PPDParser::initPPDFiles ( PPDCache rPPDCache)
staticprivate

◆ insertKey()

void psp::PPDParser::insertKey ( std::unique_ptr< PPDKey pKey)
private

◆ isColorDevice()

bool psp::PPDParser::isColorDevice ( ) const
inline

Definition at line 195 of file ppdparser.hxx.

References m_bColorDevice.

◆ isType42Capable()

bool psp::PPDParser::isType42Capable ( ) const
inline

Definition at line 196 of file ppdparser.hxx.

References m_bType42Capable.

◆ matchPaper()

OUString psp::PPDParser::matchPaper ( int  nWidth,
int  nHeight,
psp::orientation pOrientation = nullptr 
) const

◆ matchPaperImpl()

OUString psp::PPDParser::matchPaperImpl ( int  nWidth,
int  nHeight,
bool  bDontSwap = false,
psp::orientation pOrientation = nullptr 
) const
private

◆ parse()

void psp::PPDParser::parse ( std::vector< OString > &  rLines)
private

◆ parseConstraint()

void psp::PPDParser::parseConstraint ( const OString &  rLine)
private

◆ parseOpenUI()

void psp::PPDParser::parseOpenUI ( const OString &  rLine,
std::string_view  rPPDGroup 
)
private

◆ parseOrderDependency()

void psp::PPDParser::parseOrderDependency ( const OString &  rLine)
private

◆ scanPPDDir()

static void psp::PPDParser::scanPPDDir ( const OUString &  rDir)
staticprivate

◆ translateKey()

OUString psp::PPDParser::translateKey ( const OUString &  i_rKey) const

◆ translateOption()

OUString psp::PPDParser::translateOption ( std::u16string_view  i_rKey,
const OUString &  i_rOption 
) const

Friends And Related Function Documentation

◆ CPDManager

friend class CPDManager
friend

Definition at line 123 of file ppdparser.hxx.

◆ CUPSManager

friend class CUPSManager
friend

Definition at line 122 of file ppdparser.hxx.

◆ PPDCache

friend class PPDCache
friend

Definition at line 124 of file ppdparser.hxx.

◆ PPDContext

friend class PPDContext
friend

Definition at line 121 of file ppdparser.hxx.

Member Data Documentation

◆ m_aConstraints

::std::vector< PPDConstraint > psp::PPDParser::m_aConstraints
private

Definition at line 143 of file ppdparser.hxx.

Referenced by getConstraints().

◆ m_aFile

OUString psp::PPDParser::m_aFile
private

Definition at line 146 of file ppdparser.hxx.

◆ m_aFileEncoding

rtl_TextEncoding psp::PPDParser::m_aFileEncoding
private

Definition at line 151 of file ppdparser.hxx.

◆ m_aKeys

hash_type psp::PPDParser::m_aKeys
private

Definition at line 141 of file ppdparser.hxx.

Referenced by getKeys().

◆ m_aOrderedKeys

value_type psp::PPDParser::m_aOrderedKeys
private

Definition at line 142 of file ppdparser.hxx.

◆ m_bColorDevice

bool psp::PPDParser::m_bColorDevice
private

Definition at line 148 of file ppdparser.hxx.

Referenced by isColorDevice().

◆ m_bType42Capable

bool psp::PPDParser::m_bType42Capable
private

Definition at line 149 of file ppdparser.hxx.

Referenced by isType42Capable().

◆ m_nLanguageLevel

sal_uLong psp::PPDParser::m_nLanguageLevel
private

Definition at line 150 of file ppdparser.hxx.

Referenced by getLanguageLevel().

◆ m_pDefaultInputSlot

const PPDValue* psp::PPDParser::m_pDefaultInputSlot
private

Definition at line 161 of file ppdparser.hxx.

◆ m_pDefaultPaperDimension

const PPDValue* psp::PPDParser::m_pDefaultPaperDimension
private

Definition at line 158 of file ppdparser.hxx.

◆ m_pDefaultResolution

const PPDValue* psp::PPDParser::m_pDefaultResolution
private

Definition at line 163 of file ppdparser.hxx.

◆ m_pImageableAreas

const PPDKey* psp::PPDParser::m_pImageableAreas
private

Definition at line 156 of file ppdparser.hxx.

◆ m_pPaperDimensions

const PPDKey* psp::PPDParser::m_pPaperDimensions
private

Definition at line 159 of file ppdparser.hxx.

◆ m_pTranslator

std::unique_ptr<PPDTranslator> psp::PPDParser::m_pTranslator
private

Definition at line 166 of file ppdparser.hxx.


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