summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-10-05 09:27:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-10-05 09:27:30 +0100
commitbfcb6fd277a945523cec03d7022cfdc479e6344d (patch)
treefa640ec05e8b0a741e2eda9b077c3aedc449c451 /xmloff
parent3f411f36319d91e1288a8f0d4c9295e7a4b24dc8 (diff)
conversion operator is gone
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/elementimport.cxx23
-rw-r--r--xmloff/source/forms/layerimport.cxx5
-rw-r--r--xmloff/source/forms/propertyexport.cxx9
-rw-r--r--xmloff/source/forms/propertyimport.cxx61
-rw-r--r--xmloff/source/transform/StyleOOoTContext.cxx2
5 files changed, 50 insertions, 50 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 0c58235c8e1d..6fc8d17bef62 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -59,6 +59,7 @@
#include <tools/diagnose_ex.h>
#include <tools/time.hxx>
#include <rtl/logfile.hxx>
+#include <rtl/strbuf.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
@@ -277,9 +278,9 @@ namespace xmloff
)
{
OSL_ENSURE(m_xInfo->hasPropertyByName(aCheck->Name),
- ::rtl::OString("OElementImport::implApplySpecificProperties: read a property (")
- += ::rtl::OString(aCheck->Name.getStr(), aCheck->Name.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString(") which does not exist on the element!"));
+ ::rtl::OStringBuffer("OElementImport::implApplySpecificProperties: read a property (").
+ append(rtl::OUStringToOString(aCheck->Name, RTL_TEXTENCODING_ASCII_US)).
+ append(") which does not exist on the element!").getStr());
}
}
#endif
@@ -339,9 +340,9 @@ namespace xmloff
}
catch(Exception&)
{
- OSL_FAIL(::rtl::OString("OElementImport::implApplySpecificProperties: could not set the property \"")
- += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\"!"));
+ OSL_FAIL(::rtl::OStringBuffer("OElementImport::implApplySpecificProperties: could not set the property \"").
+ append(rtl::OUStringToOString(aPropValues->Name, RTL_TEXTENCODING_ASCII_US)).
+ append("\"!").getStr());
}
}
}
@@ -481,9 +482,9 @@ namespace xmloff
}
catch(Exception&)
{
- OSL_FAIL(::rtl::OString("OElementImport::EndElement: could not set the property \"")
- += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\"!"));
+ OSL_FAIL(::rtl::OStringBuffer("OElementImport::EndElement: could not set the property \"").
+ append(::rtl::OUStringToOString(aPropValues->Name, RTL_TEXTENCODING_ASCII_US)).
+ append("\"!").getStr());
}
}
}
@@ -643,9 +644,7 @@ namespace xmloff
{
Reference< XInterface > xPure = m_rFormImport.getGlobalContext().getServiceFactory()->createInstance(m_sServiceName);
OSL_ENSURE(xPure.is(),
- ::rtl::OString("OElementImport::createElement: service factory gave me no object (service name: ")
- += ::rtl::OString(m_sServiceName.getStr(), m_sServiceName.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString(")!"));
+ ::rtl::OStringBuffer("OElementImport::createElement: service factory gave me no object (service name: ").append(rtl::OUStringToOString(m_sServiceName, RTL_TEXTENCODING_ASCII_US)).append(")!").getStr());
xReturn = Reference< XPropertySet >(xPure, UNO_QUERY);
}
else
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index f1b026256068..734d6fa291b9 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -62,6 +62,7 @@
#include <xmloff/xmltoken.hxx>
#include "xmloff/xmlnmspe.hxx"
#include <rtl/logfile.hxx>
+#include <rtl/strbuf.hxx>
#include <algorithm>
SV_IMPL_REF( SvXMLStylesContext );
@@ -373,9 +374,7 @@ const SvXMLStyleContext* OFormLayerXMLImport_Impl::getStyleElement(const ::rtl::
const SvXMLStyleContext* pControlStyle =
m_pAutoStyles ? m_pAutoStyles->FindStyleChildContext( XML_STYLE_FAMILY_TEXT_PARAGRAPH, _rStyleName ) : NULL;
OSL_ENSURE( pControlStyle || !m_pAutoStyles,
- ::rtl::OString( "OFormLayerXMLImport_Impl::getStyleElement: did not find the style named \"" )
- += ::rtl::OString( _rStyleName.getStr(), _rStyleName.getLength(), RTL_TEXTENCODING_ASCII_US )
- += ::rtl::OString( "\"!" ) );
+ ::rtl::OStringBuffer("OFormLayerXMLImport_Impl::getStyleElement: did not find the style named \"").append(rtl::OUStringToOString(_rStyleName, RTL_TEXTENCODING_ASCII_US)).append("\"!").getStr() );
return pControlStyle;
}
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 28e53e133562..577405723a15 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -37,11 +37,11 @@
#include <xmloff/xmluconv.hxx>
#include <xmloff/families.hxx>
#include <osl/diagnose.h>
+#include <rtl/strbuf.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/DateTime.hpp>
-#include <osl/diagnose.h>
#include <comphelper/extract.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
@@ -705,9 +705,10 @@ namespace xmloff
// the property must exist
if (!m_xPropertyInfo->hasPropertyByName(_rPropertyName))
{
- OSL_FAIL(::rtl::OString("OPropertyExport::dbg_implCheckProperty: no property with the name ") +=
- ::rtl::OString(_rPropertyName.getStr(), _rPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US) +=
- ::rtl::OString("!"));
+ rtl::OStringBuffer aBuf(RTL_CONSTASCII_STRINGPARAM(
+ "OPropertyExport::dbg_implCheckProperty: no property with the name "));
+ aBuf.append(rtl::OUStringToOString(_rPropertyName, RTL_TEXTENCODING_ASCII_US)).append('!');
+ OSL_FAIL(aBuf.getStr());
return;
}
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index daea3d95fcfd..28d6ce7f7bba 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/util/DateTime.hpp>
#include <unotools/datetime.hxx>
#include <rtl/logfile.hxx>
+#include <rtl/strbuf.hxx>
#if OSL_DEBUG_LEVEL > 0
#ifndef _OSL_THREAD_H_
@@ -116,9 +117,9 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun
#endif
_rImporter.GetMM100UnitConverter().convertBool(bValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
- ::rtl::OString("PropertyConversion::convertString: could not convert \"")
- += ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\" into a boolean!"));
+ ::rtl::OStringBuffer("PropertyConversion::convertString: could not convert \"").
+ append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
+ append("\" into a boolean!").getStr());
aReturn = ::cppu::bool2any(_bInvertBoolean ? !bValue : bValue);
}
break;
@@ -132,9 +133,9 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun
#endif
_rImporter.GetMM100UnitConverter().convertNumber(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
- ::rtl::OString("PropertyConversion::convertString: could not convert \"")
- += ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\" into an integer!"));
+ ::rtl::OStringBuffer("PropertyConversion::convertString: could not convert \"").
+ append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
+ append("\" into an integer!").getStr());
if (TypeClass_SHORT == _rExpectedType.getTypeClass())
aReturn <<= (sal_Int16)nValue;
else
@@ -173,9 +174,9 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun
#endif
_rImporter.GetMM100UnitConverter().convertDouble(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
- ::rtl::OString("PropertyConversion::convertString: could not convert \"")
- += ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\" into a double!"));
+ ::rtl::OStringBuffer("PropertyConversion::convertString: could not convert \"").
+ append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
+ append("\" into a double!").getStr());
aReturn <<= (double)nValue;
}
break;
@@ -201,9 +202,9 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun
#endif
_rImporter.GetMM100UnitConverter().convertDouble(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
- ::rtl::OString("PropertyConversion::convertString: could not convert \"")
- += ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\" into a double!"));
+ ::rtl::OStringBuffer("PropertyConversion::convertString: could not convert \"").
+ append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
+ append("\" into a double!").getStr());
// then convert it into the target type
switch (nType)
@@ -296,9 +297,9 @@ SvXMLImportContext* OPropertyImport::CreateChildContext(sal_uInt16 _nPrefix, con
}
else
{
- OSL_FAIL(::rtl::OString("OPropertyImport::CreateChildContext: unknown sub element (only \"properties\" is recognized, but it is ")
- += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString(")!"));
+ OSL_FAIL(::rtl::OStringBuffer("OPropertyImport::CreateChildContext: unknown sub element (only \"properties\" is recognized, but it is ").
+ append(rtl::OUStringToOString(_rLocalName, RTL_TEXTENCODING_ASCII_US)).
+ append(")!").getStr());
return SvXMLImportContext::CreateChildContext(_nPrefix, _rLocalName, _rxAttrList);
}
}
@@ -403,9 +404,9 @@ SvXMLImportContext* OPropertyElementsContext::CreateChildContext(sal_uInt16 _nPr
}
else
{
- OSL_FAIL(::rtl::OString("OPropertyElementsContext::CreateChildContext: unknown child element (\"")
- += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\")!"));
+ OSL_FAIL(::rtl::OStringBuffer("OPropertyElementsContext::CreateChildContext: unknown child element (\"").
+ append(::rtl::OUStringToOString(_rLocalName, RTL_TEXTENCODING_ASCII_US)).
+ append("\")!").getStr());
return new SvXMLImportContext(GetImport(), _nPrefix, _rLocalName);
}
}
@@ -442,9 +443,9 @@ OSinglePropertyContext::OSinglePropertyContext(SvXMLImport& _rImport, sal_uInt16
SvXMLImportContext* OSinglePropertyContext::CreateChildContext(sal_uInt16 _nPrefix, const ::rtl::OUString& _rLocalName,
const Reference< sax::XAttributeList >&)
{
- OSL_FAIL(::rtl::OString("OSinglePropertyContext::CreateChildContext: unknown child element (\"")
- += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\")!"));
+ OSL_FAIL(::rtl::OStringBuffer("OSinglePropertyContext::CreateChildContext: unknown child element (\"").
+ append(::rtl::OUStringToOString(_rLocalName, RTL_TEXTENCODING_ASCII_US)).
+ append("\")!").getStr());
return new SvXMLImportContext(GetImport(), _nPrefix, _rLocalName);
}
@@ -542,9 +543,9 @@ void OListPropertyContext::StartElement( const Reference< sax::XAttributeList >&
}
else
{
- OSL_FAIL( ::rtl::OString( "OListPropertyContext::StartElement: unknown child element (\"")
- += ::rtl::OString( sAttributeName.getStr(), sAttributeName.getLength(), RTL_TEXTENCODING_ASCII_US )
- += ::rtl::OString( "\")!" ) );
+ OSL_FAIL( ::rtl::OStringBuffer( "OListPropertyContext::StartElement: unknown child element (\"").
+ append(rtl::OUStringToOString(sAttributeName, RTL_TEXTENCODING_ASCII_US)).
+ append("\")!").getStr() );
}
}
}
@@ -586,9 +587,9 @@ SvXMLImportContext* OListPropertyContext::CreateChildContext( sal_uInt16 _nPrefi
}
else
{
- OSL_FAIL( ::rtl::OString("OListPropertyContext::CreateChildContext: unknown child element (\"")
- += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US)
- += ::rtl::OString("\")!"));
+ OSL_FAIL( ::rtl::OStringBuffer("OListPropertyContext::CreateChildContext: unknown child element (\"").
+ append(rtl::OUStringToOString(_rLocalName.getStr(), RTL_TEXTENCODING_ASCII_US)).
+ append("\")!").getStr() );
return new SvXMLImportContext( GetImport(), _nPrefix, _rLocalName );
}
}
@@ -626,9 +627,9 @@ void OListValueContext::StartElement( const Reference< sax::XAttributeList >& _r
}
}
- OSL_FAIL( ::rtl::OString( "OListValueContext::StartElement: unknown child element (\"")
- += ::rtl::OString( sAttributeName.getStr(), sAttributeName.getLength(), RTL_TEXTENCODING_ASCII_US )
- += ::rtl::OString( "\")!" ) );
+ OSL_FAIL( ::rtl::OStringBuffer( "OListValueContext::StartElement: unknown child element (\"").
+ append(rtl::OUStringToOString(sAttributeName, RTL_TEXTENCODING_ASCII_US)).
+ append("\")!").getStr() );
}
}
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 88cff6bbf080..a357f2451f85 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -367,7 +367,7 @@ XMLTypedPropertiesOOoTContext_Impl
RTL_TEXTENCODING_ASCII_US );
aTmp += ::rtl::OString::valueOf( '>' );
- OSL_ENSURE( !this, aTmp );
+ OSL_FAIL(aTmp.getStr());
}
#endif