diff options
author | Brij Mohan Lal Srivastava <contactbrijmohan@gmail.com> | 2014-11-12 14:24:10 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-14 09:20:38 +0100 |
commit | d32be3ace8c8fd430bbecdf69f88a116b0ee91d1 (patch) | |
tree | b373c084cb124434e0498867b24bc7bb333155dd /forms/source | |
parent | f5e86ebc097f0f8bc5b282511149cb026710ecde (diff) |
fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.
Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/component/Button.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/ComboBox.cxx | 6 | ||||
-rw-r--r-- | forms/source/component/File.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/Hidden.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/ImageButton.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/ImageControl.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/imgprod.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/datatypes.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/mip.cxx | 6 |
9 files changed, 16 insertions, 16 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 4c6adca2a7db..2bb0ea6b8187 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -212,8 +212,8 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw default: OSL_FAIL("OButtonModel::read : unknown version !"); m_eButtonType = FormButtonType_PUSH; - m_sTargetURL = OUString(); - m_sTargetFrame = OUString(); + m_sTargetURL.clear(); + m_sTargetFrame.clear(); break; } } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 8e3bfff3861d..76bc4cfee15b 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -387,9 +387,9 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>& if (nVersion > 0x0006) { OSL_FAIL("OComboBoxModel::read : invalid (means unknown) version !"); - m_aListSource = OUString(); + m_aListSource.clear(); m_aBoundColumn <<= (sal_Int16)0; - m_aDefaultText = OUString(); + m_aDefaultText.clear(); m_eListSourceType = ListSourceType_TABLE; m_bEmptyIsNull = true; defaultCommonProperties(); @@ -407,7 +407,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>& } else // nVersion == 4 { - m_aListSource = OUString(); + m_aListSource.clear(); StringSequence aListSource; _rxInStream >> aListSource; const OUString* pToken = aListSource.getConstArray(); diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx index 5274b1cf35d8..34e437e0c57c 100644 --- a/forms/source/component/File.cxx +++ b/forms/source/component/File.cxx @@ -232,7 +232,7 @@ void OFileControlModel::read(const Reference<css::io::XObjectInputStream>& _rxIn break; default: OSL_FAIL("OFileControlModel::read : unknown version !"); - m_sDefaultValue = OUString(); + m_sDefaultValue.clear(); } // Display default values after read diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index deb58cef4646..5b8437084210 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -164,7 +164,7 @@ void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStrea { case 1 : { OUString sDummy; _rxInStream >> sDummy; _rxInStream >> m_sHiddenValue; } break; case 2 : _rxInStream >> m_sHiddenValue; break; - default : OSL_FAIL("OHiddenModel::read : unknown version !"); m_sHiddenValue = OUString(); + default : OSL_FAIL("OHiddenModel::read : unknown version !"); m_sHiddenValue.clear(); } OControlModel::read(_rxInStream); } diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx index 1802437dfae0..936c69194f7e 100644 --- a/forms/source/component/ImageButton.cxx +++ b/forms/source/component/ImageButton.cxx @@ -138,8 +138,8 @@ void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) t default : OSL_FAIL("OImageButtonModel::read : unknown version !"); m_eButtonType = FormButtonType_PUSH; - m_sTargetURL = OUString(); - m_sTargetFrame = OUString(); + m_sTargetURL.clear(); + m_sTargetFrame.clear(); break; } } diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 22d2c5aedf4d..f94b32e4cabf 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -550,7 +550,7 @@ void OImageControlModel::onDisconnectedDbColumn() { OBoundControlModel::onDisconnectedDbColumn(); - m_sDocumentURL = OUString(); + m_sDocumentURL.clear(); } diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index b692155d0026..948e8c8220d3 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -244,7 +244,7 @@ void ImageProducer::SetImage( const OUString& rPath ) void ImageProducer::SetImage( SvStream& rStm ) { - maURL = OUString(); + maURL.clear(); mpGraphic->Clear(); mbConsInit = false; @@ -256,7 +256,7 @@ void ImageProducer::SetImage( SvStream& rStm ) void ImageProducer::setImage( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > & rInputStmRef ) { - maURL = OUString(); + maURL.clear(); mpGraphic->Clear(); mbConsInit = false; delete mpStm; diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 84d9eb9dabf7..69d58fad40b7 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -521,7 +521,7 @@ namespace xforms if ( !OStringType_Base::checkPropertySanity( _nHandle, _rNewValue, _rErrorMessage ) ) return false; - _rErrorMessage = OUString(); + _rErrorMessage.clear(); switch ( _nHandle ) { case PROPERTY_ID_XSD_LENGTH: diff --git a/forms/source/xforms/mip.cxx b/forms/source/xforms/mip.cxx index 838d4033cbfc..f37b99156a93 100644 --- a/forms/source/xforms/mip.cxx +++ b/forms/source/xforms/mip.cxx @@ -87,8 +87,8 @@ void MIP::resetRequired() { mbHasRequired = false; mbRequired = false; } void MIP::setRelevant( bool b ) { mbHasRelevant = true; mbRelevant = b; } void MIP::resetRelevant() { mbHasRelevant = false; mbRelevant = true; } -void MIP::setConstraint( bool b ) { mbHasConstraint = true; mbConstraint = b; msConstraintExplanation = OUString(); } -void MIP::resetConstraint() { mbHasConstraint = false; mbConstraint = true; msConstraintExplanation = OUString(); } +void MIP::setConstraint( bool b ) { mbHasConstraint = true; mbConstraint = b; msConstraintExplanation.clear(); } +void MIP::resetConstraint() { mbHasConstraint = false; mbConstraint = true; msConstraintExplanation.clear(); } void MIP::setConstraintExplanation( const OUString& s ) { msConstraintExplanation = s; } @@ -97,7 +97,7 @@ void MIP::setHasCalculate( bool b ) { mbHasCalculate = b; } void MIP::resetCalculate() { mbHasCalculate = false; } void MIP::setTypeName( const OUString& s ) { msTypeName = s; mbHasTypeName = true; } -void MIP::resetTypeName() { msTypeName = OUString(); mbHasTypeName = false; } +void MIP::resetTypeName() { msTypeName.clear(); mbHasTypeName = false; } |