Kaydet (Commit) 841e1a6f authored tarafından Noel Grandin's avatar Noel Grandin

remove some old MSVC workarounds

Change-Id: I6abd8aaffb27b3c85df7c0518f7f576be4e32222
Reviewed-on: https://gerrit.libreoffice.org/36660Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 4354f0e9
...@@ -66,7 +66,7 @@ ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) ...@@ -66,7 +66,7 @@ ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec)
// index page // index page
ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent) ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent)
: nRefCount(0) : nRefCount(0)
, bNoDelete(1) , bNoDelete(true)
, nPagePos(nPos) , nPagePos(nPos)
, bModified(false) , bModified(false)
, nCount(0) , nCount(0)
...@@ -110,7 +110,7 @@ void ONDXPage::QueryDelete() ...@@ -110,7 +110,7 @@ void ONDXPage::QueryDelete()
ppNodes[i] = ONDXNode(); ppNodes[i] = ONDXNode();
} }
bNoDelete = 1; bNoDelete = true;
nCount = 0; nCount = 0;
aParent.Clear(); aParent.Clear();
......
...@@ -120,8 +120,7 @@ namespace connectivity ...@@ -120,8 +120,7 @@ namespace connectivity
// work around a clang 3.5 optimization bug: if the bNoDelete is *first* // work around a clang 3.5 optimization bug: if the bNoDelete is *first*
// it mis-compiles "if (--nRefCount == 0)" and never deletes any object // it mis-compiles "if (--nRefCount == 0)" and never deletes any object
unsigned int nRefCount : 31; unsigned int nRefCount : 31;
// the only reason this is not bool is because MSVC cannot handle mixed type bitfields bool bNoDelete : 1;
unsigned int bNoDelete : 1;
sal_uInt32 nPagePos; // Position in the index file sal_uInt32 nPagePos; // Position in the index file
bool bModified : 1; bool bModified : 1;
sal_uInt16 nCount; sal_uInt16 nCount;
...@@ -190,7 +189,7 @@ namespace connectivity ...@@ -190,7 +189,7 @@ namespace connectivity
{ {
assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" ); assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" );
if( bNoDelete ) if( bNoDelete )
bNoDelete = 0; bNoDelete = false;
++nRefCount; ++nRefCount;
} }
......
...@@ -43,18 +43,18 @@ Sequence< sal_Int8 > SAL_CALL OFormsCollection::getImplementationId( ) ...@@ -43,18 +43,18 @@ Sequence< sal_Int8 > SAL_CALL OFormsCollection::getImplementationId( )
Sequence<Type> SAL_CALL OFormsCollection::getTypes() 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) OFormsCollection::OFormsCollection(const Reference<XComponentContext>& _rxFactory)
:FormsCollectionComponentBase( m_aMutex ) : ::cppu::OComponentHelper( m_aMutex )
,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XForm>::get() ) ,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XForm>::get() )
,OFormsCollection_BASE() ,OFormsCollection_BASE()
{ {
} }
OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource ) OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource )
:FormsCollectionComponentBase( m_aMutex ) : ::cppu::OComponentHelper( m_aMutex )
,OInterfaceContainer( m_aMutex, _cloneSource ) ,OInterfaceContainer( m_aMutex, _cloneSource )
,OFormsCollection_BASE() ,OFormsCollection_BASE()
{ {
...@@ -62,7 +62,7 @@ OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource ) ...@@ -62,7 +62,7 @@ OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource )
OFormsCollection::~OFormsCollection() OFormsCollection::~OFormsCollection()
{ {
if (!FormsCollectionComponentBase::rBHelper.bDisposed) if (!::cppu::OComponentHelper::rBHelper.bDisposed)
{ {
acquire(); acquire();
dispose(); dispose();
...@@ -77,7 +77,7 @@ Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType) ...@@ -77,7 +77,7 @@ Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType)
aReturn = OInterfaceContainer::queryInterface(_rType); aReturn = OInterfaceContainer::queryInterface(_rType);
if (!aReturn.hasValue()) if (!aReturn.hasValue())
aReturn = FormsCollectionComponentBase::queryAggregation(_rType); aReturn = ::cppu::OComponentHelper::queryAggregation(_rType);
} }
return aReturn; return aReturn;
...@@ -121,7 +121,7 @@ void OFormsCollection::disposing() ...@@ -121,7 +121,7 @@ void OFormsCollection::disposing()
SAL_INFO( "forms.component", "forms::OFormsCollection::disposing" ); SAL_INFO( "forms.component", "forms::OFormsCollection::disposing" );
OInterfaceContainer::disposing(); OInterfaceContainer::disposing();
} }
FormsCollectionComponentBase::disposing(); ::cppu::OComponentHelper::disposing();
m_xParent = nullptr; m_xParent = nullptr;
} }
......
...@@ -35,13 +35,10 @@ namespace frm ...@@ -35,13 +35,10 @@ namespace frm
// Implements the UNO Container for Forms and contains all assigned Forms. // Implements the UNO Container for Forms and contains all assigned Forms.
// It can either represent the Context for Forms or be passed a Context. // It can either represent the Context for Forms or be passed a Context.
typedef ::cppu::OComponentHelper FormsCollectionComponentBase; typedef ::cppu::ImplHelper2< css::form::XForms
typedef ::cppu::ImplHelper2< css::form::XForms ,css::lang::XServiceInfo > OFormsCollection_BASE;
,css::lang::XServiceInfo > OFormsCollection_BASE;
// else MSVC kills itself on some statements
class OFormsCollection class OFormsCollection
:public FormsCollectionComponentBase :public ::cppu::OComponentHelper
,public OInterfaceContainer ,public OInterfaceContainer
,public OFormsCollection_BASE ,public OFormsCollection_BASE
{ {
...@@ -54,7 +51,7 @@ public: ...@@ -54,7 +51,7 @@ public:
virtual ~OFormsCollection() override; virtual ~OFormsCollection() override;
public: 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; virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override;
...@@ -135,11 +132,11 @@ public: ...@@ -135,11 +132,11 @@ public:
virtual void SAL_CALL removeScriptListener(const css::uno::Reference<css::script::XScriptListener>& p1) override virtual void SAL_CALL removeScriptListener(const css::uno::Reference<css::script::XScriptListener>& p1) override
{ OInterfaceContainer::removeScriptListener(p1); } { OInterfaceContainer::removeScriptListener(p1); }
virtual void SAL_CALL dispose() override 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 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 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 virtual void SAL_CALL addContainerListener(const css::uno::Reference<css::container::XContainerListener>& p1) override
{ OInterfaceContainer::addContainerListener(p1); } { OInterfaceContainer::addContainerListener(p1); }
virtual void SAL_CALL removeContainerListener(const css::uno::Reference<css::container::XContainerListener>& p1) override virtual void SAL_CALL removeContainerListener(const css::uno::Reference<css::container::XContainerListener>& p1) override
......
...@@ -275,9 +275,7 @@ private: ...@@ -275,9 +275,7 @@ private:
}; };
typedef ::cppu::ImplHelper1< css::form::XFormComponent> OFormComponents_BASE; typedef ::cppu::ImplHelper1< css::form::XFormComponent> OFormComponents_BASE;
typedef ::cppu::OComponentHelper FormComponentsBase; class OFormComponents :public ::cppu::OComponentHelper
// else MSVC kills itself on some statements
class OFormComponents :public FormComponentsBase
,public OInterfaceContainer ,public OInterfaceContainer
,public OFormComponents_BASE ,public OFormComponents_BASE
{ {
...@@ -290,7 +288,7 @@ public: ...@@ -290,7 +288,7 @@ public:
OFormComponents( const OFormComponents& _cloneSource ); OFormComponents( const OFormComponents& _cloneSource );
virtual ~OFormComponents() override; 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::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override;
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
......
...@@ -1252,7 +1252,7 @@ Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType) ...@@ -1252,7 +1252,7 @@ Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType)
aReturn = OInterfaceContainer::queryInterface(_rType); aReturn = OInterfaceContainer::queryInterface(_rType);
if (!aReturn.hasValue()) if (!aReturn.hasValue())
aReturn = FormComponentsBase::queryAggregation(_rType); aReturn = ::cppu::OComponentHelper::queryAggregation(_rType);
} }
return aReturn; return aReturn;
...@@ -1261,12 +1261,12 @@ Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType) ...@@ -1261,12 +1261,12 @@ Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType)
Sequence<Type> SAL_CALL OFormComponents::getTypes() 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) OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory)
:FormComponentsBase( m_aMutex ) : ::cppu::OComponentHelper( m_aMutex )
,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XFormComponent>::get() ) ,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XFormComponent>::get() )
,OFormComponents_BASE() ,OFormComponents_BASE()
{ {
...@@ -1274,7 +1274,7 @@ OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory) ...@@ -1274,7 +1274,7 @@ OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory)
OFormComponents::OFormComponents( const OFormComponents& _cloneSource ) OFormComponents::OFormComponents( const OFormComponents& _cloneSource )
:FormComponentsBase( m_aMutex ) : ::cppu::OComponentHelper( m_aMutex )
,OInterfaceContainer( m_aMutex, _cloneSource ) ,OInterfaceContainer( m_aMutex, _cloneSource )
,OFormComponents_BASE() ,OFormComponents_BASE()
{ {
...@@ -1283,7 +1283,7 @@ OFormComponents::OFormComponents( const OFormComponents& _cloneSource ) ...@@ -1283,7 +1283,7 @@ OFormComponents::OFormComponents( const OFormComponents& _cloneSource )
OFormComponents::~OFormComponents() OFormComponents::~OFormComponents()
{ {
if (!FormComponentsBase::rBHelper.bDisposed) if (! ::cppu::OComponentHelper::rBHelper.bDisposed)
{ {
acquire(); acquire();
dispose(); dispose();
...@@ -1295,7 +1295,7 @@ OFormComponents::~OFormComponents() ...@@ -1295,7 +1295,7 @@ OFormComponents::~OFormComponents()
void OFormComponents::disposing() void OFormComponents::disposing()
{ {
OInterfaceContainer::disposing(); OInterfaceContainer::disposing();
FormComponentsBase::disposing(); ::cppu::OComponentHelper::disposing();
m_xParent = nullptr; m_xParent = nullptr;
} }
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#ifndef INCLUDED_FRAMEWORK_INC_XML_ACCELERATORCONFIGURATIONREADER_HXX #ifndef INCLUDED_FRAMEWORK_INC_XML_ACCELERATORCONFIGURATIONREADER_HXX
#define 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 <accelerators/acceleratorcache.hxx>
#include <macros/xinterface.hxx> #include <macros/xinterface.hxx>
#include <general.h> #include <general.h>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp> #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 <xml/imagesconfiguration.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
......
...@@ -59,11 +59,10 @@ public: ...@@ -59,11 +59,10 @@ public:
}; };
MyInterceptor::MyInterceptor() MyInterceptor::MyInterceptor()
: m_nExpected(0), : m_aDisabledCommands {".uno:Bold"},
m_nExpected(0),
m_nUnexpected(0) m_nUnexpected(0)
{ {
// Not part of the initializer list as MSVC 2013 would not handle that.
m_aDisabledCommands = {".uno:Bold"};
} }
int MyInterceptor::getExpected() int MyInterceptor::getExpected()
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <acceleratorconst.h> #include <acceleratorconst.h>
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> #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/KeyModifier.hpp>
#include <com/sun/star/awt/KeyEvent.hpp> #include <com/sun/star/awt/KeyEvent.hpp>
#include <com/sun/star/awt/Key.hpp> #include <com/sun/star/awt/Key.hpp>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <xml/imagesdocumenthandler.hxx> #include <xml/imagesdocumenthandler.hxx>
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/toolbox.hxx> #include <vcl/toolbox.hxx>
......
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <chaptercollator.hxx> #include <chaptercollator.hxx>
#include <com/sun/star/i18n/KCharacterType.hpp> #include <com/sun/star/i18n/KCharacterType.hpp>
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <i18nutil/widthfolding.hxx> #include <i18nutil/widthfolding.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include "widthfolding_data.h" #include "widthfolding_data.h"
......
...@@ -272,13 +272,7 @@ public: ...@@ -272,13 +272,7 @@ public:
virtual bool SetParent( const OUString& ) override; virtual bool SetParent( const OUString& ) override;
protected: 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; virtual ~SfxStyleSheet() override;
}; };
class SVL_DLLPUBLIC SfxStyleSheetPool: public SfxStyleSheetBasePool class SVL_DLLPUBLIC SfxStyleSheetPool: public SfxStyleSheetBasePool
......
...@@ -122,22 +122,21 @@ class TOOLS_DLLPUBLIC SvRefBase ...@@ -122,22 +122,21 @@ class TOOLS_DLLPUBLIC SvRefBase
// work around a clang 3.5 optimization bug: if the bNoDelete is *first* // work around a clang 3.5 optimization bug: if the bNoDelete is *first*
// it mis-compiles "if (--nRefCount == 0)" and never deletes any object // it mis-compiles "if (--nRefCount == 0)" and never deletes any object
unsigned int nRefCount : 31; unsigned int nRefCount : 31;
// the only reason this is not bool is because MSVC cannot handle mixed type bitfields bool bNoDelete : 1;
unsigned int bNoDelete : 1;
protected: protected:
virtual ~SvRefBase(); virtual ~SvRefBase();
public: 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 & ) SvRefBase & operator = ( const SvRefBase & )
{ return *this; } { return *this; }
void RestoreNoDelete() void RestoreNoDelete()
{ bNoDelete = 1; } { bNoDelete = true; }
void AddNextRef() void AddNextRef()
{ {
...@@ -149,7 +148,7 @@ public: ...@@ -149,7 +148,7 @@ public:
{ {
assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" ); assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" );
if( bNoDelete ) if( bNoDelete )
bNoDelete = 0; bNoDelete = false;
++nRefCount; ++nRefCount;
} }
......
...@@ -61,7 +61,6 @@ private: ...@@ -61,7 +61,6 @@ private:
static S f(T1 *, int); static S f(T1 *, int);
struct H { struct H {
H(); // avoid C2514 "class has no constructors" from MSVC 2008
operator T1 * () const; operator T1 * () const;
operator T2 * (); operator T2 * ();
}; };
......
...@@ -17,23 +17,6 @@ ...@@ -17,23 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * 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 "AccessibleDocument.hxx"
#include "AccessibleSpreadsheet.hxx" #include "AccessibleSpreadsheet.hxx"
#include "tabvwsh.hxx" #include "tabvwsh.hxx"
......
...@@ -19,23 +19,6 @@ ...@@ -19,23 +19,6 @@
#include <sal/config.h> #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 "scitems.hxx"
#include <editeng/eeitem.hxx> #include <editeng/eeitem.hxx>
#include <tools/gen.hxx> #include <tools/gen.hxx>
......
...@@ -137,13 +137,7 @@ void SmWordExportBase::HandleUnaryOperation(const SmUnHorNode* pNode, int nLevel ...@@ -137,13 +137,7 @@ void SmWordExportBase::HandleUnaryOperation(const SmUnHorNode* pNode, int nLevel
// update HandleMath() when adding new items // update HandleMath() when adding new items
SAL_INFO("starmath.wordbase", "Unary: " << int(pNode->GetToken().eType)); 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); HandleAllSubNodes(pNode, nLevel);
// break;
// }
} }
void SmWordExportBase::HandleBinaryOperation(const SmBinHorNode* pNode, int nLevel) void SmWordExportBase::HandleBinaryOperation(const SmBinHorNode* pNode, int nLevel)
......
...@@ -1053,18 +1053,10 @@ void SaveTable::CreateNew( SwTable& rTable, bool bCreateFrames, ...@@ -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; for( SwTableLines::const_iterator it = rTable.GetTabLines().begin() + n;
it != rTable.GetTabLines().begin() + nOldLines; ++it ) it != rTable.GetTabLines().begin() + nOldLines; ++it )
delete *it; delete *it;
rTable.GetTabLines().erase( rTable.GetTabLines().begin() + n, rTable.GetTabLines().begin() + nOldLines ); 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 ); aParent.GetTabLines().erase( aParent.GetTabLines().begin(), aParent.GetTabLines().begin() + n );
......
...@@ -2601,12 +2601,11 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) ...@@ -2601,12 +2601,11 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
Get the record for top level object, so we can get the word anchoring Get the record for top level object, so we can get the word anchoring
and wrapping information for it. and wrapping information for it.
*/ */
for (MSDffImportRecords::const_iterator it = aData.begin(); for (auto const & it : aData)
it != aData.end(); ++it) // MSVC2008 wants const_iterator here???
{ {
if ((*it)->pObj == pObject) if (it->pObj == pObject)
{ {
pRecord = it->get(); pRecord = it.get();
break; break;
} }
} }
......
...@@ -327,7 +327,7 @@ sal_uInt16 Date::GetDayOfYear() const ...@@ -327,7 +327,7 @@ sal_uInt16 Date::GetDayOfYear() const
Normalize( nDay, nMonth, nYear); Normalize( nDay, nMonth, nYear);
for( sal_uInt16 i = 1; i < nMonth; i++ ) 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; return nDay;
} }
......
...@@ -349,7 +349,7 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const ...@@ -349,7 +349,7 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const
nK = (sal_uInt16)(0x10000UL - nK); nK = (sal_uInt16)(0x10000UL - nK);
} }
unsigned short& rNum( aTmpA.nNum[j - nLenB + i] ); 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) if (aTmpA.nNum[j - nLenB + i] == 0)
rErg.nNum[j - nLenB] = nQ; rErg.nNum[j - nLenB] = nQ;
else else
......
...@@ -267,8 +267,6 @@ public: ...@@ -267,8 +267,6 @@ public:
, m_bTrueColor(false) , m_bTrueColor(false)
{ {
} }
JPGEmit(const JPGEmit&) = delete; // to keep MSVC2013 happy
JPGEmit(JPGEmit&&); // to keep MSVC2013 happy
}; };
struct GradientEmit struct GradientEmit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment