summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-19 15:18:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-19 15:32:00 +0000
commite77819f578b4b01314359380e6f115bacb9967f5 (patch)
tree40788a89be0e5b42b9c212093c2917c61a6fc195 /starmath
parentbfd0e9b7eaa3d24de239647aba7374529dd67572 (diff)
coverity#738849 Uninitialized scalar field
Change-Id: I5374e4427f800c4500818b97bfe6e94b303a8974
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/cursor.hxx22
-rw-r--r--starmath/source/node.cxx10
2 files changed, 17 insertions, 15 deletions
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 8cc88a51213c..b1f6e8b57929 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -75,20 +75,22 @@ class SmDocShell;
*/
class SmCursor{
public:
- SmCursor(SmNode* tree, SmDocShell* pShell){
- //Initialize members
- pTree = tree;
- anchor = NULL;
- position = NULL;
- pGraph = NULL;
- pDocShell = pShell;
- pClipboard = NULL;
- nEditSections = 0;
+ SmCursor(SmNode* tree, SmDocShell* pShell)
+ : anchor(NULL)
+ , position(NULL)
+ , pTree(tree)
+ , pDocShell(pShell)
+ , pGraph(NULL)
+ , pClipboard(NULL)
+ , nEditSections(0)
+ , bIsEnabledSetModifiedSmDocShell(false)
+ {
//Build graph
BuildGraph();
}
- ~SmCursor(){
+ ~SmCursor()
+ {
SetClipboard();
delete pGraph;
pGraph = NULL;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 0e7d6a46e28a..7bc5932b80e9 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2336,13 +2336,14 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
/**************************************************************************/
-SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
- SmVisibleNode(eNodeType, rNodeToken)
+SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP )
+ : SmVisibleNode(eNodeType, rNodeToken)
+ , nFontDesc(nFontDescP)
+ , nSelectionStart(0)
+ , nSelectionEnd(0)
{
- nFontDesc = nFontDescP;
}
-
SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP )
: SmVisibleNode(NTEXT, rNodeToken)
, nFontDesc(nFontDescP)
@@ -2351,7 +2352,6 @@ SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP )
{
}
-
void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
{
SmNode::Prepare(rFormat, rDocShell);