From ae8f006018f6cfc79b86f327116f6ceed71692f9 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 23 Nov 2016 09:06:35 +0100 Subject: [PATCH] fix build with MSVC --- src/lib/PowerPoint3Parser.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/lib/PowerPoint3Parser.cxx b/src/lib/PowerPoint3Parser.cxx index 9ecbe1b..51348d6 100644 --- a/src/lib/PowerPoint3Parser.cxx +++ b/src/lib/PowerPoint3Parser.cxx @@ -1076,15 +1076,15 @@ bool PowerPoint3Parser::readDocInfo(MWAWEntry const &entry) f << "],"; for (int i=0; i<4; ++i) dim[i]=int(input->readLong(2)); if (!m_state->m_isMacFile) { - std::swap(dim[0],dim[1]); - std::swap(dim[2],dim[3]); + std::swap(dim[0],dim[1]); + std::swap(dim[2],dim[3]); } MWAWBox2i pageBox(MWAWVec2i(dim[1],dim[0]),MWAWVec2i(dim[3],dim[2])); f << "dim[page]=" << pageBox << ","; for (int i=0; i<4; ++i) dim[i]=int(input->readLong(2)); if (!m_state->m_isMacFile) { - std::swap(dim[0],dim[1]); - std::swap(dim[2],dim[3]); + std::swap(dim[0],dim[1]); + std::swap(dim[2],dim[3]); } MWAWBox2i paperBox=MWAWBox2i(MWAWVec2i(dim[0],dim[1]),MWAWVec2i(dim[2],dim[3])); f << "dim[paper]=" << paperBox << ","; @@ -1673,16 +1673,16 @@ bool PowerPoint3Parser::readSlideFormats(MWAWEntry const &entry, std::vectorreadLong(2)); - if (!isMacFile) std::swap(dim[0],dim[1]); + if (!isMacFile) std::swap(dim[0],dim[1]); f << "dim0=" << MWAWVec2i(dim[1], dim[0]) << ","; format.m_gradientOffset=int(input->readLong(2)); if (format.m_gradientOffset) f << "grad[col,offset]=" << format.m_gradientOffset << ","; for (int j=0; j<2; ++j) dim[j]=int(input->readLong(2)); - if (!isMacFile) std::swap(dim[0],dim[1]); + if (!isMacFile) std::swap(dim[0],dim[1]); format.m_margins=MWAWVec2i(dim[1], dim[0]); f << "box[margins]=" << format.m_margins << ","; for (int j=0; j<2; ++j) dim[j]=int(input->readLong(2)); - if (!isMacFile) std::swap(dim[0],dim[1]); + if (!isMacFile) std::swap(dim[0],dim[1]); format.m_shadowOffset=MWAWVec2i(dim[1], dim[0]); if (format.m_shadowOffset!=MWAWVec2i(0,0)) f << "shadow[offset]=" << format.m_shadowOffset << ","; @@ -1727,15 +1727,15 @@ bool PowerPoint3Parser::readSlidePolygons(MWAWEntry const &entry, std::vectorreadLong(2)); if (!isMacFile) { - std::swap(dim[0],dim[1]); - std::swap(dim[2],dim[3]); + std::swap(dim[0],dim[1]); + std::swap(dim[2],dim[3]); } poly.m_box=MWAWBox2i(MWAWVec2i(dim[1],dim[0]), MWAWVec2i(dim[3],dim[2])); f << "box=" << poly.m_box << ","; f << "pts=["; for (int pt=0; ptreadLong(2)); - if (!isMacFile) std::swap(dim[0],dim[1]); + if (!isMacFile) std::swap(dim[0],dim[1]); poly.m_vertices.push_back(MWAWVec2f(float(dim[1])/8.f, float(dim[0])/8.f)); f << poly.m_vertices.back() << ","; } @@ -1918,8 +1918,8 @@ bool PowerPoint3Parser::readFramesList(MWAWEntry const &entry, PowerPoint3Parser int dim[4]; for (int d=0; d<4; ++d) dim[d]=int(input->readLong(2)); if (!isMacFile) { - std::swap(dim[0],dim[1]); - std::swap(dim[2],dim[3]); + std::swap(dim[0],dim[1]); + std::swap(dim[2],dim[3]); } frame.m_dimension=MWAWBox2i(MWAWVec2i(dim[1],dim[0]), MWAWVec2i(dim[3],dim[2])); f << "dim=" << frame.m_dimension << ","; @@ -2233,8 +2233,8 @@ bool PowerPoint3Parser::readTextZone(MWAWEntry const &entry, PowerPoint3ParserIn int dim[4]; for (int i=0; i<4; ++i) dim[i]=int(input->readLong(2)); if (!isMacFile) { - std::swap(dim[0],dim[1]); - std::swap(dim[2],dim[3]); + std::swap(dim[0],dim[1]); + std::swap(dim[2],dim[3]); } tZone.m_box=MWAWBox2i(MWAWVec2i(dim[1],dim[0]),MWAWVec2i(dim[3],dim[2])); f << "dim=" << tZone.m_box << ","; @@ -3544,7 +3544,7 @@ bool PowerPoint3Parser::sendFrame(PowerPoint3ParserInternal::Frame const &frame, case 3: { float angle[2] = { frame.m_angles[0], frame.m_angles[0]+frame.m_angles[1] }; if (angle[1](angle[0],angle[1]); + std::swap(angle[0],angle[1]); if (angle[1]>360) { int numLoop=int(angle[1]/360)-1; angle[0]-=float(numLoop*360); -- 2.9.3