remove ::svxform::OStaticDataAccessTools from DbCellControl
Change-Id: Icd93a418fad8c9f05b49fcd412a1e2ba4b9c240b
This commit is contained in:
parent
d6d458671f
commit
ded97cfe65
3 changed files with 13 additions and 10 deletions
|
@ -63,6 +63,7 @@
|
|||
#include <tools/diagnose_ex.h>
|
||||
#include <vcl/longcurr.hxx>
|
||||
#include <vcl/settings.hxx>
|
||||
#include <connectivity/dbtools.hxx>
|
||||
#include <connectivity/dbconversion.hxx>
|
||||
|
||||
#include <math.h>
|
||||
|
@ -81,6 +82,7 @@ using namespace ::com::sun::star::sdb;
|
|||
using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::form;
|
||||
using namespace ::dbtools::DBTypeConversion;
|
||||
using namespace ::dbtools;
|
||||
|
||||
using ::com::sun::star::util::XNumberFormatter;
|
||||
namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
|
||||
|
@ -1171,7 +1173,7 @@ void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect
|
|||
OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
|
||||
{
|
||||
const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
|
||||
::dbtools::FormattedColumnValue fmter( xFormatter, xPS );
|
||||
FormattedColumnValue fmter( xFormatter, xPS );
|
||||
|
||||
return fmter.getFormattedValue();
|
||||
}
|
||||
|
@ -1324,7 +1326,7 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
|
|||
Reference< XRowSet > xCursorForm(xCursor, UNO_QUERY);
|
||||
if (xCursorForm.is())
|
||||
{ // wenn wir vom Cursor den Formatter nehmen, dann auch den Key vom Feld, an das wir gebunden sind
|
||||
m_xSupplier = getNumberFormats(getRowSetConnection(xCursorForm), false);
|
||||
m_xSupplier = getNumberFormats(getConnection(xCursorForm), false);
|
||||
|
||||
if (m_rColumn.GetField().is())
|
||||
nFormatKey = ::comphelper::getINT32(m_rColumn.GetField()->getPropertyValue(FM_PROP_FORMATKEY));
|
||||
|
@ -1795,7 +1797,7 @@ OUString DbPatternField::impl_formatText( const OUString& _rText )
|
|||
OUString DbPatternField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
|
||||
{
|
||||
bool bIsForPaint = _rxField != m_rColumn.GetField();
|
||||
::std::unique_ptr< ::dbtools::FormattedColumnValue >& rpFormatter = bIsForPaint ? m_pPaintFormatter : m_pValueFormatter;
|
||||
::std::unique_ptr< FormattedColumnValue >& rpFormatter = bIsForPaint ? m_pPaintFormatter : m_pValueFormatter;
|
||||
|
||||
if ( !rpFormatter.get() )
|
||||
{
|
||||
|
@ -1918,7 +1920,7 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe
|
|||
if ( m_rColumn.GetParent().getDataSource() )
|
||||
xForm = Reference< XRowSet >( ( Reference< XInterface > )*m_rColumn.GetParent().getDataSource(), UNO_QUERY );
|
||||
if ( xForm.is() )
|
||||
xSupplier = getNumberFormats( getRowSetConnection( xForm ), true );
|
||||
xSupplier = getNumberFormats( getConnection( xForm ), true );
|
||||
SvNumberFormatter* pFormatterUsed = NULL;
|
||||
if ( xSupplier.is() )
|
||||
{
|
||||
|
@ -2926,7 +2928,7 @@ bool DbFilterField::commitControl()
|
|||
|
||||
Reference< XRowSet > xDataSourceRowSet(
|
||||
(Reference< XInterface >)*m_rColumn.GetParent().getDataSource(), UNO_QUERY);
|
||||
Reference< XConnection > xConnection(getRowSetConnection(xDataSourceRowSet));
|
||||
Reference< XConnection > xConnection(getConnection(xDataSourceRowSet));
|
||||
|
||||
xParseNode->parseNodeToPredicateStr(aPreparedText,
|
||||
xConnection,
|
||||
|
@ -3019,7 +3021,7 @@ void DbFilterField::Update()
|
|||
Reference< XTablesSupplier > xSupTab;
|
||||
xFormProp->getPropertyValue("SingleSelectQueryComposer") >>= xSupTab;
|
||||
|
||||
Reference< XConnection > xConnection(getRowSetConnection(xForm));
|
||||
Reference< XConnection > xConnection(getConnection(xForm));
|
||||
if (!xSupTab.is())
|
||||
return;
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "svx/dbtoolsclient.hxx"
|
||||
#include "svx/fmtools.hxx"
|
||||
#include <svtools/stringtransfer.hxx>
|
||||
#include <connectivity/dbtools.hxx>
|
||||
#include <connectivity/dbconversion.hxx>
|
||||
|
||||
#include "fmprop.hrc"
|
||||
|
@ -59,6 +60,8 @@
|
|||
#include <cstdlib>
|
||||
#include <map>
|
||||
|
||||
using namespace ::dbtools;
|
||||
using namespace ::dbtools::DBTypeConversion;
|
||||
using namespace ::svxform;
|
||||
using namespace ::svt;
|
||||
using namespace ::com::sun::star::beans;
|
||||
|
@ -1374,8 +1377,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
|
|||
|
||||
// get a new formatter and data cursor
|
||||
m_xFormatter = NULL;
|
||||
OStaticDataAccessTools aStaticTools;
|
||||
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = aStaticTools.getNumberFormats(aStaticTools.getRowSetConnection(_xCursor), true);
|
||||
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = getNumberFormats(getConnection(_xCursor), true);
|
||||
if (xSupplier.is())
|
||||
{
|
||||
m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(
|
||||
|
|
|
@ -197,8 +197,7 @@ private:
|
|||
// benoetigt
|
||||
|
||||
class DbCellControl
|
||||
:public ::svxform::OStaticDataAccessTools
|
||||
,public FmMutexHelper // _before_ the listener, so the listener is to be destroyed first!
|
||||
:public FmMutexHelper // _before_ the listener, so the listener is to be destroyed first!
|
||||
,public ::comphelper::OPropertyChangeListener
|
||||
{
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue