namespace sc_apitest
{ class ScEditFieldObj_Header : public UnoApiTest, public apitest::TextContent, public apitest::XComponent, public apitest::XPropertySet, public apitest::XTextContent, public apitest::XTextField
{ public:
ScEditFieldObj_Header();
void ScEditFieldObj_Header::tearDown()
{ // Clear these before the component is destroyed. This is important!
mxField.clear();
mxRightText.clear();
UnoApiTest::tearDown();
}
uno::Reference<uno::XInterface> ScEditFieldObj_Header::init()
{ // Return a field that's already in the header. if (!mxField.is())
{
uno::Reference<lang::XMultiServiceFactory> xSM(mxComponent, uno::UNO_QUERY_THROW);
// Create a new URL field object, and populate it with name and URL.
mxField.set(xSM->createInstance(u"com.sun.star.text.TextField.Time"_ustr),
uno::UNO_QUERY_THROW);
uno::Reference<text::XTextContent> ScEditFieldObj_Header::getTextContent()
{ // Return a field object that's not yet inserted.
uno::Reference<lang::XMultiServiceFactory> xSM(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextContent> xField(
xSM->createInstance(u"com.sun.star.text.TextField.Date"_ustr), uno::UNO_QUERY_THROW); return xField;
}
uno::Reference<text::XTextRange> ScEditFieldObj_Header::getTextRange()
{ // Use the right header text for this.
uno::Reference<text::XTextRange> xRange(mxRightText, uno::UNO_QUERY_THROW); return xRange;
}
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.