summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:24:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:26 +0100
commit9e3ced1956b71c4016dd28f7a718157194b30149 (patch)
tree460cf153f2c1af7f877e966b4fd92fb900e82c21 /forms
parent70217974e104ed5fcab415fdf04fd37c0cca3601 (diff)
forms: Use appropriate OUString functions on string constants
Change-Id: I1bcd815663c29025da6b3ce50bdf767eef74fe94
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/Button.cxx6
-rw-r--r--forms/source/component/DatabaseForm.cxx2
-rw-r--r--forms/source/component/Filter.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx6
-rw-r--r--forms/source/component/FormattedField.cxx4
-rw-r--r--forms/source/component/RadioButton.cxx4
-rw-r--r--forms/source/inc/FormComponent.hxx2
-rw-r--r--forms/source/misc/services.cxx2
-rw-r--r--forms/source/richtext/richtextcontrol.cxx14
-rw-r--r--forms/source/richtext/richtextmodel.cxx14
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx28
-rw-r--r--forms/source/solar/control/navtoolbar.cxx2
-rw-r--r--forms/source/xforms/model_ui.cxx2
-rw-r--r--forms/source/xforms/submission/submission_post.cxx2
14 files changed, 45 insertions, 45 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 2bb0ea6b8187..a00f4d250d4e 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -634,13 +634,13 @@ void OButtonControl::modelFeatureUrlPotentiallyChanged( )
void SAL_CALL OButtonControl::propertyChange( const PropertyChangeEvent& _rEvent ) throw ( RuntimeException, std::exception )
{
- if ( _rEvent.PropertyName.equals( PROPERTY_TARGET_URL )
- || _rEvent.PropertyName.equals( PROPERTY_BUTTONTYPE )
+ if ( _rEvent.PropertyName == PROPERTY_TARGET_URL
+ || _rEvent.PropertyName == PROPERTY_BUTTONTYPE
)
{
modelFeatureUrlPotentiallyChanged( );
}
- else if ( _rEvent.PropertyName.equals( PROPERTY_ENABLED ) )
+ else if ( _rEvent.PropertyName == PROPERTY_ENABLED )
{
_rEvent.NewValue >>= m_bEnabledByPropertyValue;
}
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 8090dc05296d..f1b97365785a 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2528,7 +2528,7 @@ void SAL_CALL ODatabaseForm::getGroup( sal_Int32 nGroup, Sequence<Reference<XCon
{
::osl::MutexGuard aGuard(m_aMutex);
_rGroup.realloc(0);
- _rName = "";
+ _rName.clear();
if ((nGroup < 0) || (nGroup >= m_pGroupManager->getGroupCount()))
return;
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 9e1d53e2c6fd..a13b78454f4a 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -643,7 +643,7 @@ namespace frm
OSL_ENSURE( ( itemPos != m_aDisplayItemToValueItem.end() ) || m_aText.isEmpty(),
"OFilterControl::setText: this text is not in my display list!" );
if ( itemPos == m_aDisplayItemToValueItem.end() )
- m_aText = "";
+ m_aText.clear();
if ( m_aText.isEmpty() )
{
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index c6e4a8cb1ead..c152c7a29214 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1799,7 +1799,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt ) throw(RuntimeException, std::exception)
{
// if the DBColumn value changed, transfer it to the control
- if ( evt.PropertyName.equals( PROPERTY_VALUE ) )
+ if ( evt.PropertyName == PROPERTY_VALUE )
{
OSL_ENSURE( evt.Source == getField(), "OBoundControlModel::propertyChange: value changes from components other than our database column?" );
osl::MutexGuard aGuard(m_aMutex);
@@ -1813,12 +1813,12 @@ void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt
// our binding has properties which can control properties of ourself
OUString sBindingControlledProperty;
bool bForwardToLabelControl = false;
- if ( evt.PropertyName.equals( PROPERTY_READONLY ) )
+ if ( evt.PropertyName == PROPERTY_READONLY )
{
sBindingControlledProperty = PROPERTY_READONLY;
}
- else if ( evt.PropertyName.equals( PROPERTY_RELEVANT ) )
+ else if ( evt.PropertyName == PROPERTY_RELEVANT )
{
sBindingControlledProperty = PROPERTY_ENABLED;
bForwardToLabelControl = true;
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 70a9db9dd4c0..1168206f5a77 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -443,7 +443,7 @@ void OFormattedModel::_propertyChanged( const com::sun::star::beans::PropertyCha
if ( evt.Source == m_xAggregateSet )
{
Reference< XPropertySet > xSourceSet( evt.Source, UNO_QUERY );
- if ( evt.PropertyName.equals( PROPERTY_FORMATKEY ) )
+ if ( evt.PropertyName == PROPERTY_FORMATKEY )
{
if ( evt.NewValue.getValueType().getTypeClass() == TypeClass_LONG )
{
@@ -471,7 +471,7 @@ void OFormattedModel::_propertyChanged( const com::sun::star::beans::PropertyCha
}
return;
}
- if ( evt.PropertyName.equals( PROPERTY_FORMATSSUPPLIER ) )
+ if ( evt.PropertyName == PROPERTY_FORMATSSUPPLIER )
{
updateFormatterNullDate();
return;
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 1440eabaa2e0..a07f9ac7ad85 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -351,7 +351,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn
void ORadioButtonModel::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(RuntimeException)
{
- if ( _rEvent.PropertyName.equals( PROPERTY_STATE ) )
+ if ( _rEvent.PropertyName == PROPERTY_STATE )
{
if ( _rEvent.NewValue == (sal_Int16)1 )
{
@@ -361,7 +361,7 @@ void ORadioButtonModel::_propertyChanged(const PropertyChangeEvent& _rEvent) thr
SetSiblingPropsTo( PROPERTY_STATE, aZero );
}
}
- else if ( _rEvent.PropertyName.equals( PROPERTY_GROUP_NAME ) )
+ else if ( _rEvent.PropertyName == PROPERTY_GROUP_NAME )
{
setControlSource();
// Can't call OReferenceValueComponent::_propertyChanged(), as it
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index da1ef253fd96..21ca7fd44e41 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -89,7 +89,7 @@ namespace frm
// old macro for quickly implementing XServiceInfo::getImplementationName
#define IMPLEMENTATION_NAME(ImplName) \
virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
- { return OUString("com.sun.star.comp.forms.") + OUString(#ImplName); }
+ { return OUString("com.sun.star.comp.forms." #ImplName); }
class OControlModel;
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index b275b1ee5c31..d8e5a8e60709 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -60,7 +60,7 @@ void registerClassInfo(
#define REGISTER_CLASS_CORE(classImplName) \
registerClassInfo( \
- OUString("com.sun.star.form.") + OUString(#classImplName), \
+ "com.sun.star.form." #classImplName, \
aServices, \
frm::classImplName##_CreateInstance)
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 58d2f6939af3..90eab6f20304 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -293,7 +293,7 @@ namespace frm
bool ORichTextControl::requiresNewPeer( const OUString& _rPropertyName ) const
{
- return UnoControl::requiresNewPeer( _rPropertyName ) || _rPropertyName.equals( PROPERTY_RICH_TEXT );
+ return UnoControl::requiresNewPeer( _rPropertyName ) || _rPropertyName == PROPERTY_RICH_TEXT;
}
@@ -398,7 +398,7 @@ namespace frm
return;
}
- if ( _rPropertyName.equals( PROPERTY_BACKGROUNDCOLOR ) )
+ if ( _rPropertyName == PROPERTY_BACKGROUNDCOLOR )
{
RichTextControl* pControl = static_cast< RichTextControl* >( GetWindow() );
if ( !_rValue.hasValue() )
@@ -412,19 +412,19 @@ namespace frm
pControl->SetBackgroundColor( Color( nColor ) );
}
}
- else if ( _rPropertyName.equals( PROPERTY_HSCROLL ) )
+ else if ( _rPropertyName == PROPERTY_HSCROLL )
{
adjustTwoStateWinBit( GetWindow(), _rValue, WB_HSCROLL );
}
- else if ( _rPropertyName.equals( PROPERTY_VSCROLL ) )
+ else if ( _rPropertyName == PROPERTY_VSCROLL )
{
adjustTwoStateWinBit( GetWindow(), _rValue, WB_VSCROLL );
}
- else if ( _rPropertyName.equals( PROPERTY_HARDLINEBREAKS ) )
+ else if ( _rPropertyName == PROPERTY_HARDLINEBREAKS )
{
adjustTwoStateWinBit( GetWindow(), _rValue, WB_WORDBREAK, true );
}
- else if ( _rPropertyName.equals( PROPERTY_READONLY ) )
+ else if ( _rPropertyName == PROPERTY_READONLY )
{
RichTextControl* pControl = static_cast< RichTextControl* >( GetWindow() );
bool bReadOnly( pControl->IsReadOnly() );
@@ -440,7 +440,7 @@ namespace frm
aDispatcherLoop->second->invalidate();
}
}
- else if ( _rPropertyName.equals( PROPERTY_HIDEINACTIVESELECTION ) )
+ else if ( _rPropertyName == PROPERTY_HIDEINACTIVESELECTION )
{
RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() );
bool bHide = pRichTextControl->GetHideInactiveSelection();
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 95431f8975f6..6e50704ff07f 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -233,13 +233,13 @@ namespace frm
IMPLEMENT_SERVICE_REGISTRATION_8( ORichTextModel, OControlModel,
FRM_SUN_COMPONENT_RICHTEXTCONTROL,
- OUString( "com.sun.star.text.TextRange" ),
- OUString( "com.sun.star.style.CharacterProperties" ),
- OUString( "com.sun.star.style.ParagraphProperties" ),
- OUString( "com.sun.star.style.CharacterPropertiesAsian" ),
- OUString( "com.sun.star.style.CharacterPropertiesComplex" ),
- OUString( "com.sun.star.style.ParagraphPropertiesAsian" ),
- OUString( "com.sun.star.style.ParagraphPropertiesComplex" )
+ "com.sun.star.text.TextRange",
+ "com.sun.star.style.CharacterProperties",
+ "com.sun.star.style.ParagraphProperties",
+ "com.sun.star.style.CharacterPropertiesAsian",
+ "com.sun.star.style.CharacterPropertiesComplex",
+ "com.sun.star.style.ParagraphPropertiesAsian",
+ "com.sun.star.style.ParagraphPropertiesComplex"
)
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 5f056420a601..8e6b4d4ce7d8 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -307,7 +307,7 @@ namespace frm
// TODO: more generic mechanisms for this (the grid control implementation,
// when used herein, will do the same stuff for lot of these)
- if ( _rPropertyName.equals( PROPERTY_BACKGROUNDCOLOR ) )
+ if ( _rPropertyName == PROPERTY_BACKGROUNDCOLOR )
{
Wallpaper aTest = pNavBar->GetBackground();
if ( bVoid )
@@ -323,7 +323,7 @@ namespace frm
pNavBar->SetControlBackground( aColor );
}
}
- else if ( _rPropertyName.equals( PROPERTY_TEXTLINECOLOR ) )
+ else if ( _rPropertyName == PROPERTY_TEXTLINECOLOR )
{
if ( bVoid )
{
@@ -335,28 +335,28 @@ namespace frm
pNavBar->SetTextLineColor( nColor );
}
}
- else if ( _rPropertyName.equals( PROPERTY_ICONSIZE ) )
+ else if ( _rPropertyName == PROPERTY_ICONSIZE )
{
sal_Int16 nInt16Value = 0;
OSL_VERIFY( _rValue >>= nInt16Value );
pNavBar->SetImageSize( nInt16Value ? NavigationToolBar::eLarge : NavigationToolBar::eSmall );
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_POSITION ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_POSITION )
{
OSL_VERIFY( _rValue >>= bBoolValue );
pNavBar->ShowFunctionGroup( NavigationToolBar::ePosition, bBoolValue );
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_NAVIGATION ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_NAVIGATION )
{
OSL_VERIFY( _rValue >>= bBoolValue );
pNavBar->ShowFunctionGroup( NavigationToolBar::eNavigation, bBoolValue );
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_RECORDACTIONS ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_RECORDACTIONS )
{
OSL_VERIFY( _rValue >>= bBoolValue );
pNavBar->ShowFunctionGroup( NavigationToolBar::eRecordActions, bBoolValue );
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_FILTERSORT ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_FILTERSORT )
{
OSL_VERIFY( _rValue >>= bBoolValue );
pNavBar->ShowFunctionGroup( NavigationToolBar::eFilterSort, bBoolValue );
@@ -375,33 +375,33 @@ namespace frm
Any aReturn;
NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() );
- if ( _rPropertyName.equals( PROPERTY_BACKGROUNDCOLOR ) )
+ if ( _rPropertyName == PROPERTY_BACKGROUNDCOLOR )
{
aReturn <<= (sal_Int32)pNavBar->GetControlBackground().GetColor();
}
- else if ( _rPropertyName.equals( PROPERTY_TEXTLINECOLOR ) )
+ else if ( _rPropertyName == PROPERTY_TEXTLINECOLOR )
{
aReturn <<= (sal_Int32)pNavBar->GetTextLineColor().GetColor();
}
- else if ( _rPropertyName.equals( PROPERTY_ICONSIZE ) )
+ else if ( _rPropertyName == PROPERTY_ICONSIZE )
{
sal_Int16 nIconType = ( NavigationToolBar::eLarge == pNavBar->GetImageSize() )
? 1 : 0;
aReturn <<= nIconType;
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_POSITION ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_POSITION )
{
aReturn <<= pNavBar->IsFunctionGroupVisible( NavigationToolBar::ePosition );
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_NAVIGATION ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_NAVIGATION )
{
aReturn <<= pNavBar->IsFunctionGroupVisible( NavigationToolBar::eNavigation );
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_RECORDACTIONS ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_RECORDACTIONS )
{
aReturn <<= pNavBar->IsFunctionGroupVisible( NavigationToolBar::eRecordActions );
}
- else if ( _rPropertyName.equals( PROPERTY_SHOW_FILTERSORT ) )
+ else if ( _rPropertyName == PROPERTY_SHOW_FILTERSORT )
{
aReturn <<= pNavBar->IsFunctionGroupVisible( NavigationToolBar::eFilterSort );
}
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 587192b48920..3ccbf2eb8457 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -88,7 +88,7 @@ namespace frm
case FormFeature::RemoveFilterAndSort : pAsciiCommandName = "RemoveFilterSort"; break;
}
if ( pAsciiCommandName != NULL )
- return OUString( ".uno:" ) + OUString::createFromAscii( pAsciiCommandName );
+ return ".uno:" + OUString::createFromAscii( pAsciiCommandName );
OSL_FAIL( "lcl_getCommandURL: unknown FormFeature!" );
return OUString();
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index 9c896c3fffeb..37c122efe314 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -1026,7 +1026,7 @@ void xforms::setInstanceData(
#define PROP(NAME) \
if( p##NAME != NULL ) \
{ \
- pSequence[ nIndex ].Name = OUString(#NAME); \
+ pSequence[ nIndex ].Name = #NAME; \
pSequence[ nIndex ].Value <<= *p##NAME; \
nIndex++; \
}
diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx
index cd1cba2fa15e..60cce0dd64f4 100644
--- a/forms/source/xforms/submission/submission_post.cxx
+++ b/forms/source/xforms/submission/submission_post.cxx
@@ -60,7 +60,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const css::uno::Reference<
css::uno::Reference< XActiveDataSink > aSink(new ucbhelper::ActiveDataSink);
aPostArgument.Sink = aSink;
aPostArgument.MediaType = "application/xml";
- aPostArgument.Referer = "";
+ aPostArgument.Referer.clear();
Any aCommandArgument;
aCommandArgument <<= aPostArgument;
aContent.executeCommand( aCommandName, aCommandArgument);