Kaydet (Commit) 86bdb137 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

fdo#67615 TextField in table should use same formatting as floating TextField

Change-Id: Ia6333d12f9f1ecdd5a552089f0df8703c5fce88a
Reviewed-on: https://gerrit.libreoffice.org/11196Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
Tested-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst e9cb48ff
......@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
comphelper \
cppuhelper \
cppu \
dbtools \
drawinglayer \
editeng \
fwe \
......
......@@ -1071,7 +1071,6 @@ DbTextField::DbTextField(DbGridColumn& _rColumn)
:DbLimitedLengthField(_rColumn)
,m_pEdit( NULL )
,m_pPainterImplementation( NULL )
,m_nKeyType(::com::sun::star::util::NumberFormat::TEXT)
,m_bIsSimpleEdit( true )
{
}
......@@ -1148,9 +1147,6 @@ void DbTextField::Init( Window& rParent, const Reference< XRowSet >& xCursor)
implAdjustGenericFieldSetting( xModel );
if (m_rColumn.GetParent().getNumberFormatter().is() && m_rColumn.GetKey())
m_nKeyType = comphelper::getNumberFormatType(m_rColumn.GetParent().getNumberFormatter()->getNumberFormatsSupplier()->getNumberFormats(), m_rColumn.GetKey());
DbLimitedLengthField::Init( rParent, xCursor );
}
......@@ -1172,18 +1168,10 @@ void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect
OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
{
OUString aString;
if ( _rxField.is() )
try
{
aString = getFormattedValue( _rxField, xFormatter, m_rColumn.GetParent().getNullDate(), m_rColumn.GetKey(), m_nKeyType);
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
::dbtools::FormattedColumnValue fmter( xFormatter, xPS );
return aString;
return fmter.getFormattedValue();
}
......
......@@ -390,7 +390,6 @@ class DbTextField : public DbLimitedLengthField
{
::svt::IEditImplementation* m_pEdit;
::svt::IEditImplementation* m_pPainterImplementation;
sal_Int16 m_nKeyType;
bool m_bIsSimpleEdit;
protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment