diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2014-09-26 14:18:37 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2014-09-26 15:18:48 +0200 |
commit | d6d458671f1c79be3373271871518caa04ef2208 (patch) | |
tree | bc3a798b03852c883deb3986caaddc4d9e898f08 /svx | |
parent | 827ae65e8577e285b8ad30f4a81af087658e42fa (diff) |
rip out all remaining uses of svxform::OTypeConversionClient and remove it
It just wraps around dbtools, which is linked directly now.
Change-Id: If8d281962018a48a54858421e3490f5032658691
Diffstat (limited to 'svx')
-rw-r--r-- | svx/Library_svxcore.mk | 1 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/form/typeconversionclient.cxx | 44 | ||||
-rw-r--r-- | svx/source/inc/gridcell.hxx | 4 | ||||
-rw-r--r-- | svx/source/inc/typeconversionclient.hxx | 81 |
6 files changed, 5 insertions, 130 deletions
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index fadb007bccf0..24b5788512ef 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -444,7 +444,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\ svx/source/form/sdbdatacolumn \ svx/source/form/sqlparserclient \ svx/source/form/stringlistresource \ - svx/source/form/typeconversionclient \ svx/source/form/typemap \ svx/source/form/xfm_addcondition \ )) diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index dbafe5270166..f7516e85afb5 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/dbconversion.hxx> #include <math.h> #include <stdio.h> @@ -79,6 +80,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::form; +using namespace ::dbtools::DBTypeConversion; using ::com::sun::star::util::XNumberFormatter; namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior; diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 7a8cbabd554c..dd5b477b4321 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/dbconversion.hxx> #include "fmprop.hrc" #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> @@ -874,7 +875,7 @@ DbGridControl::DbGridControl( ,m_pSeekCursor(NULL) ,m_nSeekPos(-1) ,m_nTotalCount(-1) - ,m_aNullDate(OTypeConversionClient().getStandardDate()) + ,m_aNullDate(::dbtools::DBTypeConversion::getStandardDate()) ,m_nMode(DEFAULT_BROWSE_MODE) ,m_nCurrentPos(-1) ,m_nDeleteEvent(0) diff --git a/svx/source/form/typeconversionclient.cxx b/svx/source/form/typeconversionclient.cxx deleted file mode 100644 index 8914d4e140b7..000000000000 --- a/svx/source/form/typeconversionclient.cxx +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "typeconversionclient.hxx" - - -namespace svxform -{ - - OTypeConversionClient::OTypeConversionClient() - { - } - - - bool OTypeConversionClient::ensureLoaded() const - { - if ( !ODbtoolsClient::ensureLoaded() ) - return false; - m_xTypeConversion = getFactory()->getTypeConversionHelper(); - return m_xTypeConversion.is(); - } - - -} // namespace svxform - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 2051498f5854..00d602ab1d95 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -23,7 +23,6 @@ #include <svx/gridctrl.hxx> #include "sqlparserclient.hxx" -#include "typeconversionclient.hxx" #include <com/sun/star/sdb/XColumn.hpp> #include <com/sun/star/form/XBoundControl.hpp> @@ -198,8 +197,7 @@ private: // benoetigt class DbCellControl - :public ::svxform::OTypeConversionClient - ,public ::svxform::OStaticDataAccessTools + :public ::svxform::OStaticDataAccessTools ,public FmMutexHelper // _before_ the listener, so the listener is to be destroyed first! ,public ::comphelper::OPropertyChangeListener { diff --git a/svx/source/inc/typeconversionclient.hxx b/svx/source/inc/typeconversionclient.hxx deleted file mode 100644 index 909d1f825e80..000000000000 --- a/svx/source/inc/typeconversionclient.hxx +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVX_SOURCE_INC_TYPECONVERSIONCLIENT_HXX -#define INCLUDED_SVX_SOURCE_INC_TYPECONVERSIONCLIENT_HXX - -#include "svx/dbtoolsclient.hxx" - - -namespace svxform -{ - - class OTypeConversionClient : public ODbtoolsClient - { - protected: - mutable ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > - m_xTypeConversion; - virtual bool ensureLoaded() const SAL_OVERRIDE; - - public: - OTypeConversionClient(); - - - inline ::com::sun::star::util::Date getStandardDate() const - { - ::com::sun::star::util::Date aReturn; - if ( ensureLoaded() ) - aReturn = m_xTypeConversion->getStandardDate(); - return aReturn; - } - - - inline double getValue( - const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn>& _rxVariant, - const ::com::sun::star::util::Date& _rNullDate ) const - { - double nReturn(0); - if ( ensureLoaded() ) - nReturn = m_xTypeConversion->getValue( _rxVariant, _rNullDate ); - return nReturn; - } - - - inline OUString getFormattedValue( - const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxColumn, - const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, - const ::com::sun::star::util::Date& _rNullDate, - sal_Int32 _nKey, - sal_Int16 _nKeyType) const - { - OUString sReturn; - if ( ensureLoaded() ) - sReturn = m_xTypeConversion->getFormattedValue(_rxColumn, _rxFormatter, _rNullDate, _nKey, _nKeyType); - return sReturn; - } - }; - - -} // namespace svxform - - -#endif // INCLUDED_SVX_SOURCE_INC_TYPECONVERSIONCLIENT_HXX - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |