summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/bibliography/datman.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/ImageControl.cxx1
-rw-r--r--package/source/xstor/owriteablestream.cxx11
4 files changed, 12 insertions, 6 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 00c2d43836de..dafc065a47b8 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -894,12 +894,14 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
sCurrentModelType = C2U("TextField");
break;
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
case DataType::CHAR:
+ case DataType::CLOB:
bFormattedIsNumeric = sal_False;
// _NO_ break !
default:
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 23c05be9f89f..070806e814fb 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2217,7 +2217,7 @@ sal_Bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType)
|| (_nColumnType == DataType::LONGVARBINARY) || (_nColumnType == DataType::OTHER)
|| (_nColumnType == DataType::OBJECT) || (_nColumnType == DataType::DISTINCT)
|| (_nColumnType == DataType::STRUCT) || (_nColumnType == DataType::ARRAY)
- || (_nColumnType == DataType::BLOB) || (_nColumnType == DataType::CLOB)
+ || (_nColumnType == DataType::BLOB) /*|| (_nColumnType == DataType::CLOB)*/
|| (_nColumnType == DataType::REF) || (_nColumnType == DataType::SQLNULL))
return sal_False;
@@ -2553,7 +2553,7 @@ void OBoundControlModel::reset() throw (RuntimeException)
|| ( nFieldType == DataType::LONGVARBINARY )
|| ( nFieldType == DataType::OBJECT )
|| ( nFieldType == DataType::BLOB )
- || ( nFieldType == DataType::CLOB )
+ /*|| ( nFieldType == DataType::CLOB )*/
)
m_xColumn->getBinaryStream();
else
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 5d30c2776659..b15b5641cc4e 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -115,6 +115,7 @@ namespace
|| ( _nFieldType == DataType::OBJECT )
|| ( _nFieldType == DataType::BLOB )
|| ( _nFieldType == DataType::LONGVARCHAR )
+ || ( _nFieldType == DataType::CLOB )
)
return ImageStoreBinary;
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 67e71baf8533..8d540a663098 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -592,18 +592,21 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor
if ( aData.getLength() > nRead )
aData.realloc( nRead );
- if ( nRead && nRead <= MAX_STORCACHE_SIZE )
+ if ( nRead <= MAX_STORCACHE_SIZE )
{
uno::Reference< io::XStream > xCacheStream = CreateMemoryStream( GetServiceFactory() );
OSL_ENSURE( xCacheStream.is(), "If the stream can not be created an exception must be thrown!\n" );
- uno::Reference< io::XOutputStream > xOutStream( xCacheStream->getOutputStream(), uno::UNO_SET_THROW );
- xOutStream->writeBytes( aData );
+ if ( nRead )
+ {
+ uno::Reference< io::XOutputStream > xOutStream( xCacheStream->getOutputStream(), uno::UNO_SET_THROW );
+ xOutStream->writeBytes( aData );
+ }
m_xCacheSeek.set( xCacheStream, uno::UNO_QUERY_THROW );
m_xCacheStream = xCacheStream;
m_xCacheSeek->seek( 0 );
}
- else if ( nRead && !m_aTempURL.getLength() )
+ else if ( !m_aTempURL.getLength() )
{
m_aTempURL = GetNewTempFileURL( GetServiceFactory() );