summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorHenning Brinkmann <hbrinkm@openoffice.org>2007-01-30 13:50:24 +0000
committerHenning Brinkmann <hbrinkm@openoffice.org>2007-01-30 13:50:24 +0000
commitc55ddfbb986ec665800e4fb599086214ffa326ec (patch)
tree28efbd39efb412eeb9907f1e4e6315d14fa32296 /xmloff
parent49d984877f7c3530fb2539eeefaa39afa0c2ff8b (diff)
#144146# XMLTextFieldExport: new attributes: text:hint, text:help
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/txtflde.hxx6
-rw-r--r--xmloff/inc/txtfldi.hxx12
-rw-r--r--xmloff/inc/txtvfldi.hxx16
-rw-r--r--xmloff/source/core/xmltoken.cxx6
-rw-r--r--xmloff/source/text/txtflde.cxx22
5 files changed, 48 insertions, 14 deletions
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index bd53261c900b..e07162068928 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: txtflde.hxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: obo $ $Date: 2006-10-12 14:37:25 $
+ * last change: $Author: hbrinkm $ $Date: 2007-01-30 14:45:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -539,6 +539,8 @@ private:
const ::rtl::OUString sPropertyValue;
const ::rtl::OUString sPropertyVariableName;
const ::rtl::OUString sPropertyVariableSubType;
+ const ::rtl::OUString sPropertyHelp;
+ const ::rtl::OUString sPropertyTooltip;
const ::rtl::OUString sEmpty;
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 3227d3393474..62c935067d94 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: txtfldi.hxx,v $
*
- * $Revision: 1.30 $
+ * $Revision: 1.31 $
*
- * last change: $Author: hr $ $Date: 2006-06-19 17:56:46 $
+ * last change: $Author: hbrinkm $ $Date: 2007-01-30 14:45:49 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -99,6 +99,8 @@ enum XMLTextFieldAttrTokens
{
XML_TOK_TEXTFIELD_FIXED = 0,
XML_TOK_TEXTFIELD_DESCRIPTION,
+ XML_TOK_TEXTFIELD_HELP,
+ XML_TOK_TEXTFIELD_HINT,
XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE,
XML_TOK_TEXTFIELD_TIME_ADJUST,
XML_TOK_TEXTFIELD_DATE_ADJUST,
@@ -1469,12 +1471,18 @@ class XMLDropDownFieldImportContext : public XMLTextFieldImportContext
{
std::vector<rtl::OUString> aLabels;
rtl::OUString sName;
+ rtl::OUString sHelp;
+ rtl::OUString sHint;
sal_Int32 nSelected;
bool bNameOK;
+ bool bHelpOK;
+ bool bHintOK;
const rtl::OUString sPropertyItems;
const rtl::OUString sPropertySelectedItem;
const rtl::OUString sPropertyName;
+ const rtl::OUString sPropertyHelp;
+ const rtl::OUString sPropertyToolTip;
public:
TYPEINFO();
diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
index 912cbb342e59..bb939a2a2084 100644
--- a/xmloff/inc/txtvfldi.hxx
+++ b/xmloff/inc/txtvfldi.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: txtvfldi.hxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: hr $ $Date: 2006-06-19 17:57:24 $
+ * last change: $Author: hbrinkm $ $Date: 2007-01-30 14:46:31 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -164,6 +164,8 @@ class XMLVarFieldImportContext : public XMLTextFieldImportContext
protected:
const ::rtl::OUString sPropertyContent;
const ::rtl::OUString sPropertyHint;
+ const ::rtl::OUString sPropertyHelp;
+ const ::rtl::OUString sPropertyTooltip;
const ::rtl::OUString sPropertyIsVisible;
const ::rtl::OUString sPropertyIsDisplayFormula;
const ::rtl::OUString sPropertyCurrentPresentation;
@@ -172,6 +174,8 @@ private:
::rtl::OUString sName; /// name attribute
::rtl::OUString sFormula; /// formula attribute
::rtl::OUString sDescription; /// description
+ ::rtl::OUString sHelp; /// help text
+ ::rtl::OUString sHint; /// hint
XMLValueImportHelper aValueHelper; /// value, value-type, and style
sal_Bool bDisplayFormula; /// display formula?(rather than value)
sal_Bool bDisplayNone; /// hide field?
@@ -179,12 +183,16 @@ private:
sal_Bool bNameOK; /// sName was set
sal_Bool bFormulaOK; /// sFormula was set
sal_Bool bDescriptionOK; /// sDescription was set
+ sal_Bool bHelpOK; /// sHelp was set
+ sal_Bool bHintOK; /// sHint was set
sal_Bool bDisplayOK; /// sDisplayFormula/-None were set
sal_Bool bSetName; /// set sName with ???-property
sal_Bool bSetFormula; /// set Formula property
sal_Bool bSetFormulaDefault; /// use content as default for formula
sal_Bool bSetDescription; /// set sDescription with Hint-property
+ sal_Bool bSetHelp;
+ sal_Bool bSetHint;
sal_Bool bSetVisible; /// set IsVisible
sal_Bool bSetDisplayFormula; /// set DisplayFormula (sub type???)
sal_Bool bSetPresentation; /// set presentation frm elem. content?
@@ -205,6 +213,8 @@ public:
sal_Bool bFormula, /// set Formula property
sal_Bool bFormulaDefault, /// use content as default for formula
sal_Bool bDescription, /// set sDescription with Hint-property
+ sal_Bool bHelp,
+ sal_Bool bHint,
sal_Bool bVisible, /// set IsVisible (display attr)
sal_Bool bDisplayFormula, /// set ??? (display attr.)
sal_Bool bType, /// set value type with ???-property
@@ -331,6 +341,8 @@ public:
sal_Bool bFormula, /// see XMLTextFieldImportContext
sal_Bool bFormulaDefault, /// see XMLTextFieldImportContext
sal_Bool bDescription, /// see XMLTextFieldImportContext
+ sal_Bool bHelp, /// see XMLTextFieldImportContext
+ sal_Bool bHint, /// see XMLTextFieldImportContext
sal_Bool bVisible, /// see XMLTextFieldImportContext
sal_Bool bDisplayFormula, /// see XMLTextFieldImportContext
sal_Bool bType, /// see XMLTextFieldImportContext
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 72c994f76781..05d54c94e7ca 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: xmltoken.cxx,v $
*
- * $Revision: 1.100 $
+ * $Revision: 1.101 $
*
- * last change: $Author: hr $ $Date: 2006-10-24 13:33:59 $
+ * last change: $Author: hbrinkm $ $Date: 2007-01-30 14:47:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -906,6 +906,7 @@ namespace xmloff { namespace token {
TOKEN( "header-style", XML_HEADER_STYLE ),
TOKEN( "headers", XML_HEADERS ),
TOKEN( "height", XML_HEIGHT ),
+ TOKEN( "help", XML_HELP ),
TOKEN( "help-file-name", XML_HELP_FILE_NAME ),
TOKEN( "help-id", XML_HELP_ID ),
TOKEN( "help-message", XML_HELP_MESSAGE ),
@@ -917,6 +918,7 @@ namespace xmloff { namespace token {
TOKEN( "hide-shape", XML_HIDE_SHAPE ),
TOKEN( "hide-text", XML_HIDE_TEXT ),
TOKEN( "highlighted-range", XML_HIGHLIGHTED_RANGE ),
+ TOKEN( "hint", XML_HINT ),
TOKEN( "horizontal", XML_HORIZONTAL ),
TOKEN( "horizontal-lines", XML_HORIZONTAL_LINES ),
// --> OD 2005-05-12 #i49139#
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 5c442c95f833..6b8f5fa7ea46 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: txtflde.cxx,v $
*
- * $Revision: 1.69 $
+ * $Revision: 1.70 $
*
- * last change: $Author: rt $ $Date: 2006-12-01 15:28:45 $
+ * last change: $Author: hbrinkm $ $Date: 2007-01-30 14:50:24 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -467,7 +467,8 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp,
sPropertyValue(RTL_CONSTASCII_USTRINGPARAM("Value")),
sPropertyVariableName(RTL_CONSTASCII_USTRINGPARAM("VariableName")),
sPropertyVariableSubType(RTL_CONSTASCII_USTRINGPARAM("VariableSubtype")),
-
+ sPropertyHelp(RTL_CONSTASCII_USTRINGPARAM("Help")),
+ sPropertyTooltip(RTL_CONSTASCII_USTRINGPARAM("Tooltip")),
pCombinedCharactersPropertyState(pCombinedCharState)
{
SetExportOnlyUsedFieldDeclarations();
@@ -1347,6 +1348,10 @@ void XMLTextFieldExport::ExportFieldHelper(
// text input field: description and string-value
ProcessString(XML_DESCRIPTION,
GetStringProperty(sPropertyHint, rPropSet));
+ ProcessString(XML_HELP,
+ GetStringProperty(sPropertyHelp, rPropSet), true);
+ ProcessString(XML_HINT,
+ GetStringProperty(sPropertyTooltip, rPropSet), true);
ExportElement(XML_TEXT_INPUT, sPresentation);
break;
@@ -1897,12 +1902,17 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_DROP_DOWN:
{
ProcessString(XML_NAME, GetStringProperty(sPropertyName, rPropSet));
+ ProcessString(XML_HELP,
+ GetStringProperty(sPropertyHelp, rPropSet), true);
+ ProcessString(XML_HINT,
+ GetStringProperty(sPropertyTooltip, rPropSet), true);
SvXMLElementExport aElem( GetExport(),
XML_NAMESPACE_TEXT, XML_DROPDOWN,
sal_False, sal_False );
- ProcessStringSequence(
- GetStringSequenceProperty( sPropertyItems, rPropSet ),
- GetStringProperty( sPropertySelectedItem, rPropSet ) );
+ ProcessStringSequence
+ (GetStringSequenceProperty( sPropertyItems, rPropSet ),
+ GetStringProperty( sPropertySelectedItem, rPropSet ) );
+
GetExport().Characters( sPresentation );
}
break;