Author: alg
Date: Mon Apr 29 10:00:23 2013
New Revision: 1476949

URL: http://svn.apache.org/r1476949
Log:
i122120 WaE corrections, missing definition in sd

Modified:
    openoffice/trunk/main/sd/inc/sdabstdlg.hxx
    openoffice/trunk/main/svx/source/xoutdev/xtable.cxx

Modified: openoffice/trunk/main/sd/inc/sdabstdlg.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/inc/sdabstdlg.hxx?rev=1476949&r1=1476948&r2=1476949&view=diff
==============================================================================
--- openoffice/trunk/main/sd/inc/sdabstdlg.hxx (original)
+++ openoffice/trunk/main/sd/inc/sdabstdlg.hxx Mon Apr 29 10:00:23 2013
@@ -65,6 +65,8 @@ class Window;
 class SdPage;
 class TabPage;
 class ViewShell;
+class XColorList;
+typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr;
 
 class AbstractCopyDlg : public VclAbstractDialog  //add for CopyDlg
 {

Modified: openoffice/trunk/main/svx/source/xoutdev/xtable.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtable.cxx?rev=1476949&r1=1476948&r2=1476949&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtable.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtable.cxx Mon Apr 29 10:00:23 2013
@@ -157,12 +157,13 @@ void XPropertyList::Clear()
 
 long XPropertyList::Count() const
 {
-       if( mbListDirty )
-       {
-               // ( (XPropertyList*) this )->bListDirty = sal_False; <- im 
Load()
-               if( !( (XPropertyList*) this )->Load() )
-                       ( (XPropertyList*) this )->Create();
-       }
+    if( mbListDirty )
+    {
+        if(!const_cast< XPropertyList* >(this)->Load())
+        {
+            const_cast< XPropertyList* >(this)->Create();
+        }
+    }
 
     return maContent.size();
 }
@@ -177,11 +178,15 @@ XPropertyEntry* XPropertyList::Get( long
 {
     if( mbListDirty )
     {
-        if( !( (XPropertyList*) this )->Load() )
-            ( (XPropertyList*) this )->Create();
+        if(!const_cast< XPropertyList* >(this)->Load())
+        {
+            const_cast< XPropertyList* >(this)->Create();
+        }
     }
 
-    if(nIndex >= maContent.size())
+    const long nObjectCount(maContent.size());
+
+    if(nIndex >= nObjectCount)
     {
         return 0;
     }
@@ -199,8 +204,10 @@ long XPropertyList::GetIndex(const XubSt
 {
     if( mbListDirty )
     {
-        if( !( (XPropertyList*) this )->Load() )
-            ( (XPropertyList*) this )->Create();
+        if(!const_cast< XPropertyList* >(this)->Load())
+        {
+            const_cast< XPropertyList* >(this)->Create();
+        }
     }
 
     ::std::vector< XPropertyEntry* >::const_iterator aStart(maContent.begin());
@@ -254,7 +261,9 @@ void XPropertyList::Insert( XPropertyEnt
 {
     if(pEntry)
     {
-        if(nIndex >= maContent.size())
+        const long nObjectCount(maContent.size());
+
+        if(nIndex >= nObjectCount)
         {
             maContent.push_back(pEntry);
         }
@@ -277,7 +286,9 @@ XPropertyEntry* XPropertyList::Replace( 
 
     if(pEntry)
     {
-        if(nIndex < maContent.size())
+        const long nObjectCount(maContent.size());
+
+        if(nIndex < nObjectCount)
         {
             pRetval = maContent[nIndex];
             maContent[nIndex] = pEntry;
@@ -296,10 +307,11 @@ XPropertyEntry* XPropertyList::Replace( 
 XPropertyEntry* XPropertyList::Remove( long nIndex )
 {
     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();
             maContent.pop_back();


Reply via email to