summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-08 11:41:58 +0200
committerNoel Grandin <noel@peralex.com>2014-05-08 11:44:53 +0200
commit9c117de4c1d291823d1588a99011ababab2112c8 (patch)
tree0ba30c45355d80632bce06dba5026a620a26de38 /extensions
parent81bd29a61ef3ae052993877524357a4e1f3bc330 (diff)
extensions: sal_Bool->bool
Change-Id: Ia22387bf25891fb83982c03af3fa4fffdb0c3cab
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx52
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx30
-rw-r--r--extensions/source/propctrlr/propcontroller.hxx8
-rw-r--r--extensions/source/propctrlr/propertycomposer.cxx2
-rw-r--r--extensions/source/propctrlr/sqlcommanddesign.hxx2
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx16
-rw-r--r--extensions/source/propctrlr/standardcontrol.hxx8
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx4
-rw-r--r--extensions/source/propctrlr/usercontrol.hxx4
9 files changed, 63 insertions, 63 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 0f37e16ceef7..460371e303b8 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -548,7 +548,7 @@ namespace pcr
::std::vector< OUString > aListEntries;
tools::StringListResource aRes( PcrRes( RID_RSC_ENUM_SHOWHIDE ), aListEntries );
OSL_ENSURE( aListEntries.size() == 2, "FormComponentPropertyHandler::convertToPropertyValue: broken resource for Show/Hide!" );
- sal_Bool bShow = ( aListEntries.size() < 2 ) || ( sControlValue == aListEntries[1] );
+ bool bShow = ( aListEntries.size() < 2 ) || ( sControlValue == aListEntries[1] );
aPropertyValue <<= bShow;
}
@@ -999,7 +999,7 @@ namespace pcr
// for the moment, assume a text field
sal_Int16 nControlType = PropertyControlType::TextField;
- sal_Bool bReadOnly = sal_False;
+ bool bReadOnly = false;
aDescriptor.Control.clear();
@@ -1043,7 +1043,7 @@ namespace pcr
break;
case PROPERTY_ID_FONT:
- bReadOnly = sal_True;
+ bReadOnly = true;
aDescriptor.PrimaryButtonId = OUString::createFromAscii(UID_PROP_DLG_FONT_TYPE);
break;
@@ -1099,7 +1099,7 @@ namespace pcr
break;
case PROPERTY_ID_CONTROLLABEL:
- bReadOnly = sal_True;
+ bReadOnly = true;
aDescriptor.PrimaryButtonId = OUString::createFromAscii(UID_PROP_DLG_CONTROLLABEL);
break;
@@ -1120,7 +1120,7 @@ namespace pcr
if (pSupplier != NULL)
{
- sal_Bool bIsFormatKey = (PROPERTY_ID_FORMATKEY == nPropId);
+ bool bIsFormatKey = (PROPERTY_ID_FORMATKEY == nPropId);
bReadOnly = bIsFormatKey;
@@ -1619,7 +1619,7 @@ namespace pcr
// ----- Repeat -----
case PROPERTY_ID_REPEAT:
{
- sal_Bool bIsRepeating = sal_False;
+ bool bIsRepeating = false;
OSL_VERIFY( _rNewValue >>= bIsRepeating );
_rxInspectorUI->enablePropertyUI( PROPERTY_REPEAT_DELAY, bIsRepeating );
}
@@ -1630,7 +1630,7 @@ namespace pcr
{
if ( !impl_componentHasProperty_throw( PROPERTY_TABINDEX ) )
break;
- sal_Bool bHasTabStop = sal_False;
+ bool bHasTabStop = false;
_rNewValue >>= bHasTabStop;
_rxInspectorUI->enablePropertyUI( PROPERTY_TABINDEX, bHasTabStop );
}
@@ -1650,7 +1650,7 @@ namespace pcr
{
if ( impl_isSupportedProperty_nothrow( PROPERTY_ID_LINECOUNT ) )
{
- sal_Bool bDropDown = sal_True;
+ bool bDropDown = true;
_rNewValue >>= bDropDown;
_rxInspectorUI->enablePropertyUI( PROPERTY_LINECOUNT, bDropDown );
}
@@ -1697,9 +1697,9 @@ namespace pcr
// ----- ShowThousandsSeparator -----
case PROPERTY_ID_SHOWTHOUSANDSEP:
{
- sal_Bool bAccuracy = (PROPERTY_ID_DECIMAL_ACCURACY == nActuatingPropId);
+ bool bAccuracy = (PROPERTY_ID_DECIMAL_ACCURACY == nActuatingPropId);
sal_uInt16 nNewDigits = 0;
- sal_Bool bUseSep = sal_False;
+ bool bUseSep = false;
if ( bAccuracy )
OSL_VERIFY( _rNewValue >>= nNewDigits );
else
@@ -1776,7 +1776,7 @@ namespace pcr
case PROPERTY_ID_TOGGLE:
{
- sal_Bool bIsToggleButton = sal_False;
+ bool bIsToggleButton = false;
OSL_VERIFY( _rNewValue >>= bIsToggleButton );
_rxInspectorUI->enablePropertyUI( PROPERTY_DEFAULT_STATE, bIsToggleButton );
}
@@ -1826,8 +1826,8 @@ namespace pcr
OSL_VERIFY( aListSourceValue >>= sListSource );
}
- sal_Bool bIsEnabled = ( ( eLSType == ListSourceType_VALUELIST )
- || ( sListSource.isEmpty() )
+ bool bIsEnabled = ( ( eLSType == ListSourceType_VALUELIST )
+ || ( sListSource.isEmpty() )
);
_rxInspectorUI->enablePropertyUI( PROPERTY_STRINGITEMLIST, bIsEnabled );
}
@@ -1868,8 +1868,8 @@ namespace pcr
OUString sControlSource;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_CONTROLSOURCE ) >>= sControlSource );
- sal_Bool bEmptyIsNULL = sal_False;
- sal_Bool bHasEmptyIsNULL = impl_componentHasProperty_throw( PROPERTY_EMPTY_IS_NULL );
+ bool bEmptyIsNULL = false;
+ bool bHasEmptyIsNULL = impl_componentHasProperty_throw( PROPERTY_EMPTY_IS_NULL );
if ( bHasEmptyIsNULL )
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_EMPTY_IS_NULL ) >>= bEmptyIsNULL );
@@ -1930,7 +1930,7 @@ namespace pcr
bool bAllowEmptyDS = ::dbtools::isEmbeddedInDatabase( m_xComponent, xConnection );
// if there's no escape processing, we cannot enter any values for this property
- sal_Bool bDoEscapeProcessing( sal_False );
+ bool bDoEscapeProcessing( false );
impl_getPropertyValue_throw( PROPERTY_ESCAPE_PROCESSING ) >>= bDoEscapeProcessing;
_rxInspectorUI->enablePropertyUI(
impl_getPropertyNameFromId_nothrow( _nPropId ),
@@ -2185,10 +2185,10 @@ namespace pcr
case ControlType::FORMATTEDFIELD:
case FormComponentType::CURRENCYFIELD:
case FormComponentType::PATTERNFIELD:
- _rValue = makeAny( (sal_Bool)sal_True );
+ _rValue = makeAny( true );
break;
default:
- _rValue = makeAny( (sal_Bool)sal_False );
+ _rValue = makeAny( false );
break;
}
}
@@ -2534,7 +2534,7 @@ namespace pcr
Sequence< OUString> aQueryNames = _xQueryNames->getElementNames();
sal_uInt32 nCount = aQueryNames.getLength();
const OUString* pQueryNames = aQueryNames.getConstArray();
- sal_Bool bAdd = !_sName.isEmpty();
+ bool bAdd = !_sName.isEmpty();
for ( sal_uInt32 i=0; i<nCount; i++, ++pQueryNames )
{
@@ -3005,8 +3005,8 @@ namespace pcr
FormSQLCommandUI( const Reference< XPropertySet >& _rxForm );
// ISQLCommandAdapter
- virtual OUString getSQLCommand() const SAL_OVERRIDE;
- virtual sal_Bool getEscapeProcessing() const SAL_OVERRIDE;
+ virtual OUString getSQLCommand() const SAL_OVERRIDE;
+ virtual bool getEscapeProcessing() const SAL_OVERRIDE;
virtual void setSQLCommand( const OUString& _rCommand ) const SAL_OVERRIDE;
virtual void setEscapeProcessing( const sal_Bool _bEscapeProcessing ) const SAL_OVERRIDE;
@@ -3032,9 +3032,9 @@ namespace pcr
}
- sal_Bool FormSQLCommandUI::getEscapeProcessing() const
+ bool FormSQLCommandUI::getEscapeProcessing() const
{
- sal_Bool bEscapeProcessing( sal_False );
+ bool bEscapeProcessing( false );
OSL_VERIFY( m_xObject->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bEscapeProcessing );
return bEscapeProcessing;
}
@@ -3072,8 +3072,8 @@ namespace pcr
ValueListCommandUI( const Reference< XPropertySet >& _rxListOrCombo );
// ISQLCommandAdapter
- virtual OUString getSQLCommand() const SAL_OVERRIDE;
- virtual sal_Bool getEscapeProcessing() const SAL_OVERRIDE;
+ virtual OUString getSQLCommand() const SAL_OVERRIDE;
+ virtual bool getEscapeProcessing() const SAL_OVERRIDE;
virtual void setSQLCommand( const OUString& _rCommand ) const SAL_OVERRIDE;
virtual void setEscapeProcessing( const sal_Bool _bEscapeProcessing ) const SAL_OVERRIDE;
@@ -3118,7 +3118,7 @@ namespace pcr
}
- sal_Bool ValueListCommandUI::getEscapeProcessing() const
+ bool ValueListCommandUI::getEscapeProcessing() const
{
enum ListSourceType eType( ListSourceType_SQL );
OSL_VERIFY( m_xObject->getPropertyValue( PROPERTY_LISTSOURCETYPE ) >>= eType );
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index fafa76aeb1a2..f0713b31f7c4 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -406,26 +406,26 @@ namespace pcr
}
- sal_Bool OPropertyBrowserController::suspendAll_nothrow()
+ bool OPropertyBrowserController::suspendAll_nothrow()
{
// if there is a handle inside its "onInteractivePropertySelection" method,
// then veto
// Normally, we could expect every handler to do this itself, but being
// realistic, it's safer to handle this here in general.
if ( m_xInteractiveHandler.is() )
- return sal_False;
+ return false;
m_bSuspendingPropertyHandlers = true;
- sal_Bool bHandlerVeto = !suspendPropertyHandlers_nothrow( sal_True );
+ bool bHandlerVeto = !suspendPropertyHandlers_nothrow( true );
m_bSuspendingPropertyHandlers = false;
if ( bHandlerVeto )
- return sal_False;
+ return false;
- return sal_True;
+ return true;
}
- sal_Bool OPropertyBrowserController::suspendPropertyHandlers_nothrow( sal_Bool _bSuspend )
+ bool OPropertyBrowserController::suspendPropertyHandlers_nothrow( bool _bSuspend )
{
PropertyHandlerArray aAllHandlers; // will contain every handler exactly once
for ( PropertyHandlerRepository::const_iterator handler = m_aPropertyHandlers.begin();
@@ -450,14 +450,14 @@ namespace pcr
if ( !(*loop)->suspend( _bSuspend ) )
if ( _bSuspend )
// if we're not suspending, but reactivating, ignore the error
- return sal_False;
+ return false;
}
catch( const Exception& )
{
OSL_FAIL( "OPropertyBrowserController::suspendPropertyHandlers_nothrow: caught an exception!" );
}
}
- return sal_True;
+ return true;
}
@@ -468,7 +468,7 @@ namespace pcr
if ( !_bSuspend )
{ // this means a "suspend" is to be "revoked"
- suspendPropertyHandlers_nothrow( sal_False );
+ suspendPropertyHandlers_nothrow( false );
// we ourself cannot revoke our suspend
return sal_False;
}
@@ -696,7 +696,7 @@ namespace pcr
}
- sal_Bool OPropertyBrowserController::Construct(Window* _pParentWin)
+ bool OPropertyBrowserController::Construct(Window* _pParentWin)
{
DBG_ASSERT(!haveView(), "OPropertyBrowserController::Construct: already have a view!");
DBG_ASSERT(_pParentWin, "OPropertyBrowserController::Construct: invalid parent window!");
@@ -718,7 +718,7 @@ namespace pcr
m_pView->Show();
- return sal_True;
+ return true;
}
@@ -770,7 +770,7 @@ namespace pcr
WinBits nWinBits = WB_BORDER;
// read-only-ness
- _CreateReadOnly |= (sal_Bool)impl_isReadOnlyModel_throw();
+ _CreateReadOnly |= impl_isReadOnlyModel_throw() ? 1 : 0;
if ( _CreateReadOnly )
nWinBits |= WB_READONLY;
@@ -793,11 +793,11 @@ namespace pcr
break;
case PropertyControlType::TextField:
- xControl = new OEditControl( &getPropertyBox(), sal_False, nWinBits | WB_TABSTOP );
+ xControl = new OEditControl( &getPropertyBox(), false, nWinBits | WB_TABSTOP );
break;
case PropertyControlType::CharacterField:
- xControl = new OEditControl( &getPropertyBox(), sal_True, nWinBits | WB_TABSTOP );
+ xControl = new OEditControl( &getPropertyBox(), true, nWinBits | WB_TABSTOP );
break;
case PropertyControlType::NumericField:
@@ -1205,7 +1205,7 @@ namespace pcr
getPropertyBox().DisableUpdate();
- sal_Bool bHaveFocus = getPropertyBox().HasChildPathFocus();
+ bool bHaveFocus = getPropertyBox().HasChildPathFocus();
// create our tab pages
impl_buildCategories_throw();
diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx
index 278840cf9043..8b2fe2c4e9d4 100644
--- a/extensions/source/propctrlr/propcontroller.hxx
+++ b/extensions/source/propctrlr/propcontroller.hxx
@@ -242,7 +242,7 @@ namespace pcr
// stop the inspection
void stopInspection( bool _bCommitModified );
- sal_Bool haveView() const { return NULL != m_pView; }
+ bool haveView() const { return NULL != m_pView; }
OPropertyEditor& getPropertyBox() { return m_pView->getPropertyBox(); }
// does the inspection of the objects as indicated by our model
@@ -287,10 +287,10 @@ namespace pcr
impl_getPropertyValue_throw( const OUString& _rPropertyName );
/// calls XPropertyHandler::suspend for all our property handlers
- sal_Bool suspendPropertyHandlers_nothrow( sal_Bool _bSuspend );
+ bool suspendPropertyHandlers_nothrow( bool _bSuspend );
/// suspends the complete inspector
- sal_Bool suspendAll_nothrow();
+ bool suspendAll_nothrow();
/** selects a page according to our current view data
*/
@@ -311,7 +311,7 @@ namespace pcr
*/
bool impl_findObjectProperty_nothrow( const OUString& _rName, OrderedPropertyMap::const_iterator* _pProperty = NULL );
- sal_Bool Construct(Window* _pParentWin);
+ bool Construct(Window* _pParentWin);
/** retrieves the property handler for a given property name
@param _rPropertyName
diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx
index 5c88462c8d1b..909e91f8ff4c 100644
--- a/extensions/source/propctrlr/propertycomposer.cxx
+++ b/extensions/source/propctrlr/propertycomposer.cxx
@@ -239,7 +239,7 @@ namespace pcr
check != m_aSupportedProperties.end();
)
{
- sal_Bool bIsComposable = isComposable( check->Name );
+ bool bIsComposable = isComposable( check->Name );
if ( !bIsComposable )
{
PropertyBag::iterator next = check; ++next;
diff --git a/extensions/source/propctrlr/sqlcommanddesign.hxx b/extensions/source/propctrlr/sqlcommanddesign.hxx
index 8f3208ac7e88..bfd8ba5e526e 100644
--- a/extensions/source/propctrlr/sqlcommanddesign.hxx
+++ b/extensions/source/propctrlr/sqlcommanddesign.hxx
@@ -195,7 +195,7 @@ namespace pcr
/// retrieves the current SQL command of the component
virtual OUString getSQLCommand() const = 0;
/// retrieves the current value of the EscapeProcessing property of the component
- virtual sal_Bool getEscapeProcessing() const = 0;
+ virtual bool getEscapeProcessing() const = 0;
/// sets a new SQL command
virtual void setSQLCommand( const OUString& _rCommand ) const = 0;
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 4d173740c153..cb8860bca9b0 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -167,7 +167,7 @@ namespace pcr
//= OEditControl
- OEditControl::OEditControl(Window* _pParent, sal_Bool _bPW, WinBits _nWinStyle)
+ OEditControl::OEditControl(Window* _pParent, bool _bPW, WinBits _nWinStyle)
:OEditControl_Base( _bPW ? PropertyControlType::CharacterField : PropertyControlType::TextField, _pParent, _nWinStyle )
{
m_bIsPassword = _bPW;
@@ -1028,7 +1028,7 @@ namespace pcr
,m_pImplEdit( NULL )
,m_pDropdownButton( NULL )
,m_nOperationMode( eStringList )
- ,m_bDropdown( sal_False )
+ ,m_bDropdown( false )
{
SetCompoundControl( true );
@@ -1115,7 +1115,7 @@ namespace pcr
else if ( nKey == KEY_DOWN && aKeyCode.IsMod2() )
{
Invalidate();
- ShowDropDown( sal_True );
+ ShowDropDown( true );
}
else if ( KEYGROUP_CURSOR == aKeyCode.GetGroup()
|| nKey == KEY_HELP
@@ -1139,7 +1139,7 @@ namespace pcr
aSel.Max() = aSel.Min();
}
Invalidate();
- ShowDropDown( sal_True );
+ ShowDropDown( true );
m_pFloatingEdit->getEdit()->GrabFocus();
m_pFloatingEdit->getEdit()->SetSelection( aSel );
Window* pFocusWin = Application::GetFocusWindow();
@@ -1201,7 +1201,7 @@ namespace pcr
#define STD_HEIGHT 100
- sal_Bool DropDownEditControl::ShowDropDown( sal_Bool bShow )
+ bool DropDownEditControl::ShowDropDown( bool bShow )
{
if (bShow)
{
@@ -1216,7 +1216,7 @@ namespace pcr
m_pFloatingEdit->Show();
m_pFloatingEdit->getEdit()->GrabFocus();
m_pFloatingEdit->getEdit()->SetSelection(Selection(m_pFloatingEdit->getEdit()->GetText().getLength()));
- m_bDropdown=sal_True;
+ m_bDropdown = true;
if ( m_nOperationMode == eMultiLineText )
m_pFloatingEdit->getEdit()->SetText( m_pImplEdit->GetText() );
m_pImplEdit->SetText("");
@@ -1234,7 +1234,7 @@ namespace pcr
m_pImplEdit->SetText( sDisplayText );
GetParent()->Invalidate( INVALIDATE_CHILDREN );
- m_bDropdown = sal_False;
+ m_bDropdown = false;
m_pImplEdit->GrabFocus();
}
return m_bDropdown;
@@ -1304,7 +1304,7 @@ namespace pcr
OUString aStr = m_pFloatingEdit->getEdit()->GetText();
OUString aStr2 = GetText();
- ShowDropDown(sal_False);
+ ShowDropDown(false);
if (aStr!=aStr2 || ( m_nOperationMode == eStringList ) )
{
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index 833240c8b39f..1cf13284a28f 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -130,10 +130,10 @@ namespace pcr
class OEditControl : public OEditControl_Base
{
protected:
- sal_Bool m_bIsPassword : 1;
+ bool m_bIsPassword : 1;
public:
- OEditControl( Window* _pParent, sal_Bool _bPassWord, WinBits nWinStyle );
+ OEditControl( Window* _pParent, bool _bPassWord, WinBits nWinStyle );
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -378,7 +378,7 @@ namespace pcr
MultiLineEdit* m_pImplEdit;
PushButton* m_pDropdownButton;
MultiLineOperationMode m_nOperationMode;
- sal_Bool m_bDropdown : 1;
+ bool m_bDropdown : 1;
public:
DropDownEditControl( Window* _pParent, WinBits _nStyle );
@@ -409,7 +409,7 @@ namespace pcr
DECL_LINK( ReturnHdl, OMultilineFloatingEdit* );
DECL_LINK( DropDownHdl, PushButton* );
- sal_Bool ShowDropDown( sal_Bool bShow );
+ bool ShowDropDown( bool bShow );
};
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index f476f2ccb4d8..be9caab8bd3a 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -210,7 +210,7 @@ namespace pcr
void OFormattedNumericControl::SetFormatDescription(const FormatDescription& rDesc)
{
- sal_Bool bFallback = sal_True;
+ bool bFallback = true;
if (rDesc.pSupplier)
{
@@ -243,7 +243,7 @@ namespace pcr
m_nLastDecimalDigits = 0;
break;
}
- bFallback = sal_False;
+ bFallback = false;
}
}
diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx
index f8c721d65959..a5a9f23c9aba 100644
--- a/extensions/source/propctrlr/usercontrol.hxx
+++ b/extensions/source/propctrlr/usercontrol.hxx
@@ -114,8 +114,8 @@ namespace pcr
// make some FormattedField methods available
void SetDecimalDigits(sal_uInt16 nPrecision) { getTypedControlWindow()->SetDecimalDigits(nPrecision); m_nLastDecimalDigits = nPrecision; }
void SetDefaultValue(double dDef) { getTypedControlWindow()->SetDefaultValue(dDef); }
- void EnableEmptyField(sal_Bool bEnable) { getTypedControlWindow()->EnableEmptyField(bEnable); }
- void SetThousandsSep(sal_Bool bEnable) { getTypedControlWindow()->SetThousandsSep(bEnable); }
+ void EnableEmptyField(bool bEnable) { getTypedControlWindow()->EnableEmptyField(bEnable); }
+ void SetThousandsSep(bool bEnable) { getTypedControlWindow()->SetThousandsSep(bEnable); }
protected:
virtual ~OFormattedNumericControl();