diff options
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 14 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 6 | ||||
-rw-r--r-- | svx/source/inc/gridcell.hxx | 3 |
3 files changed, 13 insertions, 10 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index f7516e85afb5..8ecaf4f733d0 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -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; diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index dd5b477b4321..0673bfe998d3 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -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 >( diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 00d602ab1d95..5d23f1934a58 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -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: |