// maps objects (property sets) to strings, e.g. control ids. typedef ::std::unordered_map < css::uno::Reference< css::beans::XPropertySet >
, OUString
> MapPropertySet2String;
// map pages to maps (of property sets to strings) typedef ::std::unordered_map < css::uno::Reference< css::drawing::XDrawPage >
, MapPropertySet2String
> MapPropertySet2Map;
//= OFormLayerXMLExport_Impl /** the implementation class for OFormLayerXMLExport
*/ class OFormLayerXMLExport_Impl
:public IFormsExportContext
{ friendclass OFormLayerXMLExport;
// we need our own number formats supplier: // Controls which have a number formats do not work with the formats supplier of the document they reside // in, instead they use the formats of the data source their form is associated with. If there is no // such form or no such data source, they work with an own formatter. // Even more, time and date fields do not work with a central formatter at all, they have their own one // (which is shared internally, but this is a (hidden) implementation detail.)
// To not contaminate the global (document) number formats supplier (which could be obtained from the context), // we have an own one. // (Contaminate means: If a user adds a user-defined format to a formatted field, this format is stored in // in the data source's formats supplier. To export this _and_ reuse existing structures, we would need to // add this format to the global (document) formats supplier. // In case of an export we could do some cleanup afterwards, but in case of an import, there is no such // chance, as (if other user-defined formats exist in the document as well) we can't distinguish // between user-defined formats really needed for the doc (i.e. in a calc cell) and formats only added // to the supplier because the controls needed it.
css::uno::Reference< css::util::XNumberFormats >
m_xControlNumberFormats;
MapPropertySet2Map m_aControlIds; // the control ids of all controls on all pages we ever examined
MapPropertySet2Map m_aReferringControls; // for a given page (iter->first), and a given control (iter->second->first), this is the comma-separated // lists of ids of the controls referring to the control given.
MapPropertySet2Map::iterator
m_aCurrentPageIds; // the iterator for the control id map for the page being handled
MapPropertySet2Map::iterator
m_aCurrentPageReferring; // the same for the map of referring controls
// TODO: To avoid this construct above, and to have a cleaner implementation, a class encapsulating the // export of a single page should be introduced.
typedef std::unordered_map<css::uno::Reference<css::beans::XPropertySet>, sal_Int32> MapPropertySet2Int;
MapPropertySet2Int m_aControlNumberFormats; // maps controls to format keys, which are relative to our own formats supplier
MapPropertySet2String m_aGridColumnStyles; // style names of grid columns
/** check the object given if it's a control, if so, examine it. @return<TRUE/>iftheobjecthasbeenhandled
*/ bool checkExamineControl(const css::uno::Reference< css::beans::XPropertySet >& _rxObject);
/** examines the control's number format, so later the format style can be referred
/// returns the instance exporting our control's number styles
SvXMLNumFmtExport* getControlNumberStyleExport();
/// ensures that the instance exporting our control's number styles exists void ensureControlNumberStyleExport();
/** determines the number format style for the given object without remembering it
*/
OUString
getImmediateNumberStyle( const css::uno::Reference< css::beans::XPropertySet >& _rxObject );
/** returns the prefix to be used for control number styles
*/ staticconst OUString& getControlNumberStyleNamePrefix();
/** exclude the given control (model) from export.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.