|
From: <got...@us...> - 2009-01-16 22:48:04
|
Revision: 170
http://scstudio.svn.sourceforge.net/scstudio/?rev=170&view=rev
Author: gotthardp
Date: 2009-01-16 21:39:08 +0000 (Fri, 16 Jan 2009)
Log Message:
-----------
Fixed CRASH when opening a counter example.
TODO: It may be still necessary to use smart pointer for MscElement::m_original.
Removed remaining compiler warnings.
Modified Paths:
--------------
trunk/src/check/order/acyclic_checker.cpp
trunk/src/data/msc.cpp
trunk/src/data/msc.h
trunk/src/view/visio/addon/addon.cpp
trunk/src/view/visio/addon/extract.cpp
trunk/src/view/visio/addon/reportview.cpp
Modified: trunk/src/check/order/acyclic_checker.cpp
===================================================================
--- trunk/src/check/order/acyclic_checker.cpp 2009-01-14 21:28:47 UTC (rev 169)
+++ trunk/src/check/order/acyclic_checker.cpp 2009-01-16 21:39:08 UTC (rev 170)
@@ -52,7 +52,7 @@
{
traverser.traverse(bmsc);
}
- catch(CycleDetectedException& cde)
+ catch(CycleDetectedException&)
{
result = create_counter_example(bmsc,listener.get_path());
traverser.cleanup_traversing_attributes();
Modified: trunk/src/data/msc.cpp
===================================================================
--- trunk/src/data/msc.cpp 2009-01-14 21:28:47 UTC (rev 169)
+++ trunk/src/data/msc.cpp 2009-01-16 21:39:08 UTC (rev 170)
@@ -270,24 +270,14 @@
MscMessage::MscMessage(MscMessage* original):
MscElementTmpl<MscMessage>(original)
{
-}
-
-MscMessage::~MscMessage()
-{
-}
-
-const std::string& MscMessage::get_label() const
-{
- if(get_original())
+ if(original)
{
- return get_original()->get_label();
+ m_label = original->get_label();
}
- return m_label;
}
-void MscMessage::set_label(const std::string& label)
+MscMessage::~MscMessage()
{
- m_label = label;
}
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2009-01-14 21:28:47 UTC (rev 169)
+++ trunk/src/data/msc.h 2009-01-16 21:39:08 UTC (rev 170)
@@ -385,14 +385,16 @@
/**
* Getter for m_label
*/
- void set_label(const std::string label) {
+ void set_label(const std::string label)
+ {
m_label = label;
}
/**
* Setter for m_label
*/
- const std::string& get_label() {
+ const std::string& get_label()
+ {
return m_label;
}
@@ -949,10 +951,6 @@
*/
const std::string& get_label()
{
- if(get_original())
- {
- return get_original()->get_label();
- }
return m_label;
}
@@ -1049,10 +1047,16 @@
virtual ~MscMessage();
- const std::string& get_label() const;
-
- void set_label(const std::string& label);
+ const std::string& get_label() const
+ {
+ return m_label;
+ }
+ void set_label(const std::string& label)
+ {
+ m_label = label;
+ }
+
/**
* Determines if the message is correctly glued to events.
*/
Modified: trunk/src/view/visio/addon/addon.cpp
===================================================================
--- trunk/src/view/visio/addon/addon.cpp 2009-01-14 21:28:47 UTC (rev 169)
+++ trunk/src/view/visio/addon/addon.cpp 2009-01-16 21:39:08 UTC (rev 170)
@@ -41,10 +41,10 @@
CStudioAddon scstudio(_T(ADDON_NAME), IDS_ADDON_NAME);
-const short visEvtPageAdded = Visio::visEvtAdd | Visio::visEvtPage;
-const short visEvtBeforeDocumentClose = Visio::visEvtDel | Visio::visEvtDoc;
-const short visEvtConnectionsAdded = Visio::visEvtAdd | Visio::visEvtConnect;
-const short visEvtConnectionsDeleted = Visio::visEvtDel | Visio::visEvtConnect;
+const unsigned short visEvtPageAdded = Visio::visEvtAdd | Visio::visEvtPage;
+const unsigned short visEvtBeforeDocumentClose = Visio::visEvtDel | Visio::visEvtDoc;
+const unsigned short visEvtConnectionsAdded = Visio::visEvtAdd | Visio::visEvtConnect;
+const unsigned short visEvtConnectionsDeleted = Visio::visEvtDel | Visio::visEvtConnect;
CStudioAddon::CStudioAddon(LPCTSTR pName, UINT uIDLocalName)
: VAddon(VAO_AOATTS_ISACTION | VAO_AOATTS_HASABOUT, VAO_ENABLEALWAYS, 0, 0, pName, uIDLocalName)
@@ -407,7 +407,7 @@
Visio::IVEventPtr vsoDocumentOpenEvent = NULL;
Visio::IVEventListPtr vsoDocumentEventList = vsoDocument->EventList;
- for(int i = 1; i <= vsoDocumentEventList->Count; i++)
+ for(short i = 1; i <= vsoDocumentEventList->Count; i++)
{
Visio::IVEventPtr vsoEvent = vsoDocumentEventList->Item[i];
Modified: trunk/src/view/visio/addon/extract.cpp
===================================================================
--- trunk/src/view/visio/addon/extract.cpp 2009-01-14 21:28:47 UTC (rev 169)
+++ trunk/src/view/visio/addon/extract.cpp 2009-01-16 21:39:08 UTC (rev 170)
@@ -66,7 +66,7 @@
{
// walk though all user-defined cells
// note: rows are numbered starting with 0
- for(int i = 0; i < shape->RowCount[visSectionUser]; i++)
+ for(short i = 0; i < shape->RowCount[visSectionUser]; i++)
{
Visio::IVCellPtr cell = shape->CellsSRC[visSectionUser][visRowUser+i][visUserValue];
if(cell == NULL)
@@ -974,11 +974,9 @@
Visio::IVConnectPtr connect1 = line->Connects->Item[1];
Visio::IVShapePtr shape1 = connect1->ToSheet;
- TShapeType shape1_type = get_shape_type(shape1);
Visio::IVConnectPtr connect2 = line->Connects->Item[2];
Visio::IVShapePtr shape2 = connect2->ToSheet;
- TShapeType shape2_type = get_shape_type(shape2);
// determine to what edges is this connector attached
TConnectedPart dir1 = get_connected_part(connect1);
Modified: trunk/src/view/visio/addon/reportview.cpp
===================================================================
--- trunk/src/view/visio/addon/reportview.cpp 2009-01-14 21:28:47 UTC (rev 169)
+++ trunk/src/view/visio/addon/reportview.cpp 2009-01-16 21:39:08 UTC (rev 170)
@@ -37,7 +37,7 @@
}
static DWORD CALLBACK
-EditStreamCallBack(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
+EditStreamCallBack(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
const char **ppstr = (const char**)dwCookie;
@@ -93,7 +93,7 @@
const char *pstr = sstr.c_str();
- EDITSTREAM es = {(DWORD)&pstr, 0, EditStreamCallBack};
+ EDITSTREAM es = {(DWORD_PTR)&pstr, 0, EditStreamCallBack};
// append RTF to the list
StreamIn(SF_RTF | SFF_SELECTION, es);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|