diff options
24 files changed, 39 insertions, 111 deletions
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 0130de2905d0..81451234052d 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -66,7 +66,7 @@ ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) // index page ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent) : nRefCount(0) - , bNoDelete(1) + , bNoDelete(true) , nPagePos(nPos) , bModified(false) , nCount(0) @@ -110,7 +110,7 @@ void ONDXPage::QueryDelete() ppNodes[i] = ONDXNode(); } - bNoDelete = 1; + bNoDelete = true; nCount = 0; aParent.Clear(); diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 00c359cbfad6..d1a7c24e3255 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -120,8 +120,7 @@ namespace connectivity // work around a clang 3.5 optimization bug: if the bNoDelete is *first* // it mis-compiles "if (--nRefCount == 0)" and never deletes any object unsigned int nRefCount : 31; - // the only reason this is not bool is because MSVC cannot handle mixed type bitfields - unsigned int bNoDelete : 1; + bool bNoDelete : 1; sal_uInt32 nPagePos; // Position in the index file bool bModified : 1; sal_uInt16 nCount; @@ -190,7 +189,7 @@ namespace connectivity { assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" ); if( bNoDelete ) - bNoDelete = 0; + bNoDelete = false; ++nRefCount; } diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx index b5302709667d..2d427c01ef8c 100644 --- a/forms/source/component/FormsCollection.cxx +++ b/forms/source/component/FormsCollection.cxx @@ -43,18 +43,18 @@ Sequence< sal_Int8 > SAL_CALL OFormsCollection::getImplementationId( ) Sequence<Type> SAL_CALL OFormsCollection::getTypes() { - return concatSequences(OInterfaceContainer::getTypes(), FormsCollectionComponentBase::getTypes(), OFormsCollection_BASE::getTypes()); + return concatSequences(OInterfaceContainer::getTypes(), ::cppu::OComponentHelper::getTypes(), OFormsCollection_BASE::getTypes()); } OFormsCollection::OFormsCollection(const Reference<XComponentContext>& _rxFactory) - :FormsCollectionComponentBase( m_aMutex ) + : ::cppu::OComponentHelper( m_aMutex ) ,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XForm>::get() ) ,OFormsCollection_BASE() { } OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource ) - :FormsCollectionComponentBase( m_aMutex ) + : ::cppu::OComponentHelper( m_aMutex ) ,OInterfaceContainer( m_aMutex, _cloneSource ) ,OFormsCollection_BASE() { @@ -62,7 +62,7 @@ OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource ) OFormsCollection::~OFormsCollection() { - if (!FormsCollectionComponentBase::rBHelper.bDisposed) + if (!::cppu::OComponentHelper::rBHelper.bDisposed) { acquire(); dispose(); @@ -77,7 +77,7 @@ Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType) aReturn = OInterfaceContainer::queryInterface(_rType); if (!aReturn.hasValue()) - aReturn = FormsCollectionComponentBase::queryAggregation(_rType); + aReturn = ::cppu::OComponentHelper::queryAggregation(_rType); } return aReturn; @@ -121,7 +121,7 @@ void OFormsCollection::disposing() SAL_INFO( "forms.component", "forms::OFormsCollection::disposing" ); OInterfaceContainer::disposing(); } - FormsCollectionComponentBase::disposing(); + ::cppu::OComponentHelper::disposing(); m_xParent = nullptr; } diff --git a/forms/source/component/FormsCollection.hxx b/forms/source/component/FormsCollection.hxx index 50e3f51a3864..5493a6c2f5a1 100644 --- a/forms/source/component/FormsCollection.hxx +++ b/forms/source/component/FormsCollection.hxx @@ -35,13 +35,10 @@ namespace frm // Implements the UNO Container for Forms and contains all assigned Forms. // It can either represent the Context for Forms or be passed a Context. -typedef ::cppu::OComponentHelper FormsCollectionComponentBase; -typedef ::cppu::ImplHelper2< css::form::XForms - ,css::lang::XServiceInfo > OFormsCollection_BASE; - -// else MSVC kills itself on some statements +typedef ::cppu::ImplHelper2< css::form::XForms + ,css::lang::XServiceInfo > OFormsCollection_BASE; class OFormsCollection - :public FormsCollectionComponentBase + :public ::cppu::OComponentHelper ,public OInterfaceContainer ,public OFormsCollection_BASE { @@ -54,7 +51,7 @@ public: virtual ~OFormsCollection() override; public: - DECLARE_UNO3_AGG_DEFAULTS(OFormsCollection, FormsCollectionComponentBase) + DECLARE_UNO3_AGG_DEFAULTS(OFormsCollection, ::cppu::OComponentHelper) virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override; @@ -135,11 +132,11 @@ public: virtual void SAL_CALL removeScriptListener(const css::uno::Reference<css::script::XScriptListener>& p1) override { OInterfaceContainer::removeScriptListener(p1); } virtual void SAL_CALL dispose() override - { FormsCollectionComponentBase::dispose(); } + { ::cppu::OComponentHelper::dispose(); } virtual void SAL_CALL addEventListener(const css::uno::Reference<css::lang::XEventListener>& p1) override - { FormsCollectionComponentBase::addEventListener(p1); } + { ::cppu::OComponentHelper::addEventListener(p1); } virtual void SAL_CALL removeEventListener(const css::uno::Reference<css::lang::XEventListener>& p1) override - { FormsCollectionComponentBase::removeEventListener(p1); } + { ::cppu::OComponentHelper::removeEventListener(p1); } virtual void SAL_CALL addContainerListener(const css::uno::Reference<css::container::XContainerListener>& p1) override { OInterfaceContainer::addContainerListener(p1); } virtual void SAL_CALL removeContainerListener(const css::uno::Reference<css::container::XContainerListener>& p1) override diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx index 2b57d987951b..80fb45eec122 100644 --- a/forms/source/inc/InterfaceContainer.hxx +++ b/forms/source/inc/InterfaceContainer.hxx @@ -275,9 +275,7 @@ private: }; typedef ::cppu::ImplHelper1< css::form::XFormComponent> OFormComponents_BASE; -typedef ::cppu::OComponentHelper FormComponentsBase; - // else MSVC kills itself on some statements -class OFormComponents :public FormComponentsBase +class OFormComponents :public ::cppu::OComponentHelper ,public OInterfaceContainer ,public OFormComponents_BASE { @@ -290,7 +288,7 @@ public: OFormComponents( const OFormComponents& _cloneSource ); virtual ~OFormComponents() override; - DECLARE_UNO3_AGG_DEFAULTS(OFormComponents, FormComponentsBase) + DECLARE_UNO3_AGG_DEFAULTS(OFormComponents, ::cppu::OComponentHelper) virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override; virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 492c4b063d5f..efeda375b814 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -1252,7 +1252,7 @@ Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType) aReturn = OInterfaceContainer::queryInterface(_rType); if (!aReturn.hasValue()) - aReturn = FormComponentsBase::queryAggregation(_rType); + aReturn = ::cppu::OComponentHelper::queryAggregation(_rType); } return aReturn; @@ -1261,12 +1261,12 @@ Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType) Sequence<Type> SAL_CALL OFormComponents::getTypes() { - return ::comphelper::concatSequences(OInterfaceContainer::getTypes(), FormComponentsBase::getTypes(), OFormComponents_BASE::getTypes()); + return ::comphelper::concatSequences(OInterfaceContainer::getTypes(), ::cppu::OComponentHelper::getTypes(), OFormComponents_BASE::getTypes()); } OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory) - :FormComponentsBase( m_aMutex ) + : ::cppu::OComponentHelper( m_aMutex ) ,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XFormComponent>::get() ) ,OFormComponents_BASE() { @@ -1274,7 +1274,7 @@ OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory) OFormComponents::OFormComponents( const OFormComponents& _cloneSource ) - :FormComponentsBase( m_aMutex ) + : ::cppu::OComponentHelper( m_aMutex ) ,OInterfaceContainer( m_aMutex, _cloneSource ) ,OFormComponents_BASE() { @@ -1283,7 +1283,7 @@ OFormComponents::OFormComponents( const OFormComponents& _cloneSource ) OFormComponents::~OFormComponents() { - if (!FormComponentsBase::rBHelper.bDisposed) + if (! ::cppu::OComponentHelper::rBHelper.bDisposed) { acquire(); dispose(); @@ -1295,7 +1295,7 @@ OFormComponents::~OFormComponents() void OFormComponents::disposing() { OInterfaceContainer::disposing(); - FormComponentsBase::disposing(); + ::cppu::OComponentHelper::disposing(); m_xParent = nullptr; } diff --git a/framework/inc/xml/acceleratorconfigurationreader.hxx b/framework/inc/xml/acceleratorconfigurationreader.hxx index ae0fb9019451..f5e2cedacad9 100644 --- a/framework/inc/xml/acceleratorconfigurationreader.hxx +++ b/framework/inc/xml/acceleratorconfigurationreader.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_FRAMEWORK_INC_XML_ACCELERATORCONFIGURATIONREADER_HXX #define INCLUDED_FRAMEWORK_INC_XML_ACCELERATORCONFIGURATIONREADER_HXX -#include <xml/saxnamespacefilter.hxx> // HACK: needed for MSVC 2013 ENABLE_LTO build: WeakImplHelper<XDocumentHandler> - #include <accelerators/acceleratorcache.hxx> #include <macros/xinterface.hxx> #include <general.h> diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx index 8fc1636e6dc0..2058a215e2d1 100644 --- a/framework/inc/xml/imagesdocumenthandler.hxx +++ b/framework/inc/xml/imagesdocumenthandler.hxx @@ -24,7 +24,6 @@ #include <com/sun/star/xml/sax/XDocumentHandler.hpp> -#include <xml/saxnamespacefilter.hxx> // HACK: needed for MSVC 2013 ENABLE_LTO build: WeakImplHelper<XDocumentHandler> #include <xml/imagesconfiguration.hxx> #include <rtl/ustring.hxx> #include <cppuhelper/implbase.hxx> diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx index 554581debe55..040313dad31a 100644 --- a/framework/qa/cppunit/dispatchtest.cxx +++ b/framework/qa/cppunit/dispatchtest.cxx @@ -59,11 +59,10 @@ public: }; MyInterceptor::MyInterceptor() - : m_nExpected(0), + : m_aDisabledCommands {".uno:Bold"}, + m_nExpected(0), m_nUnexpected(0) { - // Not part of the initializer list as MSVC 2013 would not handle that. - m_aDisabledCommands = {".uno:Bold"}; } int MyInterceptor::getExpected() diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx index ac0afbc4980f..88213168e24c 100644 --- a/framework/source/xml/acceleratorconfigurationreader.cxx +++ b/framework/source/xml/acceleratorconfigurationreader.cxx @@ -25,6 +25,7 @@ #include <acceleratorconst.h> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> +#include <com/sun/star/xml/sax/SAXException.hpp> #include <com/sun/star/awt/KeyModifier.hpp> #include <com/sun/star/awt/KeyEvent.hpp> #include <com/sun/star/awt/Key.hpp> diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 5a7e002446f9..0389cf1887a8 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -22,6 +22,7 @@ #include <xml/imagesdocumenthandler.hxx> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> +#include <com/sun/star/xml/sax/SAXException.hpp> #include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx index 253404266976..ccb4d9a3370f 100644 --- a/i18npool/source/collator/chaptercollator.cxx +++ b/i18npool/source/collator/chaptercollator.cxx @@ -17,9 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// prevent internal compiler error with MSVC6SP3 -#include <utility> - #include <cppuhelper/supportsservice.hxx> #include <chaptercollator.hxx> #include <com/sun/star/i18n/KCharacterType.hpp> diff --git a/i18nutil/source/utility/widthfolding.cxx b/i18nutil/source/utility/widthfolding.cxx index 8b3e1cb816ef..c98acb4a3e8a 100644 --- a/i18nutil/source/utility/widthfolding.cxx +++ b/i18nutil/source/utility/widthfolding.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// prevent internal compiler error with MSVC6SP3 -#include <utility> #include <i18nutil/widthfolding.hxx> #include <comphelper/string.hxx> #include "widthfolding_data.h" diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 01f402a8cb4c..e0a4181fc198 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -272,13 +272,7 @@ public: virtual bool SetParent( const OUString& ) override; protected: - SfxStyleSheet() // do not use! needed by MSVC at compile time to satisfy ImplInheritanceHelper - : SfxStyleSheetBase("dummy", nullptr, SfxStyleFamily::All, 0) - { - assert(false); - } virtual ~SfxStyleSheet() override; - }; class SVL_DLLPUBLIC SfxStyleSheetPool: public SfxStyleSheetBasePool diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx index bb32d486339e..5116c73bd5b5 100644 --- a/include/tools/ref.hxx +++ b/include/tools/ref.hxx @@ -122,22 +122,21 @@ class TOOLS_DLLPUBLIC SvRefBase // work around a clang 3.5 optimization bug: if the bNoDelete is *first* // it mis-compiles "if (--nRefCount == 0)" and never deletes any object unsigned int nRefCount : 31; - // the only reason this is not bool is because MSVC cannot handle mixed type bitfields - unsigned int bNoDelete : 1; + bool bNoDelete : 1; protected: virtual ~SvRefBase(); public: - SvRefBase() : nRefCount(0), bNoDelete(1) {} + SvRefBase() : nRefCount(0), bNoDelete(true) {} - SvRefBase(const SvRefBase &) : nRefCount(0), bNoDelete(1) {} + SvRefBase(const SvRefBase &) : nRefCount(0), bNoDelete(true) {} SvRefBase & operator = ( const SvRefBase & ) { return *this; } void RestoreNoDelete() - { bNoDelete = 1; } + { bNoDelete = true; } void AddNextRef() { @@ -149,7 +148,7 @@ public: { assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" ); if( bNoDelete ) - bNoDelete = 0; + bNoDelete = false; ++nRefCount; } diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx index 906cd788c2af..2e79b17cf5bb 100644 --- a/include/vcl/vclptr.hxx +++ b/include/vcl/vclptr.hxx @@ -61,7 +61,6 @@ private: static S f(T1 *, int); struct H { - H(); // avoid C2514 "class has no constructors" from MSVC 2008 operator T1 * () const; operator T2 * (); }; diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index f85637dcedcd..a7f379e87eed 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -17,23 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/* Somehow, under same circumstances, MSVC creates object code for 2 - * inlined functions. Nobody here uses them, so simply define them away - * so that there be no dupplicate symbols anymore. - - * The symbols "extents" and "indices" come from boost::multi_array. - */ - -#ifdef indices -#undef indices -#endif -#define indices dummy1_indices - -#ifdef extents -#undef extents -#endif -#define extents dummy1_extents - #include "AccessibleDocument.hxx" #include "AccessibleSpreadsheet.hxx" #include "tabvwsh.hxx" diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index cb71f3d3c534..e8f7a4e3e592 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -19,23 +19,6 @@ #include <sal/config.h> -/* Somehow, under same circumstances, MSVC creates object code for 2 - * inlined functions. Nobody here uses them, so simply define them away - * so that there be no dupplicate symbols anymore. - - * The symbols "extents" and "indices" come from boost::multi_array. - */ - -#ifdef indices -#undef indices -#endif -#define indices dummy2_indices - -#ifdef extents -#undef extents -#endif -#define extents dummy2_extents - #include "scitems.hxx" #include <editeng/eeitem.hxx> #include <tools/gen.hxx> diff --git a/starmath/source/wordexportbase.cxx b/starmath/source/wordexportbase.cxx index 66bec0c2d3fa..cf32d067f364 100644 --- a/starmath/source/wordexportbase.cxx +++ b/starmath/source/wordexportbase.cxx @@ -137,13 +137,7 @@ void SmWordExportBase::HandleUnaryOperation(const SmUnHorNode* pNode, int nLevel // update HandleMath() when adding new items SAL_INFO("starmath.wordbase", "Unary: " << int(pNode->GetToken().eType)); -// Avoid MSVC warning C4065: switch statement contains 'default' but no 'case' labels -// switch( pNode->GetToken().eType ) -// { -// default: HandleAllSubNodes(pNode, nLevel); -// break; -// } } void SmWordExportBase::HandleBinaryOperation(const SmBinHorNode* pNode, int nLevel) diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index b3f1a7a87a3c..7d6c81349aa0 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1053,18 +1053,10 @@ void SaveTable::CreateNew( SwTable& rTable, bool bCreateFrames, } } -#ifdef _MSC_VER -// MSVC 2012 appears very confused and rambles about a declaration of "n" below -#pragma warning (push, 1) -#pragma warning (disable: 4258) -#endif for( SwTableLines::const_iterator it = rTable.GetTabLines().begin() + n; it != rTable.GetTabLines().begin() + nOldLines; ++it ) delete *it; rTable.GetTabLines().erase( rTable.GetTabLines().begin() + n, rTable.GetTabLines().begin() + nOldLines ); -#ifdef _MSC_VER -#pragma warning (pop) -#endif } aParent.GetTabLines().erase( aParent.GetTabLines().begin(), aParent.GetTabLines().begin() + n ); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index e3fbbaf62732..d81ce19773fe 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2601,12 +2601,11 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) Get the record for top level object, so we can get the word anchoring and wrapping information for it. */ - for (MSDffImportRecords::const_iterator it = aData.begin(); - it != aData.end(); ++it) // MSVC2008 wants const_iterator here??? + for (auto const & it : aData) { - if ((*it)->pObj == pObject) + if (it->pObj == pObject) { - pRecord = it->get(); + pRecord = it.get(); break; } } diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index 0245de35c640..05a1e5a1d370 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -327,7 +327,7 @@ sal_uInt16 Date::GetDayOfYear() const Normalize( nDay, nMonth, nYear); for( sal_uInt16 i = 1; i < nMonth; i++ ) - nDay = nDay + ::ImplDaysInMonth( i, nYear ); // += yields a warning on MSVC, so don't use it + nDay += ::ImplDaysInMonth( i, nYear ); return nDay; } diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx index 41b00888d973..bef8de9f7a9e 100644 --- a/tools/source/generic/bigint.cxx +++ b/tools/source/generic/bigint.cxx @@ -349,7 +349,7 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const nK = (sal_uInt16)(0x10000UL - nK); } unsigned short& rNum( aTmpA.nNum[j - nLenB + i] ); - rNum = rNum - nK; // MSVC yields a warning on -= here, so don't use it + rNum -= nK; if (aTmpA.nNum[j - nLenB + i] == 0) rErg.nNum[j - nLenB] = nQ; else diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 4562ac984439..bf57a017be93 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -267,8 +267,6 @@ public: , m_bTrueColor(false) { } - JPGEmit(const JPGEmit&) = delete; // to keep MSVC2013 happy - JPGEmit(JPGEmit&&); // to keep MSVC2013 happy }; struct GradientEmit |