#include <prhdlfac.hxx>


Public Member Functions | |
| virtual | ~XMLPropertyHandlerFactory () |
| virtual const XMLPropertyHandler * | GetPropertyHandler (sal_Int32 nType) const |
| This method retrieves a PropertyHandler for the given XML-type. | |
Static Public Member Functions | |
| static const XMLPropertyHandler * | CreatePropertyHandler (sal_Int32 nType) |
| helper method to statically create a property handler; this will not use the handler cache. | |
Protected Member Functions | |
| XMLPropertyHandler * | GetHdlCache (sal_Int32 nType) const |
| Retrieves a PropertyHandler from the internal cache. | |
| void | PutHdlCache (sal_Int32 nType, const XMLPropertyHandler *pHdl) const |
| Puts a PropertyHandler into the internal cache. | |
Private Types | |
| typedef ::std::map< sal_Int32, XMLPropertyHandler * > | CacheMap |
Private Member Functions | |
| SAL_DLLPRIVATE const XMLPropertyHandler * | GetBasicHandler (sal_Int32 nType) const |
| Retrieves ( creates if necessary ) PropertyHandler for basic XML-types. | |
Private Attributes | |
| CacheMap | maHandlerCache |
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 50 of file prhdlfac.hxx.
typedef ::std::map< sal_Int32, XMLPropertyHandler* > XMLPropertyHandlerFactory::CacheMap [private] |
Definition at line 107 of file prhdlfac.hxx.
| XMLPropertyHandlerFactory::~XMLPropertyHandlerFactory | ( | ) | [virtual] |
| const XMLPropertyHandler * XMLPropertyHandlerFactory::GetPropertyHandler | ( | sal_Int32 | nType | ) | const [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, ... ). Afetr 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 XMLSdPropHdlFactory, XMLPageMasterPropHdlFactory, XMLTextPropertyHandlerFactory, XMLChartPropHdlFactory, and xmloff::OControlPropertyHandlerFactory.
Definition at line 122 of file prhdlfac.cxx.
References GetBasicHandler(), and MID_FLAG_MASK.
Referenced by XMLSdPropHdlFactory::GetPropertyHandler(), XMLTextPropertyHandlerFactory::GetPropertyHandler(), XMLChartPropHdlFactory::GetPropertyHandler(), xmloff::OControlPropertyHandlerFactory::GetPropertyHandler(), and XMLPageMasterPropHdlFactory::GetPropertyHandler().
| const XMLPropertyHandler * XMLPropertyHandlerFactory::CreatePropertyHandler | ( | sal_Int32 | nType | ) | [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 165 of file prhdlfac.cxx.
References aXML_HorizontalAdjust_Enum, aXML_WritingDirection_Enum, getCppuType(), xmloff::token::GetXMLToken(), xmloff::token::XML_ALWAYS, xmloff::token::XML_AUTO, 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_TRUE, XML_TYPE_ATTRIBUTE_CONTAINER, XML_TYPE_BOOL, 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_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_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_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_WEIGHT, XML_TYPE_TEXT_WRITING_MODE, and XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT.
Referenced by GetBasicHandler().
| XMLPropertyHandler * XMLPropertyHandlerFactory::GetHdlCache | ( | sal_Int32 | nType | ) | const [protected] |
Retrieves a PropertyHandler from the internal cache.
Definition at line 133 of file prhdlfac.cxx.
References maHandlerCache.
Referenced by GetBasicHandler().
| void XMLPropertyHandlerFactory::PutHdlCache | ( | sal_Int32 | nType, | |
| const XMLPropertyHandler * | pHdl | |||
| ) | const [protected] |
Puts a PropertyHandler into the internal cache.
Definition at line 143 of file prhdlfac.cxx.
Referenced by GetBasicHandler(), XMLTextPropertyHandlerFactory::GetPropertyHandler(), XMLSdPropHdlFactory::GetPropertyHandler(), XMLChartPropHdlFactory::GetPropertyHandler(), and XMLPageMasterPropHdlFactory::GetPropertyHandler().
| const XMLPropertyHandler * XMLPropertyHandlerFactory::GetBasicHandler | ( | sal_Int32 | nType | ) | const [private] |
Retrieves ( creates if necessary ) PropertyHandler for basic XML-types.
Definition at line 150 of file prhdlfac.cxx.
References CreatePropertyHandler(), GetHdlCache(), and PutHdlCache().
Referenced by GetPropertyHandler().
Definition at line 108 of file prhdlfac.hxx.
Referenced by GetHdlCache(), and ~XMLPropertyHandlerFactory().
1.5.6