LibreOffice Module xmloff (master) 1
|
This class is a base-class to create XMLPropertyHandler. More...
#include <prhdlfac.hxx>
Classes | |
struct | Impl |
Public Member Functions | |
XMLPropertyHandlerFactory () | |
virtual | ~XMLPropertyHandlerFactory () override |
virtual const XMLPropertyHandler * | GetPropertyHandler (sal_Int32 nType) const |
This method retrieves a PropertyHandler for the given XML-type. More... | |
Public Member Functions inherited from salhelper::SimpleReferenceObject | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Static Public Member Functions | |
static std::unique_ptr< XMLPropertyHandler > | CreatePropertyHandler (sal_Int32 nType) |
helper method to statically create a property handler; this will not use the handler cache. More... | |
Static Public Member Functions inherited from salhelper::SimpleReferenceObject | |
static void * | operator new (std::size_t nSize) |
static void * | operator new (std::size_t nSize, std::nothrow_t const &rNothrow) |
static void | operator delete (void *pPtr) |
static void | operator delete (void *pPtr, std::nothrow_t const &rNothrow) |
Protected Member Functions | |
const XMLPropertyHandler * | GetHdlCache (sal_Int32 nType) const |
Retrieves a PropertyHandler from the internal cache. More... | |
void | PutHdlCache (sal_Int32 nType, const XMLPropertyHandler *pHdl) const |
Puts a PropertyHandler into the internal cache. More... | |
Protected Member Functions inherited from salhelper::SimpleReferenceObject | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Private Member Functions | |
XMLPropertyHandlerFactory (const XMLPropertyHandlerFactory &)=delete | |
XMLPropertyHandlerFactory & | operator= (const XMLPropertyHandlerFactory &)=delete |
SAL_DLLPRIVATE const XMLPropertyHandler * | GetBasicHandler (sal_Int32 nType) const |
Retrieves ( creates if necessary ) PropertyHandler for basic XML-types. More... | |
Private Attributes | |
std::unique_ptr< Impl > | mpImpl |
Additional Inherited Members | |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
This class is a base-class to create XMLPropertyHandler.
It creates PropertyHandler for given XML-types and store them in an internal cache. They'll be deleted at destruction- time. For create your own PropertyHandler for specific XML-types you have to override the virtual method GetPropertyHandler ( see below ).
Definition at line 40 of file prhdlfac.hxx.
|
privatedelete |
XMLPropertyHandlerFactory::XMLPropertyHandlerFactory | ( | ) |
Definition at line 131 of file prhdlfac.cxx.
|
overridevirtual |
Definition at line 134 of file prhdlfac.cxx.
References mpImpl.
|
static |
helper method to statically create a property handler; this will not use the handler cache.
This method should only be called in special circumstances; calling GetPropertyHandler is almost always preferable.
Definition at line 176 of file prhdlfac.cxx.
References aXML_ColorMode_EnumMap, aXML_HorizontalAdjust_Enum, aXML_WritingDirection_Enum, xmloff::token::GetXMLToken(), nType, pXML_VertPos_Enum, xmloff::token::XML_ALWAYS, xmloff::token::XML_AUTO, xmloff::token::XML_AUTO_CREATE_NEW_FRAME, xmloff::token::XML_CLIP, xmloff::token::XML_FONT_COLOR, xmloff::token::XML_LR_TB, xmloff::token::XML_NONE, xmloff::token::XML_PAGE, xmloff::token::XML_SOLID, xmloff::token::XML_TOKEN_INVALID, xmloff::token::XML_TRUE, XML_TYPE_ATTRIBUTE_CONTAINER, XML_TYPE_BOOL, XML_TYPE_BOOL_FALSE, XML_TYPE_BORDER, XML_TYPE_BORDER_WIDTH, XML_TYPE_BUILDIN_CMP_ONLY, XML_TYPE_CHAR_COUNTRY, XML_TYPE_CHAR_HEIGHT, XML_TYPE_CHAR_HEIGHT_DIFF, XML_TYPE_CHAR_HEIGHT_PROP, XML_TYPE_CHAR_LANGUAGE, XML_TYPE_CHAR_RFC_LANGUAGE_TAG, XML_TYPE_CHAR_SCRIPT, XML_TYPE_COLOR, XML_TYPE_COLOR_MODE, XML_TYPE_COLORAUTO, XML_TYPE_COLORTRANSPARENT, XML_TYPE_DOUBLE, XML_TYPE_DOUBLE_PERCENT, XML_TYPE_DURATION16_MS, XML_TYPE_HEX, XML_TYPE_ISAUTOCOLOR, XML_TYPE_ISTRANSPARENT, XML_TYPE_LINE_SPACE_DISTANCE, XML_TYPE_LINE_SPACE_FIXED, XML_TYPE_LINE_SPACE_MINIMUM, XML_TYPE_MEASURE, XML_TYPE_MEASURE16, XML_TYPE_MEASURE8, XML_TYPE_MEASURE_PX, XML_TYPE_NBOOL, XML_TYPE_NEG_PERCENT, XML_TYPE_NEG_PERCENT16, XML_TYPE_NEG_PERCENT8, XML_TYPE_NUMBER, XML_TYPE_NUMBER16, XML_TYPE_NUMBER16_AUTO, XML_TYPE_NUMBER16_NO_ZERO, XML_TYPE_NUMBER16_NONE, XML_TYPE_NUMBER8, XML_TYPE_NUMBER8_NO_ZERO, XML_TYPE_NUMBER8_NONE, XML_TYPE_NUMBER_NO_ZERO, XML_TYPE_NUMBER_NONE, XML_TYPE_PERCENT, XML_TYPE_PERCENT100, XML_TYPE_PERCENT16, XML_TYPE_PERCENT8, XML_TYPE_RECTANGLE_HEIGHT, XML_TYPE_RECTANGLE_LEFT, XML_TYPE_RECTANGLE_TOP, XML_TYPE_RECTANGLE_WIDTH, XML_TYPE_STRING, XML_TYPE_STYLENAME, XML_TYPE_TEXT_ADJUST, XML_TYPE_TEXT_ADJUSTLAST, XML_TYPE_TEXT_BOOLCROSSEDOUT, XML_TYPE_TEXT_BREAKAFTER, XML_TYPE_TEXT_BREAKBEFORE, XML_TYPE_TEXT_CASEMAP, XML_TYPE_TEXT_CASEMAP_VAR, XML_TYPE_TEXT_CROSSEDOUT_STYLE, XML_TYPE_TEXT_CROSSEDOUT_TEXT, XML_TYPE_TEXT_CROSSEDOUT_TYPE, XML_TYPE_TEXT_CROSSEDOUT_WIDTH, XML_TYPE_TEXT_DRAW_ASPECT, XML_TYPE_TEXT_ESCAPEMENT, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT, XML_TYPE_TEXT_FONTENCODING, XML_TYPE_TEXT_FONTFAMILY, XML_TYPE_TEXT_FONTFAMILYNAME, XML_TYPE_TEXT_FONTPITCH, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY, XML_TYPE_TEXT_HORIZONTAL_ADJUST, XML_TYPE_TEXT_KERNING, XML_TYPE_TEXT_OVERFLOW_BEHAVIOR, XML_TYPE_TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_HASCOLOR, XML_TYPE_TEXT_OVERLINE_STYLE, XML_TYPE_TEXT_OVERLINE_TYPE, XML_TYPE_TEXT_OVERLINE_WIDTH, XML_TYPE_TEXT_POSTURE, XML_TYPE_TEXT_SHADOW, XML_TYPE_TEXT_SHADOWED, XML_TYPE_TEXT_SPLIT, XML_TYPE_TEXT_TABSTOP, XML_TYPE_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR, XML_TYPE_TEXT_UNDERLINE_STYLE, XML_TYPE_TEXT_UNDERLINE_TYPE, XML_TYPE_TEXT_UNDERLINE_WIDTH, XML_TYPE_TEXT_VERTICAL_POS, XML_TYPE_TEXT_WEIGHT, XML_TYPE_TEXT_WRITING_MODE, and XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT.
Referenced by GetBasicHandler().
|
private |
Retrieves ( creates if necessary ) PropertyHandler for basic XML-types.
Definition at line 164 of file prhdlfac.cxx.
References CreatePropertyHandler(), GetHdlCache(), nType, and PutHdlCache().
Referenced by GetPropertyHandler().
|
protected |
Retrieves a PropertyHandler from the internal cache.
Definition at line 149 of file prhdlfac.cxx.
Referenced by GetBasicHandler().
|
virtual |
This method retrieves a PropertyHandler for the given XML-type.
To extend this method for more XML-types override this method like the example below. If you call the method of the base-class you get propertyhandler for basic-XML-types ( e.g. for color, percent, ... ). After that you could create your new XML-types. After creating a new type you have to put the pointer into the cache via the method PutHdlCache( sal_Int32 , XMLPropertyHandler* ).
virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const { XMLPropertyHandler* pHdl = XMLPropertyHandlerFactory::GetPropertyHandler( nType );
if( !pHdl ) { switch( nType ) { case XML_TYPE_XYZ : pHdl = new XML_xyz_PropHdl; break; case ... : : }
if( pHdl ) PutHdlCache( nType, pHdl ); }
return pHdl; }
Reimplemented in xmloff::OControlPropertyHandlerFactory, XMLPageMasterPropHdlFactory, XMLChartPropHdlFactory, XMLSdPropHdlFactory, and XMLTextPropertyHandlerFactory.
Definition at line 141 of file prhdlfac.cxx.
References GetBasicHandler(), MID_FLAG_MASK, nType, and SAL_WARN_IF.
Referenced by xmloff::OControlPropertyHandlerFactory::GetPropertyHandler(), XMLPageMasterPropHdlFactory::GetPropertyHandler(), XMLChartPropHdlFactory::GetPropertyHandler(), XMLSdPropHdlFactory::GetPropertyHandler(), and XMLTextPropertyHandlerFactory::GetPropertyHandler().
|
privatedelete |
|
protected |
Puts a PropertyHandler into the internal cache.
Definition at line 159 of file prhdlfac.cxx.
Referenced by GetBasicHandler(), XMLPageMasterPropHdlFactory::GetPropertyHandler(), XMLChartPropHdlFactory::GetPropertyHandler(), XMLSdPropHdlFactory::GetPropertyHandler(), and XMLTextPropertyHandlerFactory::GetPropertyHandler().
|
private |
Definition at line 43 of file prhdlfac.hxx.
Referenced by GetHdlCache(), PutHdlCache(), and ~XMLPropertyHandlerFactory().