[Libreoffice-commits] .: 2 commits - binfilter/bf_starmath filter/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Nov 26 03:18:51 PST 2010
binfilter/bf_starmath/source/starmath_node.cxx | 56 ++++++++++++-------------
filter/source/svg/parserfragments.cxx | 26 +++++------
2 files changed, 41 insertions(+), 41 deletions(-)
New commits:
commit 2ca0bca46449f147a1c74a79c8cce4a443e4a169
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 26 09:56:50 2010 +0000
WaE, use spirit::classic headers to avoid deprecated warnings
diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx
index a85de2f..c515e85 100644
--- a/filter/source/svg/parserfragments.cxx
+++ b/filter/source/svg/parserfragments.cxx
@@ -37,8 +37,8 @@
#include <string.h>
#include <limits.h>
#include <boost/bind.hpp>
-#include <boost/spirit.hpp>
-#include <boost/spirit/dynamic/while.hpp>
+#include <boost/spirit/include/classic.hpp>
+#include <boost/spirit/include/classic_while.hpp>
#include <numeric>
#include <algorithm>
@@ -130,7 +130,7 @@ geometry::AffineMatrix2D multiplyMatrix( const geometry::AffineMatrix2D& rLHS,
namespace
{
- struct ColorGrammar : public ::boost::spirit::grammar< ColorGrammar >
+ struct ColorGrammar : public ::boost::spirit::classic::grammar< ColorGrammar >
{
public:
ARGBColor& m_rColor;
@@ -138,10 +138,10 @@ namespace
template< typename ScannerT >
struct definition
{
- ::boost::spirit::rule< ScannerT > colorExpression;
+ ::boost::spirit::classic::rule< ScannerT > colorExpression;
definition( const ColorGrammar& self )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
int_parser<sal_uInt8,10,1,3> byte_p;
colorExpression =
@@ -182,14 +182,14 @@ namespace
>> ')')
);
}
- ::boost::spirit::rule<ScannerT> const& start() const { return colorExpression; }
+ ::boost::spirit::classic::rule<ScannerT> const& start() const { return colorExpression; }
};
};
}
bool parseColor( const char* sColor, ARGBColor& rColor )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
if( parse(sColor,
ColorGrammar(rColor) >> end_p,
@@ -366,7 +366,7 @@ bool parseColor( const char* sColor, ARGBColor& rColor )
bool parseOpacity (const char* sOpacity, ARGBColor& rColor )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
if( parse(sOpacity,
// Begin grammar
@@ -385,7 +385,7 @@ bool parseOpacity (const char* sOpacity, ARGBColor& rColor )
bool parseTransform( const char* sTransform, basegfx::B2DHomMatrix& rTransform )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
double fRefOffsetX(0.0);
double fRefOffsetY(0.0);
@@ -501,7 +501,7 @@ bool parseTransform( const char* sTransform, basegfx::B2DHomMatrix& rTransform )
bool parseViewBox( const char* sViewbox, basegfx::B2DRange& rRect )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
double x=0.0,y=0.0,w=0.0,h=0.0;
@@ -529,7 +529,7 @@ bool parseViewBox( const char* sViewbox, basegfx::B2DRange& rRect )
bool parseDashArray( const char* sDashArray, std::vector<double>& rOutputVector )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
rOutputVector.clear();
return parse(sDashArray,
@@ -555,7 +555,7 @@ bool parsePaintUri( std::pair<const char*,const char*>& o_rPaintUri,
std::pair<ARGBColor,bool>& io_rColor,
const char* sPaintUri )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
const bool bRes = parse(sPaintUri,
// Begin grammar
@@ -587,7 +587,7 @@ void appendChar( std::string& str, char character)
bool parseXlinkHref( const char* sXlinkHref, std::string& data )
{
- using namespace ::boost::spirit;
+ using namespace ::boost::spirit::classic;
data.erase(data.begin(),data.end());
commit 6015cc616f3463db687663e9959c01b89bc0ddc1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 16:54:32 2010 +0000
drop a few warnings
diff --git a/binfilter/bf_starmath/source/starmath_node.cxx b/binfilter/bf_starmath/source/starmath_node.cxx
index 69fe6f8..8e78c4d 100644
--- a/binfilter/bf_starmath/source/starmath_node.cxx
+++ b/binfilter/bf_starmath/source/starmath_node.cxx
@@ -585,8 +585,6 @@ SmNode * SmVisibleNode::GetSubNode(USHORT nIndex)
/*N*/ {
/*N*/ Point rPosition;
/*N*/
-/*N*/ USHORT nWidth = 0;
-/*N*/ USHORT nHeight = 0;
/*N*/ SmNode *pNode;
/*N*/ USHORT nSize = GetNumSubNodes();
/*N*/
@@ -614,7 +612,6 @@ SmNode * SmVisibleNode::GetSubNode(USHORT nIndex)
/*N*/ { if (pNode = GetSubNode(i))
/*N*/ { const SmRect &rNodeRect = pNode->GetRect();
/*N*/ const SmNode *pCoNode = pNode->GetLeftMost();
-/*N*/ SmTokenType eType = pCoNode->GetToken().eType;
/*N*/ RectHorAlign eHorAlign = pCoNode->GetRectHorAlign();
/*N*/
/*N*/ aPos = rNodeRect.AlignTo(*this, RP_BOTTOM,
@@ -1256,6 +1253,7 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat &rForma
/*N*/ switch (eSubSup)
/*?*/ { case CSUB: eSubSup = RSUB; break;
/*?*/ case CSUP: eSubSup = RSUP; break;
+/*N*/ default: break;
/*N*/ }
/*N*/
/*N*/ // prevent sub-/supscripts from diminishing in size
@@ -1576,8 +1574,8 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor
/*N*/ {
/*N*/ long nHeight = GetFont().GetSize().Height();
/*N*/
-/*N*/ SmTokenType eType = GetToken().eType;
-/*N*/ if (eType == TLIM || eType == TLIMINF || eType == TLIMSUP)
+/*N*/ SmTokenType eTmpType = GetToken().eType;
+/*N*/ if (eTmpType == TLIM || eTmpType == TLIMINF || eTmpType == TLIMSUP)
/*N*/ return nHeight;
/*N*/
/*N*/ if (!rFormat.IsTextmode())
@@ -1711,6 +1709,7 @@ void SmAlignNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
/*?*/ case TFIXED: nFnt = FNT_FIXED; break;
/*N*/ case TSANS: nFnt = FNT_SANS; break;
/*?*/ case TSERIF: nFnt = FNT_SERIF; break;
+/*N*/ default: break;
/*N*/ }
/*N*/ if (nFnt != -1)
/*N*/ { GetFont() = rFormat.GetFont(nFnt);
@@ -1782,16 +1781,16 @@ void SmAlignNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
/*N*/ }
-/*N*/ void SmPolyLineNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
+/*N*/ void SmPolyLineNode::AdaptToX(const OutputDevice &rDev, ULONG nNewWidth)
/*N*/ {
-/*N*/ aToSize.Width() = nWidth;
+/*N*/ aToSize.Width() = nNewWidth;
/*N*/ }
-/*N*/ void SmPolyLineNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+/*N*/ void SmPolyLineNode::AdaptToY(const OutputDevice &rDev, ULONG nNewHeight)
/*N*/ {
/*N*/ GetFont().FreezeBorderWidth();
-/*N*/ aToSize.Height() = nHeight;
+/*N*/ aToSize.Height() = nNewHeight;
/*N*/ }
@@ -1956,9 +1955,9 @@ void SmRootSymbolNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/*N*/ aTmpDev.SetFont(GetFont());
/*N*/
/*N*/ // add some borderspace
-/*N*/ ULONG nBorderWidth = GetFont().GetBorderWidth();
-/*N*/ //nWidth += nBorderWidth;
-/*N*/ nHeight += 2 * nBorderWidth;
+/*N*/ ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
+/*N*/ //nWidth += nTmpBorderWidth;
+/*N*/ nHeight += 2 * nTmpBorderWidth;
/*N*/
/*N*/ //! use this method in order to have 'SmRect::HasAlignInfo() == TRUE'
/*N*/ //! and thus having the attribut-fences updated in 'SmRect::ExtendBy'
@@ -1976,14 +1975,14 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
rDev.SetLineColor();
aTmpDev.SetFont(GetFont());
- ULONG nBorderWidth = GetFont().GetBorderWidth();
+ ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
// get rectangle and remove borderspace
Rectangle aTmp (AsRectangle() + rPosition - GetTopLeft());
- aTmp.Left() += nBorderWidth;
- aTmp.Right() -= nBorderWidth;
- aTmp.Top() += nBorderWidth;
- aTmp.Bottom() -= nBorderWidth;
+ aTmp.Left() += nTmpBorderWidth;
+ aTmp.Right() -= nTmpBorderWidth;
+ aTmp.Top() += nTmpBorderWidth;
+ aTmp.Bottom() -= nTmpBorderWidth;
DBG_ASSERT(aTmp.GetHeight() > 0 && aTmp.GetWidth() > 0,
"Sm: leeres Rechteck");
@@ -2118,20 +2117,21 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/*N*/ SmRect aLineRect;
/*N*/ SmRect::operator = (SmRect());
/*N*/ for (i = 0; i < nNumRows; i++)
-/*N*/ { aLineRect = SmRect();
+/*N*/ {
+/*N*/ aLineRect = SmRect();
/*N*/ for (j = 0; j < nNumCols; j++)
-/*N*/ { SmNode *pNode = GetSubNode(i * nNumCols + j);
-/*N*/ DBG_ASSERT(pNode, "Sm: NULL pointer");
+/*N*/ {
+/*N*/ SmNode *pTmpNode = GetSubNode(i * nNumCols + j);
+/*N*/ DBG_ASSERT(pTmpNode, "Sm: NULL pointer");
/*N*/
-/*N*/ const SmRect &rNodeRect = pNode->GetRect();
+/*N*/ const SmRect &rNodeRect = pTmpNode->GetRect();
/*N*/
/*N*/ // align all baselines in that row if possible
/*N*/ aPos = rNodeRect.AlignTo(aLineRect, RP_RIGHT, RHA_CENTER, RVA_BASELINE);
/*N*/ aPos.X() += nHorDist;
/*N*/
/*N*/ // get horizontal alignment
-/*N*/ const SmNode *pCoNode = pNode->GetLeftMost();
-/*N*/ SmTokenType eType = pCoNode->GetToken().eType;
+/*N*/ const SmNode *pCoNode = pTmpNode->GetLeftMost();
/*N*/ RectHorAlign eHorAlign = pCoNode->GetRectHorAlign();
/*N*/
/*N*/ // caculate horizontal position of element depending on column
@@ -2151,7 +2151,7 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/*N*/ break;
/*N*/ }
/*N*/
-/*N*/ pNode->MoveTo(aPos);
+/*N*/ pTmpNode->MoveTo(aPos);
/*N*/ aLineRect.ExtendBy(rNodeRect, RCP_XOR);
/*N*/ }
/*N*/
@@ -2211,8 +2211,8 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/*?*/ aTmpDev.SetFont(GetFont());
/*?*/
/*?*/ // get denominator of error factor for width
-/*?*/ long nBorderWidth = GetFont().GetBorderWidth();
-/*?*/ long nDenom = SmRect(aTmpDev, NULL, GetText(), nBorderWidth).GetItalicWidth();
+/*?*/ long nTmpBorderWidth = GetFont().GetBorderWidth();
+/*?*/ long nDenom = SmRect(aTmpDev, NULL, GetText(), nTmpBorderWidth).GetItalicWidth();
/*?*/
/*?*/ // scale fontwidth with this error factor
/*?*/ aFntSize.Width() *= nWidth;
@@ -2247,8 +2247,8 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/*N*/ aTmpDev.SetFont(GetFont());
/*N*/
/*N*/ // get denominator of error factor for height
-/*N*/ long nBorderWidth = GetFont().GetBorderWidth();
-/*N*/ long nDenom = SmRect(aTmpDev, NULL, GetText(), nBorderWidth).GetHeight();
+/*N*/ long nTmpBorderWidth = GetFont().GetBorderWidth();
+/*N*/ long nDenom = SmRect(aTmpDev, NULL, GetText(), nTmpBorderWidth).GetHeight();
/*N*/
/*N*/ // scale fontwidth with this error factor
/*N*/ aFntSize.Height() *= nHeight;
More information about the Libreoffice-commits
mailing list