diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-08 11:32:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-23 15:13:37 +0200 |
commit | 3a467fb3ce08a0a1da698629ebcc4d401670c713 (patch) | |
tree | 9ce518f4dd184caeb814274ca5db053f277ed529 | |
parent | 7f46f8c654acd2a53b56859a03ccdc1269105c4b (diff) |
Work around -Werror=unused-local-typedefs from comphelper/stl_types.hxx
Change-Id: Id9f588e551b40a64bc86cae7c6d50f99659f94ab
(cherry picked from commit 3912e47044f753f82c63ac11e803be5fb756c14f)
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlDataSourceSetting.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dsmeta.cxx | 6 | ||||
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 20 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlControlProperty.cxx | 9 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 12 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrol.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/forms/propertyimport.cxx | 5 |
9 files changed, 48 insertions, 37 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 50b9aa322640..235ef594c1b2 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -17,6 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + +#include <map> +#include <utility> + #include <string.h> #include "RowSet.hxx" #include "dbastrings.hrc" @@ -1836,8 +1841,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi sal_Int32 nCount = xMetaData->getColumnCount(); m_aDataColumns.reserve(nCount+1); aColumns->get().reserve(nCount+1); - DECLARE_STL_USTRINGACCESS_MAP(int,StringMap); - StringMap aColumnMap; + std::map< OUString, int > aColumnMap; for (sal_Int32 i = 0 ; i < nCount; ++i) { // retrieve the name of the column @@ -1861,7 +1865,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi aDescription, ::rtl::OUString(), m_aCurrentRow); - aColumnMap.insert(StringMap::value_type(sName,0)); + aColumnMap.insert(std::make_pair(sName,0)); aColumns->get().push_back(pColumn); pColumn->setName(sName); aNames.push_back(sName); diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index c893a50789c1..8e96816f8949 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + +#include <map> + #include "xmlDataSourceSetting.hxx" #include "xmlDataSource.hxx" #include <sax/tools/converter.hxx> @@ -68,8 +72,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport case XML_TOK_DATA_SOURCE_SETTING_TYPE: { // needs to be translated into a ::com::sun::star::uno::Type - DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Type, MapString2Type ); - static MapString2Type s_aTypeNameMap; + static std::map< OUString, css::uno::Type > s_aTypeNameMap; if (!s_aTypeNameMap.size()) { s_aTypeNameMap[GetXMLToken( XML_BOOLEAN)] = ::getBooleanCppuType(); @@ -81,7 +84,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport s_aTypeNameMap[GetXMLToken( XML_VOID)] = ::getVoidCppuType(); } - const ConstMapString2TypeIterator aTypePos = s_aTypeNameMap.find(sValue); + const std::map< OUString, css::uno::Type >::const_iterator aTypePos = s_aTypeNameMap.find(sValue); OSL_ENSURE(s_aTypeNameMap.end() != aTypePos, "OXMLDataSourceSetting::OXMLDataSourceSetting: invalid type!"); if (s_aTypeNameMap.end() != aTypePos) m_aPropType = aTypePos->second; diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 4c7f2e06513c..e83ae1d4df1b 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + +#include <set> #include "indexdialog.hxx" #include "dbu_dlg.hrc" @@ -714,8 +717,7 @@ DBG_NAME(DbaIndexDialog) } // no double fields - DECLARE_STL_STDKEY_SET( String, StringBag ); - StringBag aExistentFields; + std::set< String > aExistentFields; for ( ConstIndexFieldsIterator aFieldCheck = _rPos->aFields.begin(); aFieldCheck != _rPos->aFields.end(); ++aFieldCheck diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index 69adb66b53e2..d590579332a6 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -23,6 +23,7 @@ #include <comphelper/processfactory.hxx> #include <map> +#include <utility> //........................................................................ namespace dbaui @@ -126,8 +127,7 @@ namespace dbaui //-------------------------------------------------------------------- static AuthenticationMode getAuthenticationMode( const ::rtl::OUString& _sURL ) { - DECLARE_STL_USTRINGACCESS_MAP( FeatureSupport, Supported); - static Supported s_aSupport; + static std::map< OUString, FeatureSupport > s_aSupport; if ( s_aSupport.empty() ) { ::connectivity::DriversConfig aDriverConfig(::comphelper::getProcessServiceFactory()); @@ -147,7 +147,7 @@ namespace dbaui else if ( sAuth == "Password" ) aInit = AuthPwd; } - s_aSupport.insert(Supported::value_type(*pIter,aInit)); + s_aSupport.insert(std::make_pair(*pIter,aInit)); } } OSL_ENSURE(s_aSupport.find(_sURL) != s_aSupport.end(),"Illegal URL!"); diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index dcb73bb3260b..1309f1eb51a3 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -17,10 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + +#include <vector> + #include "gridwizard.hxx" #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdbc/DataType.hpp> -#include <comphelper/stl_types.hxx> #include <tools/string.hxx> #include <com/sun/star/form/XGridColumnFactory.hpp> #include <com/sun/star/awt/MouseWheelBehavior.hpp> @@ -107,10 +110,9 @@ namespace dbp static const ::rtl::OUString s_sEmptyString; // collect "descriptors" for the to-be-created (grid)columns - DECLARE_STL_VECTOR( ::rtl::OUString, OUStringArray ); - OUStringArray aColumnServiceNames; // service names to be used with the XGridColumnFactory - OUStringArray aColumnLabelPostfixes; // postfixes to append to the column labels - OUStringArray aFormFieldNames; // data field names + std::vector< OUString > aColumnServiceNames; // service names to be used with the XGridColumnFactory + std::vector< OUString > aColumnLabelPostfixes; // postfixes to append to the column labels + std::vector< OUString > aFormFieldNames; // data field names aColumnServiceNames.reserve(getSettings().aSelectedFields.getLength()); aColumnLabelPostfixes.reserve(getSettings().aSelectedFields.getLength()); @@ -185,10 +187,10 @@ namespace dbp { Reference< XNameAccess > xExistenceChecker(xColumnContainer.get()); - ConstOUStringArrayIterator pColumnServiceName = aColumnServiceNames.begin(); - ConstOUStringArrayIterator pColumnLabelPostfix = aColumnLabelPostfixes.begin(); - ConstOUStringArrayIterator pFormFieldName = aFormFieldNames.begin(); - ConstOUStringArrayIterator pColumnServiceNameEnd = aColumnServiceNames.end(); + std::vector< OUString >::const_iterator pColumnServiceName = aColumnServiceNames.begin(); + std::vector< OUString >::const_iterator pColumnLabelPostfix = aColumnLabelPostfixes.begin(); + std::vector< OUString >::const_iterator pFormFieldName = aFormFieldNames.begin(); + std::vector< OUString >::const_iterator pColumnServiceNameEnd = aColumnServiceNames.end(); for (;pColumnServiceName < pColumnServiceNameEnd; ++pColumnServiceName, ++pColumnLabelPostfix, ++pFormFieldName) { diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index c5929c2a4a97..f3fbc12d5493 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + +#include <map> + #include "xmlControlProperty.hxx" #include <rtl/strbuf.hxx> @@ -80,8 +84,7 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport case XML_TOK_VALUE_TYPE: { // needs to be translated into a ::com::sun::star::uno::Type - DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Type, MapString2Type ); - static MapString2Type s_aTypeNameMap; + static std::map< OUString, css::uno::Type > s_aTypeNameMap; if (!s_aTypeNameMap.size()) { s_aTypeNameMap[GetXMLToken( XML_BOOLEAN)] = ::getBooleanCppuType(); @@ -95,7 +98,7 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport s_aTypeNameMap[GetXMLToken( XML_VOID)] = ::getVoidCppuType(); } - const ConstMapString2TypeIterator aTypePos = s_aTypeNameMap.find(sValue); + const std::map< OUString, css::uno::Type >::const_iterator aTypePos = s_aTypeNameMap.find(sValue); OSL_ENSURE(s_aTypeNameMap.end() != aTypePos, "OXMLControlProperty::OXMLControlProperty: invalid type!"); if (s_aTypeNameMap.end() != aTypePos) m_aPropType = aTypePos->second; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 5d0dab3384c7..18f5cc37dd79 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -81,7 +81,6 @@ #include <comphelper/evtmethodhelper.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/property.hxx> -#include <comphelper/stl_types.hxx> #include <comphelper/string.hxx> #include <connectivity/dbtools.hxx> #include <cppuhelper/servicefactory.hxx> @@ -101,6 +100,7 @@ #include <algorithm> #include <functional> +#include <map> #include <vector> // wird fuer Invalidate verwendet -> mitpflegen @@ -3310,11 +3310,9 @@ void FmXFormShell::CreateExternalView() sal_Int16 nAddedColumns = 0; // for radio buttons we need some special structures - DECLARE_STL_USTRINGACCESS_MAP(Sequence< ::rtl::OUString>, MapUString2UstringSeq); - DECLARE_STL_ITERATORS(MapUString2UstringSeq); - DECLARE_STL_USTRINGACCESS_MAP(::rtl::OUString, FmMapUString2UString); - DECLARE_STL_USTRINGACCESS_MAP(sal_Int16, FmMapUString2Int16); - DECLARE_STL_ITERATORS(FmMapUString2Int16); + typedef std::map< OUString, Sequence< ::rtl::OUString> > MapUString2UstringSeq; + typedef std::map< OUString, OUString > FmMapUString2UString; + typedef std::map< OUString, sal_Int16 > FmMapUString2Int16; MapUString2UstringSeq aRadioValueLists; MapUString2UstringSeq aRadioListSources; @@ -3481,7 +3479,7 @@ void FmXFormShell::CreateExternalView() // properties describing the "direct" column properties const sal_Int16 nListBoxDescription = 6; Sequence< PropertyValue> aListBoxDescription(nListBoxDescription); - for ( ConstFmMapUString2UStringIterator aCtrlSource = aRadioControlSources.begin(); + for ( FmMapUString2UString::const_iterator aCtrlSource = aRadioControlSources.begin(); aCtrlSource != aRadioControlSources.end(); ++aCtrlSource, ++nOffset ) diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 6cefb82b6d85..bcd8641cba54 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -47,6 +47,7 @@ #include <algorithm> #include <set> +#include <vector> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -495,8 +496,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent if( getPeer().is() ) { - DECLARE_STL_VECTOR( PropertyValue, PropertyValueVector); - PropertyValueVector aPeerPropertiesToSet; + std::vector< PropertyValue > aPeerPropertiesToSet; sal_Int32 nIndependentPos = 0; bool bResourceResolverSet( false ); // position where to insert the independent properties into aPeerPropertiesToSet, @@ -675,8 +675,8 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent // setting peer properties may result in an attemp to acquire the solar mutex, 'cause the peers // usually don't have an own mutex but use the SolarMutex instead. // To prevent deadlocks resulting from this, we do this without our own mutex locked - PropertyValueVectorIterator aEnd = aPeerPropertiesToSet.end(); - for ( PropertyValueVectorIterator aLoop = aPeerPropertiesToSet.begin(); + std::vector< PropertyValue >::iterator aEnd = aPeerPropertiesToSet.end(); + for ( std::vector< PropertyValue >::iterator aLoop = aPeerPropertiesToSet.begin(); aLoop != aEnd; ++aLoop ) diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 98c450af2ec8..8bd21c6ecb77 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -247,8 +247,7 @@ Type PropertyConversion::xmlTypeToUnoType( const ::rtl::OUString& _rType ) { Type aUnoType( ::getVoidCppuType() ); - DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Type, MapString2Type ); - static MapString2Type s_aTypeNameMap; + static std::map< OUString, css::uno::Type > s_aTypeNameMap; if ( s_aTypeNameMap.empty() ) { s_aTypeNameMap[ token::GetXMLToken( token::XML_BOOLEAN ) ] = ::getBooleanCppuType(); @@ -257,7 +256,7 @@ Type PropertyConversion::xmlTypeToUnoType( const ::rtl::OUString& _rType ) s_aTypeNameMap[ token::GetXMLToken( token::XML_VOID ) ] = ::getVoidCppuType(); } - const ConstMapString2TypeIterator aTypePos = s_aTypeNameMap.find( _rType ); + const std::map< OUString, css::uno::Type >::iterator aTypePos = s_aTypeNameMap.find( _rType ); OSL_ENSURE( s_aTypeNameMap.end() != aTypePos, "PropertyConversion::xmlTypeToUnoType: invalid property name!" ); if ( s_aTypeNameMap.end() != aTypePos ) aUnoType = aTypePos->second; |