[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - svx/Library_svxcore.mk svx/source
Lionel Elie Mamane
lionel at mamane.lu
Wed Sep 3 03:42:04 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 9a69d111c1f563b5a4f484154d1be36a5a92f3e6
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/11197
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index b1cbc02..ee4322d 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 cf24b35..0863c60 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1083,7 +1083,6 @@ DbTextField::DbTextField(DbGridColumn& _rColumn)
:DbLimitedLengthField(_rColumn)
,m_pEdit( NULL )
,m_pPainterImplementation( NULL )
- ,m_nKeyType(::com::sun::star::util::NumberFormat::TEXT)
,m_bIsSimpleEdit( true )
{
}
@@ -1160,9 +1159,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 );
}
@@ -1184,18 +1180,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 6275c3f..9e86abd 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -393,7 +393,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