summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-20 17:21:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-20 17:27:32 +0200
commitef0161b649d54454bfb588a251d48ea9c3b79f79 (patch)
treeaf08e2955f13ad5c509d81c120df394f484ac844 /xmlscript
parent5ef76efb407a3dba8898a9a9b1b80cc548a94105 (diff)
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I2f5c4c341c4c38e1603748fb7c1f50e42547d005
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/imp_share.hxx4
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx12
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx8
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_import.cxx8
4 files changed, 16 insertions, 16 deletions
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 30f8ffdba28b..743b5ee239f6 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -67,12 +67,12 @@ inline bool getBoolAttr(
{
if ( aValue == "true" )
{
- *pRet = sal_True;
+ *pRet = true;
return true;
}
else if ( aValue == "false" )
{
- *pRet = sal_False;
+ *pRet = false;
return true;
}
else
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index cee35209acde..4d157d2c6736 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -561,7 +561,7 @@ void FormattedFieldElement::endElement()
{
Reference< util::XNumberFormats > xFormats(
_pImport->getNumberFormatsSupplier()->getNumberFormats() );
- sal_Int32 nKey = xFormats->queryKey( sFormat, locale, sal_True );
+ sal_Int32 nKey = xFormats->queryKey( sFormat, locale, true );
if (-1 == nKey)
{
nKey = xFormats->addNew( sFormat, locale );
@@ -1225,7 +1225,7 @@ void TitledBoxElement::endElement()
ctx.importStringProperty( "GroupName", "group-name", xAttributes );
sal_Int16 nVal = 0;
- sal_Bool bChecked = sal_False;
+ sal_Bool bChecked = false;
if (getBoolAttr( &bChecked, "checked", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked)
{
nVal = 1;
@@ -1321,7 +1321,7 @@ void RadioGroupElement::endElement()
ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes );
ctx.importStringProperty( "GroupName", "group-name", xAttributes );
sal_Int16 nVal = 0;
- sal_Bool bChecked = sal_False;
+ sal_Bool bChecked = false;
if (getBoolAttr( &bChecked, "checked", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked)
{
nVal = 1;
@@ -1578,12 +1578,12 @@ void CheckBoxElement::endElement()
ctx.importImagePositionProperty( "ImagePosition", "image-position", _xAttributes );
ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes );
- sal_Bool bTriState = sal_False;
+ sal_Bool bTriState = false;
if (getBoolAttr( &bTriState, "tristate", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
xControlModel->setPropertyValue( "TriState", makeAny( bTriState ) );
}
- sal_Bool bChecked = sal_False;
+ sal_Bool bChecked = false;
if (getBoolAttr( &bChecked, "checked", _xAttributes, _pImport->XMLNS_DIALOGS_UID ))
{
// has "checked" attribute
@@ -1655,7 +1655,7 @@ void ButtonElement::endElement()
ctx.importBooleanProperty( "FocusOnClick", "grab-focus", _xAttributes );
ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes );
// State
- sal_Bool bChecked = sal_False;
+ sal_Bool bChecked = false;
if (getBoolAttr( &bChecked, "checked", _xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked)
{
sal_Int16 nVal = 1;
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index c82d306b9ab1..3303bb0a1614 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -1575,18 +1575,18 @@ void ImportContext::importDefaults(
importShortProperty( "TabIndex", "tab-index", xAttributes );
- sal_Bool bDisable = sal_False;
+ sal_Bool bDisable = false;
if (getBoolAttr( &bDisable,"disabled", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bDisable)
{
- _xControlModel->setPropertyValue( "Enabled", makeAny( sal_False ) );
+ _xControlModel->setPropertyValue( "Enabled", makeAny( false ) );
}
- sal_Bool bVisible = sal_True;
+ sal_Bool bVisible = true;
if (getBoolAttr( &bVisible, "visible", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !bVisible)
{
try
{
- _xControlModel->setPropertyValue( "EnableVisible", makeAny( sal_False ) );
+ _xControlModel->setPropertyValue( "EnableVisible", makeAny( false ) );
}
catch( Exception& )
{
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index c3f93e728a6a..81d7cbdfa6e3 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -73,12 +73,12 @@ namespace xmlscript
{
if ( aValue == "true" )
{
- *pRet = sal_True;
+ *pRet = true;
return true;
}
else if ( aValue == "false" )
{
- *pRet = sal_False;
+ *pRet = false;
return true;
}
else
@@ -180,7 +180,7 @@ void BasicElementBase::processingInstruction( const OUString& /*rTarget*/, const
OUString aStorageURL = xAttributes->getValueByUidName(m_pImport->XMLNS_XLINK_UID, "href" );
- sal_Bool bReadOnly = sal_False;
+ sal_Bool bReadOnly = false;
getBoolAttr( &bReadOnly,"readonly", xAttributes, m_pImport->XMLNS_UID );
if ( m_xLibContainer.is() )
@@ -211,7 +211,7 @@ void BasicElementBase::processingInstruction( const OUString& /*rTarget*/, const
{
OUString aName = xAttributes->getValueByUidName( m_pImport->XMLNS_UID, "name" );
- sal_Bool bReadOnly = sal_False;
+ sal_Bool bReadOnly = false;
getBoolAttr( &bReadOnly, "readonly", xAttributes, m_pImport->XMLNS_UID );
if ( m_xLibContainer.is() )