[Libreoffice-commits] core.git: svx/Library_svxcore.mk svx/source
Lionel Elie Mamane
lionel at mamane.lu
Fri Aug 29 12:08:27 PDT 2014
svx/Library_svxcore.mk | 1 +
svx/source/fmcomp/gridcell.cxx | 18 +++---------------
svx/source/inc/gridcell.hxx | 1 -
3 files changed, 4 insertions(+), 16 deletions(-)
New commits:
commit 86bdb13704d9d85a247339071a86d301ce86cd7f
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Aug 29 21:04:26 2014 +0200
fdo#67615 TextField in table should use same formatting as floating TextField
Change-Id: Ia6333d12f9f1ecdd5a552089f0df8703c5fce88a
Reviewed-on: https://gerrit.libreoffice.org/11196
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Lionel Elie Mamane <lionel at mamane.lu>
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 891744d..f66b2a0 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
comphelper \
cppuhelper \
cppu \
+ dbtools \
drawinglayer \
editeng \
fwe \
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index f03604b..4f39140 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -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();
}
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 268fa9b..2fc71c1 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -390,7 +390,6 @@ class DbTextField : public DbLimitedLengthField
{
::svt::IEditImplementation* m_pEdit;
::svt::IEditImplementation* m_pPainterImplementation;
- sal_Int16 m_nKeyType;
bool m_bIsSimpleEdit;
protected:
More information about the Libreoffice-commits
mailing list