Kaydet (Commit) 4b45fdde authored tarafından Armin Le Grand's avatar Armin Le Grand

i122120 WaE corrections, missing definition in sd

üst 4484a62e
...@@ -65,6 +65,8 @@ class Window; ...@@ -65,6 +65,8 @@ class Window;
class SdPage; class SdPage;
class TabPage; class TabPage;
class ViewShell; class ViewShell;
class XColorList;
typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr;
class AbstractCopyDlg : public VclAbstractDialog //add for CopyDlg class AbstractCopyDlg : public VclAbstractDialog //add for CopyDlg
{ {
......
...@@ -159,9 +159,10 @@ long XPropertyList::Count() const ...@@ -159,9 +159,10 @@ long XPropertyList::Count() const
{ {
if( mbListDirty ) if( mbListDirty )
{ {
// ( (XPropertyList*) this )->bListDirty = sal_False; <- im Load() if(!const_cast< XPropertyList* >(this)->Load())
if( !( (XPropertyList*) this )->Load() ) {
( (XPropertyList*) this )->Create(); const_cast< XPropertyList* >(this)->Create();
}
} }
return maContent.size(); return maContent.size();
...@@ -177,11 +178,15 @@ XPropertyEntry* XPropertyList::Get( long nIndex ) const ...@@ -177,11 +178,15 @@ XPropertyEntry* XPropertyList::Get( long nIndex ) const
{ {
if( mbListDirty ) if( mbListDirty )
{ {
if( !( (XPropertyList*) this )->Load() ) if(!const_cast< XPropertyList* >(this)->Load())
( (XPropertyList*) this )->Create(); {
const_cast< XPropertyList* >(this)->Create();
}
} }
if(nIndex >= maContent.size()) const long nObjectCount(maContent.size());
if(nIndex >= nObjectCount)
{ {
return 0; return 0;
} }
...@@ -199,8 +204,10 @@ long XPropertyList::GetIndex(const XubString& rName) const ...@@ -199,8 +204,10 @@ long XPropertyList::GetIndex(const XubString& rName) const
{ {
if( mbListDirty ) if( mbListDirty )
{ {
if( !( (XPropertyList*) this )->Load() ) if(!const_cast< XPropertyList* >(this)->Load())
( (XPropertyList*) this )->Create(); {
const_cast< XPropertyList* >(this)->Create();
}
} }
::std::vector< XPropertyEntry* >::const_iterator aStart(maContent.begin()); ::std::vector< XPropertyEntry* >::const_iterator aStart(maContent.begin());
...@@ -254,7 +261,9 @@ void XPropertyList::Insert( XPropertyEntry* pEntry, long nIndex ) ...@@ -254,7 +261,9 @@ void XPropertyList::Insert( XPropertyEntry* pEntry, long nIndex )
{ {
if(pEntry) if(pEntry)
{ {
if(nIndex >= maContent.size()) const long nObjectCount(maContent.size());
if(nIndex >= nObjectCount)
{ {
maContent.push_back(pEntry); maContent.push_back(pEntry);
} }
...@@ -277,7 +286,9 @@ XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex ) ...@@ -277,7 +286,9 @@ XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex )
if(pEntry) if(pEntry)
{ {
if(nIndex < maContent.size()) const long nObjectCount(maContent.size());
if(nIndex < nObjectCount)
{ {
pRetval = maContent[nIndex]; pRetval = maContent[nIndex];
maContent[nIndex] = pEntry; maContent[nIndex] = pEntry;
...@@ -296,10 +307,11 @@ XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex ) ...@@ -296,10 +307,11 @@ XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex )
XPropertyEntry* XPropertyList::Remove( long nIndex ) XPropertyEntry* XPropertyList::Remove( long nIndex )
{ {
XPropertyEntry* pRetval = 0; XPropertyEntry* pRetval = 0;
const long nObjectCount(maContent.size());
if(nIndex < maContent.size()) if(nIndex < nObjectCount)
{ {
if(nIndex + 1 == maContent.size()) if(nIndex + 1 == nObjectCount)
{ {
pRetval = maContent.back(); pRetval = maContent.back();
maContent.pop_back(); maContent.pop_back();
......
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