summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLStylesExportHelper.cxx
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-06 14:22:10 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-07 07:37:38 -0200
commit49e11ffbe1cc04f2855b18acd501954d80901efa (patch)
tree20bfbbab637d13ea81e8c467b59189701fedf1e4 /sc/source/filter/xml/XMLStylesExportHelper.cxx
parente4ce7225dd987f9b2f250f055d9688de79931444 (diff)
Fix for fdo43460 Part XXX getLength() to isEmpty()
Part XXX Modules sc
Diffstat (limited to 'sc/source/filter/xml/XMLStylesExportHelper.cxx')
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 1c7897f47bd2..cd086044b052 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -138,7 +138,7 @@ bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
sheet::ValidationType aValidationType;
xPropertySet->getPropertyValue(sTYPE) >>= aValidationType;
if (bShowErrorMessage || bShowImputMessage || aValidationType != sheet::ValidationType_ANY ||
- sErrorMessage.getLength() || sErrorTitle.getLength() || sImputMessage.getLength() || sImputTitle.getLength())
+ !sErrorMessage.isEmpty() || !sErrorTitle.isEmpty() || !sImputMessage.isEmpty() || !sImputTitle.isEmpty())
{
ScMyValidation aValidation;
aValidation.sErrorMessage = sErrorMessage;
@@ -227,10 +227,10 @@ rtl::OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const
}
}
if (aValidation.aValidationType != sheet::ValidationType_LIST &&
- (aValidation.sFormula1.getLength() ||
+ (!aValidation.sFormula1.isEmpty() ||
(aValidation.aOperator == sheet::ConditionOperator_BETWEEN &&
aValidation.aOperator == sheet::ConditionOperator_NOT_BETWEEN &&
- aValidation.sFormula2.getLength())))
+ !aValidation.sFormula2.isEmpty())))
{
if (aValidation.aValidationType != sheet::ValidationType_TEXT_LEN)
sCondition += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" and "));
@@ -292,7 +292,7 @@ rtl::OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const
if (aValidation.aValidationType == sheet::ValidationType_TEXT_LEN)
sCondition = rtl::OUString();
}
- if (sCondition.getLength())
+ if (!sCondition.isEmpty())
{
const formula::FormulaGrammar::Grammar eGrammar = rExport.GetDocument()->GetStorageGrammar();
sal_uInt16 nNamespacePrefix = (eGrammar == formula::FormulaGrammar::GRAM_ODFF ? XML_NAMESPACE_OF : XML_NAMESPACE_OOOC);
@@ -313,7 +313,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
const rtl::OUString& sTitle, const rtl::OUString& sOUMessage,
const bool bShowMessage, const bool bIsHelpMessage)
{
- if (sTitle.getLength())
+ if (!sTitle.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TITLE, sTitle);
if (bShowMessage)
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY, XML_TRUE);
@@ -324,7 +324,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
pMessage = new SvXMLElementExport(rExport, XML_NAMESPACE_TABLE, XML_HELP_MESSAGE, true, true);
else
pMessage = new SvXMLElementExport(rExport, XML_NAMESPACE_TABLE, XML_ERROR_MESSAGE, true, true);
- if (sOUMessage.getLength())
+ if (!sOUMessage.isEmpty())
{
sal_Int32 i(0);
rtl::OUStringBuffer sTemp;
@@ -363,7 +363,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, aItr->sName);
rtl::OUString sCondition(GetCondition(rExport, *aItr));
- if (sCondition.getLength())
+ if (!sCondition.isEmpty())
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CONDITION, sCondition);
if (aItr->bIgnoreBlanks)
@@ -390,11 +390,11 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
}
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_BASE_CELL_ADDRESS, GetBaseCellAddress(rExport.GetDocument(), aItr->aBaseCell));
SvXMLElementExport aElemV(rExport, XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATION, true, true);
- if (aItr->bShowImputMessage || aItr->sImputMessage.getLength() || aItr->sImputTitle.getLength())
+ if (aItr->bShowImputMessage || !aItr->sImputMessage.isEmpty() || !aItr->sImputTitle.isEmpty())
{
WriteMessage(rExport, aItr->sImputTitle, aItr->sImputMessage, aItr->bShowImputMessage, true);
}
- if (aItr->bShowErrorMessage || aItr->sErrorMessage.getLength() || aItr->sErrorTitle.getLength())
+ if (aItr->bShowErrorMessage || !aItr->sErrorMessage.isEmpty() || !aItr->sErrorTitle.isEmpty())
{
switch (aItr->aAlertStyle)
{