Modified: openoffice/branches/sidebar/main/svx/source/xoutdev/xtabdash.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/xoutdev/xtabdash.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/xoutdev/xtabdash.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/xoutdev/xtabdash.cxx Fri Apr  5 
16:11:20 2013
@@ -70,86 +70,6 @@ char const aChckDash[]  = { 0x04, 0x00, 
 char const aChckDash0[] = { 0x04, 0x00, 'S','O','D','0'};      // = 5.2
 char const aChckXML[]   = { '<', '?', 'x', 'm', 'l' };         // = 6.0
 
-// -----------------
-// class XDashTable
-// -----------------
-
-/*************************************************************************
-|*
-|* XDashTable::XDashTable()
-|*
-*************************************************************************/
-
-XDashTable::XDashTable( const String& rPath,
-                                                       XOutdevItemPool* 
pInPool,
-                                                       sal_uInt16 nInitSize, 
sal_uInt16 nReSize ) :
-                               XPropertyTable( rPath, pInPool, nInitSize, 
nReSize)
-{
-       pBmpTable = new Table( nInitSize, nReSize );
-}
-
-/************************************************************************/
-
-XDashTable::~XDashTable()
-{
-}
-
-/************************************************************************/
-
-XDashEntry* XDashTable::Replace(long nIndex, XDashEntry* pEntry )
-{
-       return (XDashEntry*) XPropertyTable::Replace(nIndex, pEntry);
-}
-
-/************************************************************************/
-
-XDashEntry* XDashTable::Remove(long nIndex)
-{
-       return (XDashEntry*) XPropertyTable::Remove(nIndex, 0);
-}
-
-/************************************************************************/
-
-XDashEntry* XDashTable::GetDash(long nIndex) const
-{
-       return (XDashEntry*) XPropertyTable::Get(nIndex, 0);
-}
-
-/************************************************************************/
-
-sal_Bool XDashTable::Load()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XDashTable::Save()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XDashTable::Create()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XDashTable::CreateBitmapsForUI()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-Bitmap* XDashTable::CreateBitmapForUI( long /*nIndex*/, sal_Bool /*bDelete*/)
-{
-       return( NULL );
-}
-
 // ----------------
 // class XDashList
 // ----------------
@@ -193,13 +113,14 @@ void XDashList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
                OSL_ENSURE(0 != pVirDev, "XDashList: no VirtualDevice created!" 
);
                pVirDev->SetMapMode(MAP_100TH_MM);
-               const Size aSize(pVirDev->PixelToLogic(Size(BITMAP_WIDTH * 2, 
BITMAP_HEIGHT)));
+               const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth() 
* 2, getUiBitmapHeight())));
                pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | 
DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
             : DRAWMODE_DEFAULT);
-    
-           SdrModel* pSdrModel = new SdrModel();
+        pVirDev->SetBackground(rStyleSettings.GetFieldColor());
+
+        SdrModel* pSdrModel = new SdrModel();
                OSL_ENSURE(0 != pSdrModel, "XDashList: no SdrModel created!" );
            pSdrModel->GetItemPool().FreezeIdRanges();
 
@@ -221,8 +142,8 @@ void XDashList::impCreate()
        pLineObject->SetModel(pSdrModel);
         pLineObject->SetMergedItem(XLineStyleItem(XLINE_DASH));
         pLineObject->SetMergedItem(XLineColorItem(String(), 
rStyleSettings.GetFieldTextColor()));
-        pLineObject->SetMergedItem(XLineWidthItem(30));
-
+               const Size 
aLineWidth(pVirDev->PixelToLogic(Size(getUiBitmapLineWidth(), 0)));
+        pLineObject->SetMergedItem(XLineWidthItem(aLineWidth.getWidth()));
         mpData = new impXDashList(pVirDev, pSdrModel, pBackgroundObject, 
pLineObject);
                OSL_ENSURE(0 != mpData, "XDashList: data creation went wrong!" 
);
     }
@@ -237,11 +158,13 @@ void XDashList::impDestroy()
     }
 }
 
-XDashList::XDashList(const String& rPath, XOutdevItemPool* pInPool, sal_uInt16 
nInitSize, sal_uInt16 nReSize)
-:   XPropertyList(rPath, pInPool, nInitSize, nReSize),
-    mpData(0)
+XDashList::XDashList(const String& rPath, XOutdevItemPool* pInPool )
+:   XPropertyList(rPath, pInPool ),
+    mpData(0),
+    maBitmapSolidLine(),
+    maStringSolidLine(),
+    maStringNoLine()
 {
-       pBmpList = new List(nInitSize, nReSize);
 }
 
 XDashList::~XDashList()
@@ -266,19 +189,19 @@ XDashEntry* XDashList::GetDash(long nInd
 
 sal_Bool XDashList::Load()
 {
-       if( bListDirty )
+       if( mbListDirty )
        {
-               bListDirty = sal_False;
+               mbListDirty = false;
 
-               INetURLObject aURL( aPath );
+               INetURLObject aURL( maPath );
 
                if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
                {
-                       DBG_ASSERT( !aPath.Len(), "invalid URL" );
+                       DBG_ASSERT( !maPath.Len(), "invalid URL" );
                        return sal_False;
                }
 
-               aURL.Append( aName );
+               aURL.Append( maName );
 
                if( !aURL.getExtension().getLength() )
                        aURL.setExtension( rtl::OUString( pszExtDash, 3 ) );
@@ -291,15 +214,15 @@ sal_Bool XDashList::Load()
 
 sal_Bool XDashList::Save()
 {
-       INetURLObject aURL( aPath );
+       INetURLObject aURL( maPath );
 
        if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
        {
-               DBG_ASSERT( !aPath.Len(), "invalid URL" );
+               DBG_ASSERT( !maPath.Len(), "invalid URL" );
                return sal_False;
        }
 
-       aURL.Append( aName );
+       aURL.Append( maName );
 
        if( !aURL.getExtension().getLength() )
                aURL.setExtension( rtl::OUString( pszExtDash, 3 ) );
@@ -324,32 +247,21 @@ sal_Bool XDashList::Create()
        return( sal_True );
 }
 
-sal_Bool XDashList::CreateBitmapsForUI()
-{
-    impCreate();
-
-    for( long i = 0; i < Count(); i++)
-       {
-               Bitmap* pBmp = CreateBitmapForUI( i, sal_False );
-               DBG_ASSERT( pBmp, "XDashList: Bitmap(UI) konnte nicht erzeugt 
werden!" );
-
-               if( pBmp )
-                       pBmpList->Insert( pBmp, i );
-       }
-
-    impDestroy();
-
-       return( sal_True );
-}
-
-Bitmap* XDashList::CreateBitmapForUI( long nIndex, sal_Bool bDelete )
+Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
 {
     impCreate();
     VirtualDevice* pVD = mpData->getVirtualDevice();
     SdrObject* pLine = mpData->getLineObject();
 
-    pLine->SetMergedItem(XLineStyleItem(XLINE_DASH));
-    pLine->SetMergedItem(XLineDashItem(String(), GetDash(nIndex)->GetDash()));
+    if(pDash)
+    {
+        pLine->SetMergedItem(XLineStyleItem(XLINE_DASH));
+        pLine->SetMergedItem(XLineDashItem(String(), *pDash));
+    }
+    else
+    {
+        pLine->SetMergedItem(XLineStyleItem(XLINE_SOLID));
+    }
 
     sdr::contact::SdrObjectVector aObjectVector;
        aObjectVector.push_back(mpData->getBackgroundObject());
@@ -357,17 +269,50 @@ Bitmap* XDashList::CreateBitmapForUI( lo
        sdr::contact::ObjectContactOfObjListPainter aPainter(*pVD, 
aObjectVector, 0);
        sdr::contact::DisplayInfo aDisplayInfo;
 
+    pVD->Erase();
        aPainter.ProcessDisplay(aDisplayInfo);
 
     const Point aZero(0, 0);
-       Bitmap* pBitmap = new Bitmap(pVD->GetBitmap(aZero, 
pVD->GetOutputSize()));
+       return pVD->GetBitmap(aZero, pVD->GetOutputSize());
+}
 
-       if(bDelete)
-       {
-        impDestroy();
-       }
+Bitmap XDashList::CreateBitmapForUI( long nIndex )
+{
+    const XDash& rDash = GetDash(nIndex)->GetDash();
+
+    return ImpCreateBitmapForXDash(&rDash);
+}
+
+Bitmap XDashList::GetBitmapForUISolidLine() const
+{
+    if(maBitmapSolidLine.IsEmpty())
+    {
+        const_cast< XDashList* >(this)->maBitmapSolidLine = const_cast< 
XDashList* >(this)->ImpCreateBitmapForXDash(0);
+    }
+
+    return maBitmapSolidLine;
+}
+
+String XDashList::GetStringForUiSolidLine() const
+{
+    if(!maStringSolidLine.Len())
+    {
+        const_cast< XDashList* >(this)->maStringSolidLine = 
String(ResId(RID_SVXSTR_SOLID, DIALOG_MGR()));
+    }
+
+    return maStringSolidLine;
+}
+
+String XDashList::GetStringForUiNoLine() const
+{
+    if(!maStringNoLine.Len())
+    {
+        // formally was RID_SVXSTR_INVISIBLE, but tomake equal 
+        // everywhere, use RID_SVXSTR_NONE
+        const_cast< XDashList* >(this)->maStringNoLine = 
String(ResId(RID_SVXSTR_NONE, DIALOG_MGR()));
+    }
 
-       return pBitmap;
+    return maStringNoLine;
 }
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/sidebar/main/svx/source/xoutdev/xtabgrdt.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/xoutdev/xtabgrdt.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/xoutdev/xtabgrdt.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/xoutdev/xtabgrdt.cxx Fri Apr  5 
16:11:20 2013
@@ -67,86 +67,6 @@ char const aChckGradient[]  = { 0x04, 0x
 char const aChckGradient0[] = { 0x04, 0x00, 'S','O','G','0'};  // = 5.2
 char const aChckXML[]       = { '<', '?', 'x', 'm', 'l' };             // = 6.0
 
-// ---------------------
-// class XGradientTable
-// ---------------------
-
-/*************************************************************************
-|*
-|* XGradientTable::XGradientTable()
-|*
-*************************************************************************/
-
-XGradientTable::XGradientTable( const String& rPath,
-                                                       XOutdevItemPool* 
pInPool,
-                                                       sal_uInt16 nInitSize, 
sal_uInt16 nReSize ) :
-                               XPropertyTable( rPath, pInPool, nInitSize, 
nReSize)
-{
-       pBmpTable = new Table( nInitSize, nReSize );
-}
-
-/************************************************************************/
-
-XGradientTable::~XGradientTable()
-{
-}
-
-/************************************************************************/
-
-XGradientEntry* XGradientTable::Replace(long nIndex, XGradientEntry* pEntry )
-{
-       return (XGradientEntry*) XPropertyTable::Replace(nIndex, pEntry);
-}
-
-/************************************************************************/
-
-XGradientEntry* XGradientTable::Remove(long nIndex)
-{
-       return (XGradientEntry*) XPropertyTable::Remove(nIndex, 0);
-}
-
-/************************************************************************/
-
-XGradientEntry* XGradientTable::GetGradient(long nIndex) const
-{
-       return (XGradientEntry*) XPropertyTable::Get(nIndex, 0);
-}
-
-/************************************************************************/
-
-sal_Bool XGradientTable::Load()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XGradientTable::Save()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XGradientTable::Create()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XGradientTable::CreateBitmapsForUI()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-Bitmap* XGradientTable::CreateBitmapForUI( long /*nIndex*/, sal_Bool 
/*bDelete*/)
-{
-       return( NULL );
-}
-
 // --------------------
 // class XGradientList
 // --------------------
@@ -186,12 +106,13 @@ void XGradientList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
                OSL_ENSURE(0 != pVirDev, "XGradientList: no VirtualDevice 
created!" );
                pVirDev->SetMapMode(MAP_100TH_MM);
-               const Size aSize(pVirDev->PixelToLogic(Size(BITMAP_WIDTH, 
BITMAP_HEIGHT)));
+               const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth(), 
getUiBitmapHeight())));
                pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | 
DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
             : DRAWMODE_DEFAULT);
-    
+        pVirDev->SetBackground(rStyleSettings.GetFieldColor());
+
            SdrModel* pSdrModel = new SdrModel();
                OSL_ENSURE(0 != pSdrModel, "XGradientList: no SdrModel 
created!" );
            pSdrModel->GetItemPool().FreezeIdRanges();
@@ -204,7 +125,7 @@ void XGradientList::impCreate()
         pBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_GRADIENT));
         pBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_SOLID));
         pBackgroundObject->SetMergedItem(XLineColorItem(String(), 
Color(COL_BLACK)));
-        
pBackgroundObject->SetMergedItem(XGradientStepCountItem(sal_uInt16((BITMAP_WIDTH
 + BITMAP_HEIGHT) / 3)));
+        
pBackgroundObject->SetMergedItem(XGradientStepCountItem(sal_uInt16((getUiBitmapWidth()
 + getUiBitmapHeight()) / 3)));
 
         mpData = new impXGradientList(pVirDev, pSdrModel, pBackgroundObject);
                OSL_ENSURE(0 != mpData, "XGradientList: data creation went 
wrong!" );
@@ -220,11 +141,10 @@ void XGradientList::impDestroy()
     }
 }
 
-XGradientList::XGradientList( const String& rPath, XOutdevItemPool* pInPool, 
sal_uInt16 nInitSize, sal_uInt16 nReSize)
-:   XPropertyList(rPath, pInPool, nInitSize, nReSize),
+XGradientList::XGradientList( const String& rPath, XOutdevItemPool* pInPool )
+:   XPropertyList(rPath, pInPool ),
     mpData(0)
 {
-       pBmpList = new List(nInitSize, nReSize);
 }
 
 XGradientList::~XGradientList()
@@ -253,19 +173,19 @@ XGradientEntry* XGradientList::GetGradie
 
 sal_Bool XGradientList::Load()
 {
-       if( bListDirty )
+       if( mbListDirty )
        {
-               bListDirty = sal_False;
+               mbListDirty = false;
 
-               INetURLObject aURL( aPath );
+               INetURLObject aURL( maPath );
 
                if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
                {
-                       DBG_ASSERT( !aPath.Len(), "invalid URL" );
+                       DBG_ASSERT( !maPath.Len(), "invalid URL" );
                        return sal_False;
                }
 
-               aURL.Append( aName );
+               aURL.Append( maName );
 
                if( !aURL.getExtension().getLength() )
                        aURL.setExtension( rtl::OUString( pszExtGradient, 3 ) );
@@ -279,15 +199,15 @@ sal_Bool XGradientList::Load()
 
 sal_Bool XGradientList::Save()
 {
-       INetURLObject aURL( aPath );
+       INetURLObject aURL( maPath );
 
        if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
        {
-               DBG_ASSERT( !aPath.Len(), "invalid URL" );
+               DBG_ASSERT( !maPath.Len(), "invalid URL" );
                return sal_False;
        }
 
-       aURL.Append( aName );
+       aURL.Append( maName );
 
        if( !aURL.getExtension().getLength() )
                aURL.setExtension( rtl::OUString( pszExtGradient, 3 ) );
@@ -318,25 +238,7 @@ sal_Bool XGradientList::Create()
        return( sal_True );
 }
 
-sal_Bool XGradientList::CreateBitmapsForUI()
-{
-    impCreate();
-
-    for( long i = 0; i < Count(); i++)
-       {
-               Bitmap* pBmp = CreateBitmapForUI( i, sal_False );
-               DBG_ASSERT( pBmp, "XGradientList: Bitmap(UI) konnte nicht 
erzeugt werden!" );
-
-               if( pBmp )
-                       pBmpList->Insert( pBmp, i );
-       }
-
-    impDestroy();
-
-       return( sal_False );
-}
-
-Bitmap* XGradientList::CreateBitmapForUI( long nIndex, sal_Bool bDelete )
+Bitmap XGradientList::CreateBitmapForUI( long nIndex )
 {
     impCreate();
     VirtualDevice* pVD = mpData->getVirtualDevice();
@@ -351,17 +253,11 @@ Bitmap* XGradientList::CreateBitmapForUI
        sdr::contact::ObjectContactOfObjListPainter aPainter(*pVD, 
aObjectVector, 0);
        sdr::contact::DisplayInfo aDisplayInfo;
 
+    pVD->Erase();
        aPainter.ProcessDisplay(aDisplayInfo);
 
     const Point aZero(0, 0);
-       Bitmap* pBitmap = new Bitmap(pVD->GetBitmap(aZero, 
pVD->GetOutputSize()));
-
-       if(bDelete)
-       {
-        impDestroy();
-       }
-
-       return pBitmap;
+       return pVD->GetBitmap(aZero, pVD->GetOutputSize());
 }
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/sidebar/main/svx/source/xoutdev/xtabhtch.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/xoutdev/xtabhtch.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/xoutdev/xtabhtch.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/xoutdev/xtabhtch.cxx Fri Apr  5 
16:11:20 2013
@@ -66,86 +66,6 @@ char const aChckHatch[]  = { 0x04, 0x00,
 char const aChckHatch0[] = { 0x04, 0x00, 'S','O','H','0'};     // = 5.2
 char const aChckXML[]    = { '<', '?', 'x', 'm', 'l' };                // = 6.0
 
-// ------------------
-// class XHatchTable
-// ------------------
-
-/*************************************************************************
-|*
-|* XHatchTable::XHatchTable()
-|*
-*************************************************************************/
-
-XHatchTable::XHatchTable( const String& rPath,
-                                                       XOutdevItemPool* 
pInPool,
-                                                       sal_uInt16 nInitSize, 
sal_uInt16 nReSize ) :
-                               XPropertyTable( rPath, pInPool, nInitSize, 
nReSize)
-{
-       pBmpTable = new Table( nInitSize, nReSize );
-}
-
-/************************************************************************/
-
-XHatchTable::~XHatchTable()
-{
-}
-
-/************************************************************************/
-
-XHatchEntry* XHatchTable::Replace(long nIndex, XHatchEntry* pEntry )
-{
-       return (XHatchEntry*) XPropertyTable::Replace(nIndex, pEntry);
-}
-
-/************************************************************************/
-
-XHatchEntry* XHatchTable::Remove(long nIndex)
-{
-       return (XHatchEntry*) XPropertyTable::Remove(nIndex, 0);
-}
-
-/************************************************************************/
-
-XHatchEntry* XHatchTable::GetHatch(long nIndex) const
-{
-       return (XHatchEntry*) XPropertyTable::Get(nIndex, 0);
-}
-
-/************************************************************************/
-
-sal_Bool XHatchTable::Load()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XHatchTable::Save()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XHatchTable::Create()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XHatchTable::CreateBitmapsForUI()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-Bitmap* XHatchTable::CreateBitmapForUI( long /*nIndex*/, sal_Bool /*bDelete*/)
-{
-       return( NULL );
-}
-
 // -----------------
 // class XHatchList
 // -----------------
@@ -189,13 +109,14 @@ void XHatchList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
                OSL_ENSURE(0 != pVirDev, "XDashList: no VirtualDevice created!" 
);
                pVirDev->SetMapMode(MAP_100TH_MM);
-               const Size aSize(pVirDev->PixelToLogic(Size(BITMAP_WIDTH, 
BITMAP_HEIGHT)));
+               const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth(), 
getUiBitmapHeight())));
                pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | 
DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
             : DRAWMODE_DEFAULT);
-    
-           SdrModel* pSdrModel = new SdrModel();
+        pVirDev->SetBackground(rStyleSettings.GetFieldColor());
+
+        SdrModel* pSdrModel = new SdrModel();
                OSL_ENSURE(0 != pSdrModel, "XDashList: no SdrModel created!" );
            pSdrModel->GetItemPool().FreezeIdRanges();
 
@@ -229,11 +150,10 @@ void XHatchList::impDestroy()
     }
 }
 
-XHatchList::XHatchList(const String& rPath, XOutdevItemPool* pInPool, 
sal_uInt16 nInitSize, sal_uInt16 nReSize)
-:   XPropertyList(rPath, pInPool, nInitSize, nReSize),
+XHatchList::XHatchList(const String& rPath, XOutdevItemPool* pInPool)
+:   XPropertyList(rPath, pInPool),
     mpData(0)
 {
-       pBmpList = new List(nInitSize, nReSize);
 }
 
 XHatchList::~XHatchList()
@@ -262,19 +182,19 @@ XHatchEntry* XHatchList::GetHatch(long n
 
 sal_Bool XHatchList::Load()
 {
-       if( bListDirty )
+       if( mbListDirty )
        {
-               bListDirty = sal_False;
+               mbListDirty = false;
 
-               INetURLObject aURL( aPath );
+               INetURLObject aURL( maPath );
 
                if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
                {
-                       DBG_ASSERT( !aPath.Len(), "invalid URL" );
+                       DBG_ASSERT( !maPath.Len(), "invalid URL" );
                        return sal_False;
                }
 
-               aURL.Append( aName );
+               aURL.Append( maName );
 
                if( !aURL.getExtension().getLength() )
                        aURL.setExtension( rtl::OUString( pszExtHatch, 3 ) );
@@ -287,15 +207,15 @@ sal_Bool XHatchList::Load()
 
 sal_Bool XHatchList::Save()
 {
-       INetURLObject aURL( aPath );
+       INetURLObject aURL( maPath );
 
        if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
        {
-               DBG_ASSERT( !aPath.Len(), "invalid URL" );
+               DBG_ASSERT( !maPath.Len(), "invalid URL" );
                return sal_False;
        }
 
-       aURL.Append( aName );
+       aURL.Append( maName );
 
        if( !aURL.getExtension().getLength() )
                aURL.setExtension( rtl::OUString( pszExtHatch, 3 ) );
@@ -320,25 +240,7 @@ sal_Bool XHatchList::Create()
        return( sal_True );
 }
 
-sal_Bool XHatchList::CreateBitmapsForUI()
-{
-    impCreate();
-
-    for( long i = 0; i < Count(); i++)
-       {
-               Bitmap* pBmp = CreateBitmapForUI( i, sal_False );
-               DBG_ASSERT( pBmp, "XHatchList: Bitmap(UI) konnte nicht erzeugt 
werden!" );
-
-               if( pBmp )
-                       pBmpList->Insert( pBmp, i );
-       }
-
-    impDestroy();
-
-       return( sal_True );
-}
-
-Bitmap* XHatchList::CreateBitmapForUI( long nIndex, sal_Bool bDelete )
+Bitmap XHatchList::CreateBitmapForUI( long nIndex )
 {
     impCreate();
     VirtualDevice* pVD = mpData->getVirtualDevice();
@@ -353,17 +255,11 @@ Bitmap* XHatchList::CreateBitmapForUI( l
        sdr::contact::ObjectContactOfObjListPainter aPainter(*pVD, 
aObjectVector, 0);
        sdr::contact::DisplayInfo aDisplayInfo;
 
+    pVD->Erase();
        aPainter.ProcessDisplay(aDisplayInfo);
 
     const Point aZero(0, 0);
-       Bitmap* pBitmap = new Bitmap(pVD->GetBitmap(aZero, 
pVD->GetOutputSize()));
-
-       if(bDelete)
-       {
-        impDestroy();
-       }
-
-       return pBitmap;
+       return pVD->GetBitmap(aZero, pVD->GetOutputSize());
 }
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/sidebar/main/svx/source/xoutdev/xtable.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/xoutdev/xtable.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/xoutdev/xtable.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/xoutdev/xtable.cxx Fri Apr  5 
16:11:20 2013
@@ -26,6 +26,8 @@
 
 #include <svx/xtable.hxx>
 #include <svx/xpool.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdpool.hxx>
 
 #define GLOBALOVERFLOW
 
@@ -41,311 +43,36 @@ Color RGB_Color( ColorData nColorName )
        return aRGBColor;
 }
 
-// ---------------------
-// class XPropertyTable
-// ---------------------
-
-/*************************************************************************
-|*
-|* XPropertyTable::XPropertyTable()
-|*
-*************************************************************************/
-
-XPropertyTable::XPropertyTable( const String& rPath,
-                                                               
XOutdevItemPool* pInPool,
-                                                               sal_uInt16 
nInitSize, sal_uInt16 nReSize ) :
-                       aName                   ( pszStandard, 8 ),
-                       aPath                   ( rPath ),
-                       pXPool                  ( pInPool ),
-                       aTable                  ( nInitSize, nReSize ),
-                       pBmpTable               ( NULL ),
-                       bTableDirty             ( sal_True ),
-                       bBitmapsDirty   ( sal_True ),
-                       bOwnPool                ( sal_False )
-{
-       if( !pXPool )
-       {
-               bOwnPool = sal_True;
-               pXPool = new XOutdevItemPool;
-               DBG_ASSERT( pXPool, "XOutPool konnte nicht erzeugt werden!" );
-       }
-}
-
-/*************************************************************************
-|*
-|* XPropertyTable::XPropertyTable( SvStraem& )
-|*
-*************************************************************************/
-
-XPropertyTable::XPropertyTable( SvStream& /*rIn*/) :
-                       pBmpTable       ( NULL )
-{
-}
-
-/*************************************************************************
-|*
-|* XPropertyTable::~XPropertyTable()
-|*
-*************************************************************************/
-
-XPropertyTable::~XPropertyTable()
-{
-       XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First();
-       Bitmap* pBitmap = NULL;
-       for (sal_uIntPtr nIndex = 0; nIndex < aTable.Count(); nIndex++)
-       {
-               delete pEntry;
-               pEntry = (XPropertyEntry*)aTable.Next();
-       }
-       // Hier wird die Bitmaptabelle geloescht
-       if( pBmpTable )
-       {
-               pBitmap = (Bitmap*) pBmpTable->First();
-
-               for( sal_uIntPtr nIndex = 0; nIndex < pBmpTable->Count(); 
nIndex++ )
-               {
-                       delete pBitmap;
-                       pBitmap = (Bitmap*) pBmpTable->Next();
-               }
-               delete pBmpTable;
-               pBmpTable = NULL;
-       }
-       // Eigener Pool wird geloescht
-       if( bOwnPool && pXPool )
-       {
-        SfxItemPool::Free(pXPool);
-       }
-}
-
-/*************************************************************************
-|*
-|* XPropertyTable::Clear()
-|*
-*************************************************************************/
-
-void XPropertyTable::Clear()
-{
-       aTable.Clear();
-       if( pBmpTable )
-               pBmpTable->Clear();
-}
-
-/************************************************************************/
-
-long XPropertyTable::Count() const
-{
-       if( bTableDirty )
-       {
-               // ( (XPropertyTable*) this )->bTableDirty = sal_False; <- im 
Load()
-               if( !( (XPropertyTable*) this )->Load() )
-                       ( (XPropertyTable*) this )->Create();
-       }
-       return( aTable.Count() );
-}
-
-/*************************************************************************
-|*
-|* XPropertyEntry* XPropertyTable::Get()
-|*
-*************************************************************************/
-
-XPropertyEntry* XPropertyTable::Get( long nIndex, sal_uInt16 /*nDummy*/) const
-{
-       if( bTableDirty )
-       {
-               // ( (XPropertyTable*) this )->bTableDirty = sal_False; <- im 
Load()
-               if( !( (XPropertyTable*) this )->Load() )
-                       ( (XPropertyTable*) this )->Create();
-       }
-       return (XPropertyEntry*) aTable.GetObject( (sal_uIntPtr) nIndex );
-}
-
-/*************************************************************************
-|*
-|* long XPropertyTable::Get(const String& rName)
-|*
-*************************************************************************/
-
-long XPropertyTable::Get(const XubString& rName)
-{
-       if( bTableDirty )
-       {
-               // bTableDirty = sal_False;
-               if( !Load() )
-                       Create();
-       }
-       long nPos = 0;
-       XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First();
-       while (pEntry && pEntry->GetName() != rName)
-       {
-               nPos++;
-               pEntry = (XPropertyEntry*)aTable.Next();
-       }
-       if (!pEntry) nPos = -1;
-       return nPos;
-}
-
-/*************************************************************************
-|*
-|* Bitmap* XPropertyTable::GetBitmap()
-|*
-*************************************************************************/
-
-Bitmap* XPropertyTable::GetBitmap( long nIndex ) const
-{
-       if( pBmpTable )
-       {
-               if( bBitmapsDirty )
-               {
-                       ( (XPropertyTable*) this )->bBitmapsDirty = sal_False;
-                       ( (XPropertyTable*) this )->CreateBitmapsForUI();
-               }
-
-               if( pBmpTable->Count() >= (sal_uIntPtr) nIndex )
-                       return (Bitmap*) pBmpTable->GetObject( (sal_uIntPtr) 
nIndex );
-       }
-       return( NULL );
-}
-
-/*************************************************************************
-|*
-|* void XPropertyTable::Insert()
-|*
-*************************************************************************/
-
-sal_Bool XPropertyTable::Insert( long nIndex, XPropertyEntry* pEntry )
-{
-       sal_Bool bReturn = aTable.Insert( (sal_uIntPtr) nIndex, pEntry );
-
-       if( pBmpTable && !bBitmapsDirty )
-       {
-               Bitmap* pBmp = CreateBitmapForUI( (sal_uIntPtr) nIndex );
-               pBmpTable->Insert( (sal_uIntPtr) nIndex, pBmp );
-       }
-       return bReturn;
-}
-
-/*************************************************************************
-|*
-|* void XPropertyTable::Replace()
-|*
-*************************************************************************/
-
-XPropertyEntry* XPropertyTable::Replace( long nIndex, XPropertyEntry* pEntry )
-{
-       XPropertyEntry* pOldEntry = (XPropertyEntry*) aTable.Replace( 
(sal_uIntPtr) nIndex, pEntry );
-
-       if( pBmpTable && !bBitmapsDirty )
-       {
-               Bitmap* pBmp = CreateBitmapForUI( (sal_uIntPtr) nIndex );
-               Bitmap* pOldBmp = (Bitmap*) pBmpTable->Replace( (sal_uIntPtr) 
nIndex, pBmp );
-               if( pOldBmp )
-                       delete pOldBmp;
-       }
-       return pOldEntry;
-}
-
-/*************************************************************************
-|*
-|* void XPropertyTable::Remove()
-|*
-*************************************************************************/
-
-XPropertyEntry* XPropertyTable::Remove( long nIndex, sal_uInt16 /*nDummy*/)
-{
-       if( pBmpTable && !bBitmapsDirty )
-       {
-               Bitmap* pOldBmp = (Bitmap*) pBmpTable->Remove( (sal_uIntPtr) 
nIndex );
-               if( pOldBmp )
-                       delete pOldBmp;
-       }
-       return (XPropertyEntry*) aTable.Remove((sal_uIntPtr)nIndex);
-}
-
-/************************************************************************/
-
-void XPropertyTable::SetName( const String& rString )
-{
-       if(rString.Len())
-       {
-               aName = rString;
-       }
-}
-
 // --------------------
 // class XPropertyList
 // --------------------
 
-
-/*************************************************************************
-|*
-|* XPropertyList::XPropertyList()
-|*
-*************************************************************************/
-
-XPropertyList::XPropertyList( const String& rPath,
-                                                               
XOutdevItemPool* pInPool,
-                                                               sal_uInt16 
nInitSize, sal_uInt16 nReSize ) :
-                       aName                   ( pszStandard, 8 ),
-                       aPath                   ( rPath ),
-                       pXPool                  ( pInPool ),
-                       aList                   ( nInitSize, nReSize ),
-                       pBmpList                ( NULL ),
-                       bListDirty              ( sal_True ),
-                       bBitmapsDirty   ( sal_True ),
-                       bOwnPool                ( sal_False )
+XPropertyList::XPropertyList( const String& rPath, XOutdevItemPool* pInPool ) :
+                       maName                  ( pszStandard, 8 ),
+                       maPath                  ( rPath ),
+                       mpXPool                 ( pInPool ),
+                       maList                  ( 16, 16 ),
+                       mbListDirty             (true)
 {
-       if( !pXPool )
+       if( !mpXPool )
        {
-               bOwnPool = sal_True;
-               pXPool = new XOutdevItemPool;
-               DBG_ASSERT( pXPool, "XOutPool konnte nicht erzeugt werden!" );
+               mpXPool = static_cast< XOutdevItemPool* 
>(&SdrObject::GetGlobalDrawObjectItemPool());
        }
 }
 
 /*************************************************************************
 |*
-|* XPropertyList::XPropertyList( SvStraem& )
-|*
-*************************************************************************/
-
-XPropertyList::XPropertyList( SvStream& /*rIn*/) :
-                       pBmpList        ( NULL )
-{
-}
-
-/*************************************************************************
-|*
 |* XPropertyList::~XPropertyList()
 |*
 *************************************************************************/
 
 XPropertyList::~XPropertyList()
 {
-       XPropertyEntry* pEntry = (XPropertyEntry*)aList.First();
-       Bitmap* pBitmap = NULL;
-       for( sal_uIntPtr nIndex = 0; nIndex < aList.Count(); nIndex++ )
+       XPropertyEntry* pEntry = (XPropertyEntry*)maList.First();
+       for( sal_uIntPtr nIndex = 0; nIndex < maList.Count(); nIndex++ )
        {
                delete pEntry;
-               pEntry = (XPropertyEntry*)aList.Next();
-       }
-
-       if( pBmpList )
-       {
-               pBitmap = (Bitmap*) pBmpList->First();
-
-               for( sal_uIntPtr nIndex = 0; nIndex < pBmpList->Count(); 
nIndex++ )
-               {
-                       delete pBitmap;
-                       pBitmap = (Bitmap*) pBmpList->Next();
-               }
-               delete pBmpList;
-               pBmpList = NULL;
-       }
-
-       if( bOwnPool && pXPool )
-       {
-        SfxItemPool::Free(pXPool);
+               pEntry = (XPropertyEntry*)maList.Next();
        }
 }
 
@@ -357,22 +84,20 @@ XPropertyList::~XPropertyList()
 
 void XPropertyList::Clear()
 {
-       aList.Clear();
-       if( pBmpList )
-               pBmpList->Clear();
+       maList.Clear();
 }
 
 /************************************************************************/
 
 long XPropertyList::Count() const
 {
-       if( bListDirty )
+       if( mbListDirty )
        {
                // ( (XPropertyList*) this )->bListDirty = sal_False; <- im 
Load()
                if( !( (XPropertyList*) this )->Load() )
                        ( (XPropertyList*) this )->Create();
        }
-       return( aList.Count() );
+       return( maList.Count() );
 }
 
 /*************************************************************************
@@ -383,13 +108,13 @@ long XPropertyList::Count() const
 
 XPropertyEntry* XPropertyList::Get( long nIndex, sal_uInt16 /*nDummy*/) const
 {
-       if( bListDirty )
+       if( mbListDirty )
        {
                // ( (XPropertyList*) this )->bListDirty = sal_False; <- im 
Load()
                if( !( (XPropertyList*) this )->Load() )
                        ( (XPropertyList*) this )->Create();
        }
-       return (XPropertyEntry*) aList.GetObject( (sal_uIntPtr) nIndex );
+       return (XPropertyEntry*) maList.GetObject( (sal_uIntPtr) nIndex );
 }
 
 /*************************************************************************
@@ -400,18 +125,18 @@ XPropertyEntry* XPropertyList::Get( long
 
 long XPropertyList::Get(const XubString& rName)
 {
-       if( bListDirty )
+       if( mbListDirty )
        {
                //bListDirty = sal_False;
                if( !Load() )
                        Create();
        }
        long nPos = 0;
-       XPropertyEntry* pEntry = (XPropertyEntry*)aList.First();
+       XPropertyEntry* pEntry = (XPropertyEntry*)maList.First();
        while (pEntry && pEntry->GetName() != rName)
        {
                nPos++;
-               pEntry = (XPropertyEntry*)aList.Next();
+               pEntry = (XPropertyEntry*)maList.Next();
        }
        if (!pEntry) nPos = -1;
        return nPos;
@@ -423,19 +148,23 @@ long XPropertyList::Get(const XubString&
 |*
 *************************************************************************/
 
-Bitmap* XPropertyList::GetBitmap( long nIndex ) const
+Bitmap XPropertyList::GetUiBitmap( long nIndex ) const
 {
-       if( pBmpList )
-       {
-               if( bBitmapsDirty )
-               {
-                       ( (XPropertyList*) this )->bBitmapsDirty = sal_False;
-                       ( (XPropertyList*) this )->CreateBitmapsForUI();
-               }
-               if( pBmpList->Count() >= (sal_uIntPtr) nIndex )
-                       return (Bitmap*) pBmpList->GetObject( (sal_uIntPtr) 
nIndex );
-       }
-       return( NULL );
+    Bitmap aRetval;
+    XPropertyEntry* pEntry = 
(XPropertyEntry*)maList.GetObject((sal_uIntPtr)nIndex);
+
+    if(pEntry)
+    {
+        aRetval = pEntry->GetUiBitmap();
+
+        if(aRetval.IsEmpty())
+        {
+            aRetval = const_cast< XPropertyList* 
>(this)->CreateBitmapForUI(nIndex);
+            pEntry->SetUiBitmap(aRetval);
+        }
+    }
+
+       return aRetval;
 }
 
 /*************************************************************************
@@ -446,14 +175,7 @@ Bitmap* XPropertyList::GetBitmap( long n
 
 void XPropertyList::Insert( XPropertyEntry* pEntry, long nIndex )
 {
-       aList.Insert( pEntry, (sal_uIntPtr) nIndex );
-
-       if( pBmpList && !bBitmapsDirty )
-       {
-               Bitmap* pBmp = CreateBitmapForUI(
-                               (sal_uIntPtr) nIndex < aList.Count() ? nIndex : 
aList.Count() - 1 );
-               pBmpList->Insert( pBmp, (sal_uIntPtr) nIndex );
-       }
+       maList.Insert( pEntry, (sal_uIntPtr) nIndex );
 }
 
 /*************************************************************************
@@ -464,16 +186,7 @@ void XPropertyList::Insert( XPropertyEnt
 
 XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex )
 {
-       XPropertyEntry* pOldEntry = (XPropertyEntry*) aList.Replace( pEntry, 
(sal_uIntPtr) nIndex );
-
-       if( pBmpList && !bBitmapsDirty )
-       {
-               Bitmap* pBmp = CreateBitmapForUI( (sal_uIntPtr) nIndex );
-               Bitmap* pOldBmp = (Bitmap*) pBmpList->Replace( pBmp, 
(sal_uIntPtr) nIndex );
-               if( pOldBmp )
-                       delete pOldBmp;
-       }
-       return pOldEntry;
+       return  (XPropertyEntry*) maList.Replace( pEntry, (sal_uIntPtr) nIndex 
);
 }
 
 /*************************************************************************
@@ -484,13 +197,7 @@ XPropertyEntry* XPropertyList::Replace( 
 
 XPropertyEntry* XPropertyList::Remove( long nIndex, sal_uInt16 /*nDummy*/)
 {
-       if( pBmpList && !bBitmapsDirty )
-       {
-               Bitmap* pOldBmp = (Bitmap*) pBmpList->Remove( (sal_uIntPtr) 
nIndex );
-               if( pOldBmp )
-                       delete pOldBmp;
-       }
-       return (XPropertyEntry*) aList.Remove( (sal_uIntPtr) nIndex );
+       return (XPropertyEntry*) maList.Remove( (sal_uIntPtr) nIndex );
 }
 
 /************************************************************************/
@@ -499,9 +206,29 @@ void XPropertyList::SetName( const Strin
 {
        if(rString.Len())
        {
-               aName = rString;
+               maName = rString;
        }
 }
 
+sal_uInt32 XPropertyList::getUiBitmapWidth() const
+{
+    static sal_uInt32 nWidth = 32; // alternative: 42;
+
+    return nWidth;
+}
+
+sal_uInt32 XPropertyList::getUiBitmapHeight() const
+{
+    static sal_uInt32 nHeight = 12; // alternative: 16;
 
+    return nHeight;
+}
+
+sal_uInt32 XPropertyList::getUiBitmapLineWidth() const
+{
+    static sal_uInt32 nLineWidth = 3;
+
+    return nLineWidth;
+}
 
+// eof

Modified: openoffice/branches/sidebar/main/svx/source/xoutdev/xtablend.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/xoutdev/xtablend.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/xoutdev/xtablend.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/xoutdev/xtablend.cxx Fri Apr  5 
16:11:20 2013
@@ -67,6 +67,7 @@
 #include <svx/svdmodel.hxx>
 #include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
 #include <svx/sdr/contact/displayinfo.hxx>
+#include <svx/xlnwtit.hxx>
 
 #define GLOBALOVERFLOW
 
@@ -74,90 +75,9 @@ using namespace com::sun::star;
 using namespace rtl;
 
 sal_Unicode const pszExtLineEnd[]      = {'s','o','e'};
-
-static char const aChckLEnd[]  = { 0x04, 0x00, 'S','O','E','L'};       // < 5.2
-static char const aChckLEnd0[] = { 0x04, 0x00, 'S','O','E','0'};       // = 5.2
-static char const aChckXML[]   = { '<', '?', 'x', 'm', 'l' };          // = 6.0
-
-// --------------------
-// class XLineEndTable
-// --------------------
-
-/*************************************************************************
-|*
-|* XLineEndTable::XLineEndTable()
-|*
-*************************************************************************/
-
-XLineEndTable::XLineEndTable( const String& rPath,
-                                                       XOutdevItemPool* 
pInPool,
-                                                       sal_uInt16 nInitSize, 
sal_uInt16 nReSize ) :
-                               XPropertyTable( rPath, pInPool, nInitSize, 
nReSize)
-{
-       pBmpTable = new Table( nInitSize, nReSize );
-}
-
-/************************************************************************/
-
-XLineEndTable::~XLineEndTable()
-{
-}
-
-/************************************************************************/
-
-XLineEndEntry* XLineEndTable::Replace(long nIndex, XLineEndEntry* pEntry )
-{
-       return (XLineEndEntry*) XPropertyTable::Replace(nIndex, pEntry);
-}
-
-/************************************************************************/
-
-XLineEndEntry* XLineEndTable::Remove(long nIndex)
-{
-       return (XLineEndEntry*) XPropertyTable::Remove(nIndex, 0);
-}
-
-/************************************************************************/
-
-XLineEndEntry* XLineEndTable::GetLineEnd(long nIndex) const
-{
-       return (XLineEndEntry*) XPropertyTable::Get(nIndex, 0);
-}
-
-/************************************************************************/
-
-sal_Bool XLineEndTable::Load()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XLineEndTable::Save()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XLineEndTable::Create()
-{
-       return( sal_False );
-}
-
-/************************************************************************/
-
-Bitmap* XLineEndTable::CreateBitmapForUI( long /*nIndex*/, sal_Bool 
/*bDelete*/)
-{
-       return( NULL );
-}
-
-/************************************************************************/
-
-sal_Bool XLineEndTable::CreateBitmapsForUI()
-{
-       return( sal_False );
-}
+//static char const aChckLEnd[]  = { 0x04, 0x00, 'S','O','E','L'};     // < 5.2
+//static char const aChckLEnd0[] = { 0x04, 0x00, 'S','O','E','0'};     // = 5.2
+//static char const aChckXML[]   = { '<', '?', 'x', 'm', 'l' };                
// = 6.0
 
 // --------------------
 // class XLineEndList
@@ -202,12 +122,13 @@ void XLineEndList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
                OSL_ENSURE(0 != pVirDev, "XLineEndList: no VirtualDevice 
created!" );
                pVirDev->SetMapMode(MAP_100TH_MM);
-               const Size aSize(pVirDev->PixelToLogic(Size(BITMAP_WIDTH * 2, 
BITMAP_HEIGHT)));
+               const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth() 
* 2, getUiBitmapHeight())));
                pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | 
DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
             : DRAWMODE_DEFAULT);
-    
+        pVirDev->SetBackground(rStyleSettings.GetFieldColor());
+
            SdrModel* pSdrModel = new SdrModel();
                OSL_ENSURE(0 != pSdrModel, "XLineEndList: no SdrModel created!" 
);
            pSdrModel->GetItemPool().FreezeIdRanges();
@@ -228,8 +149,11 @@ void XLineEndList::impCreate()
            SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, 
basegfx::B2DPolyPolygon(aPolygon));
                OSL_ENSURE(0 != pLineObject, "XLineEndList: no LineObject 
created!" );
        pLineObject->SetModel(pSdrModel);
-        pLineObject->SetMergedItem(XLineStartWidthItem(aSize.Height()));
-        pLineObject->SetMergedItem(XLineEndWidthItem(aSize.Height()));
+               const Size 
aLineWidth(pVirDev->PixelToLogic(Size(getUiBitmapLineWidth(), 0)));
+        pLineObject->SetMergedItem(XLineWidthItem(aLineWidth.getWidth()));
+        const sal_uInt32 nArrowHeight((aSize.Height() * 8) / 10);
+        pLineObject->SetMergedItem(XLineStartWidthItem(nArrowHeight));
+        pLineObject->SetMergedItem(XLineEndWidthItem(nArrowHeight));
         pLineObject->SetMergedItem(XLineColorItem(String(), 
rStyleSettings.GetFieldTextColor()));
 
         mpData = new impXLineEndList(pVirDev, pSdrModel, pBackgroundObject, 
pLineObject);
@@ -246,11 +170,10 @@ void XLineEndList::impDestroy()
     }
 }
 
-XLineEndList::XLineEndList(const String& rPath, XOutdevItemPool* _pXPool, 
sal_uInt16 nInitSize, sal_uInt16 nReSize)
-:      XPropertyList(rPath, _pXPool, nInitSize, nReSize),
+XLineEndList::XLineEndList(const String& rPath, XOutdevItemPool* _pXPool)
+:      XPropertyList(rPath, _pXPool),
        mpData(0)
 {
-       pBmpList = new List(nInitSize, nReSize);
 }
 
 XLineEndList::~XLineEndList()
@@ -275,19 +198,19 @@ XLineEndEntry* XLineEndList::GetLineEnd(
 
 sal_Bool XLineEndList::Load()
 {
-       if( bListDirty )
+       if( mbListDirty )
        {
-               bListDirty = sal_False;
+               mbListDirty = false;
 
-               INetURLObject aURL( aPath );
+               INetURLObject aURL( maPath );
 
                if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
                {
-                       DBG_ASSERT( !aPath.Len(), "invalid URL" );
+                       DBG_ASSERT( !maPath.Len(), "invalid URL" );
                        return sal_False;
                }
 
-               aURL.Append( aName );
+               aURL.Append( maName );
 
                if( !aURL.getExtension().getLength() )
                        aURL.setExtension( rtl::OUString( pszExtLineEnd, 3 ) );
@@ -300,15 +223,15 @@ sal_Bool XLineEndList::Load()
 
 sal_Bool XLineEndList::Save()
 {
-       INetURLObject aURL( aPath );
+       INetURLObject aURL( maPath );
 
        if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
        {
-               DBG_ASSERT( !aPath.Len(), "invalid URL" );
+               DBG_ASSERT( !maPath.Len(), "invalid URL" );
                return sal_False;
        }
 
-       aURL.Append( aName );
+       aURL.Append( maName );
 
        if( !aURL.getExtension().getLength() )
                aURL.setExtension( rtl::OUString( pszExtLineEnd, 3 ) );
@@ -340,25 +263,7 @@ sal_Bool XLineEndList::Create()
        return( sal_True );
 }
 
-sal_Bool XLineEndList::CreateBitmapsForUI()
-{
-    impCreate();
-
-    for( long i = 0; i < Count(); i++)
-       {
-               Bitmap* pBmp = CreateBitmapForUI( i, sal_False );
-               OSL_ENSURE(0 != pBmp, "XLineEndList: Bitmap(UI) could not be 
created!" );
-
-               if( pBmp )
-                       pBmpList->Insert( pBmp, i );
-       }
-
-    impDestroy();
-
-       return( sal_True );
-}
-
-Bitmap* XLineEndList::CreateBitmapForUI( long nIndex, sal_Bool bDelete )
+Bitmap XLineEndList::CreateBitmapForUI( long nIndex )
 {
     impCreate();
     VirtualDevice* pVD = mpData->getVirtualDevice();
@@ -374,17 +279,11 @@ Bitmap* XLineEndList::CreateBitmapForUI(
        sdr::contact::ObjectContactOfObjListPainter aPainter(*pVD, 
aObjectVector, 0);
        sdr::contact::DisplayInfo aDisplayInfo;
 
+    pVD->Erase();
        aPainter.ProcessDisplay(aDisplayInfo);
 
     const Point aZero(0, 0);
-       Bitmap* pBitmap = new Bitmap(pVD->GetBitmap(aZero, 
pVD->GetOutputSize()));
-
-       if(bDelete)
-       {
-        impDestroy();
-       }
-
-       return pBitmap;
+       return pVD->GetBitmap(aZero, pVD->GetOutputSize());
 }
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/sidebar/main/sw/source/core/draw/drawdoc.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/core/draw/drawdoc.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/core/draw/drawdoc.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/core/draw/drawdoc.cxx Fri Apr  5 
16:11:20 2013
@@ -76,8 +76,8 @@ SwDrawDocument::SwDrawDocument( SwDoc* p
                SetObjectShell( pDocSh );
                SvxColorTableItem* pColItem = ( SvxColorTableItem* )
                                 ( pDocSh->GetItem( SID_COLOR_TABLE ) );
-               XColorTable *pXCol = pColItem ? pColItem->GetColorTable() :
-                                                                               
XColorTable::GetStdColorTable();
+               XColorList *pXCol = pColItem ? pColItem->GetColorTable() :
+                                                                               
XColorList::GetStdColorList();
                SetColorTable( pXCol );
 
                if ( !pColItem )
@@ -92,7 +92,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* p
                SetObjectShell( pDocSh );
        }
        else
-               SetColorTable( XColorTable::GetStdColorTable() );
+               SetColorTable( XColorList::GetStdColorList() );
 
        // copy all the default values to the SdrModel
        SfxItemPool* pSdrPool = pD->GetAttrPool().GetSecondaryPool();

Modified: openoffice/branches/sidebar/main/sw/source/ui/app/docsh2.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/app/docsh2.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/app/docsh2.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/app/docsh2.cxx Fri Apr  5 
16:11:20 2013
@@ -1019,7 +1019,7 @@ void SwDocShell::Execute(SfxRequest& rRe
                        case SID_GET_COLORTABLE:
                        {
                                SvxColorTableItem* pColItem = 
(SvxColorTableItem*)GetItem(SID_COLOR_TABLE);
-                               XColorTable* pTable = pColItem->GetColorTable();
+                               XColorList* pTable = pColItem->GetColorTable();
                                
rReq.SetReturnValue(OfaPtrItem(SID_GET_COLORTABLE, pTable));
                        }
                        break;

Modified: openoffice/branches/sidebar/main/sw/source/ui/app/docshdrw.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/app/docshdrw.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/app/docshdrw.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/app/docshdrw.cxx Fri Apr  5 
16:11:20 2013
@@ -73,7 +73,7 @@ void  SwDocShell::InitDraw()
                rOutliner.SetHyphenator( xHyphenator );
        }
        else
-        PutItem( SvxColorTableItem( XColorTable::GetStdColorTable(), 
SID_COLOR_TABLE ));
+        PutItem( SvxColorTableItem( XColorList::GetStdColorList(), 
SID_COLOR_TABLE ));
 }
 
 

Modified: openoffice/branches/sidebar/main/sw/source/ui/app/docshini.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/app/docshini.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/app/docshini.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/app/docshini.cxx Fri Apr  5 
16:11:20 2013
@@ -441,9 +441,9 @@ SwDocShell::SwDocShell( SwDoc *pD, SfxOb
        // wird nur die DocInfo fuer den Explorer gelesen, ist das Item nicht da
        if(pColItem)
        {
-               XColorTable* pTable = pColItem->GetColorTable();
+               XColorList* pTable = pColItem->GetColorTable();
                // wurde eine neue Table angelegt, muss sie auch geloescht 
werden.
-               if((void*)pTable  != (void*)(XColorTable::GetStdColorTable()) )
+               if((void*)pTable  != (void*)(XColorList::GetStdColorList()) )
                        delete pTable;
        }
 

Modified: openoffice/branches/sidebar/main/sw/source/ui/config/optpage.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/config/optpage.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/config/optpage.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/config/optpage.cxx Fri Apr  5 
16:11:20 2013
@@ -2133,7 +2133,7 @@ void SwRedlineOptionsTabPage::Reset( con
        aDeletedColorLB.InsertEntry(sAuthor);
        aChangedColorLB.InsertEntry(sAuthor);
 
-       XColorTable* pColorTbl = XColorTable::GetStdColorTable();
+       XColorList* pColorTbl = XColorList::GetStdColorList();
        sal_uInt16 i;
        for( i = 0; i < pColorTbl->Count(); ++i )
        {

Modified: openoffice/branches/sidebar/main/sw/source/ui/misc/pggrid.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/misc/pggrid.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/misc/pggrid.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/misc/pggrid.cxx Fri Apr  5 
16:11:20 2013
@@ -143,7 +143,7 @@ SwTextGridPage::SwTextGridPage(Window *p
 
     aDisplayCB.SetClickHdl(LINK(this, SwTextGridPage, DisplayGridHdl));
 
-    XColorTable* pColorTbl = XColorTable::GetStdColorTable();
+    XColorList* pColorTbl = XColorList::GetStdColorList();
     aColorLB.InsertAutomaticEntry();
        for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
        {

Modified: openoffice/branches/sidebar/main/sw/source/ui/shells/drawdlg.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/shells/drawdlg.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/shells/drawdlg.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/shells/drawdlg.cxx Fri Apr  5 
16:11:20 2013
@@ -108,7 +108,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest
             DBG_ASSERT(pDlg, "Dialogdiet fail!");
                        const SvxColorTableItem* pColorItem = (const 
SvxColorTableItem*)
                                                                        
GetView().GetDocShell()->GetItem(SID_COLOR_TABLE);
-                       if(pColorItem->GetColorTable() == 
XColorTable::GetStdColorTable())
+                       if(pColorItem->GetColorTable() == 
XColorList::GetStdColorList())
                                pDlg->DontDeleteColorTable();
                        if (pDlg->Execute() == RET_OK)
                        {

Modified: openoffice/branches/sidebar/main/sw/source/ui/shells/drawsh.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/shells/drawsh.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/shells/drawsh.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/shells/drawsh.cxx Fri Apr  5 
16:11:20 2013
@@ -489,7 +489,7 @@ void SwDrawShell::GetFormTextState(SfxIt
        else
        {
                if ( pDlg )
-                       pDlg->SetColorTable(XColorTable::GetStdColorTable());
+                       pDlg->SetColorTable(XColorList::GetStdColorList());
 
                pDrView->GetAttributes( rSet );
        }

Modified: openoffice/branches/sidebar/main/sw/source/ui/shells/drwtxtsh.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/shells/drwtxtsh.cxx?rev=1465024&r1=1465023&r2=1465024&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/shells/drwtxtsh.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/shells/drwtxtsh.cxx Fri Apr  
5 16:11:20 2013
@@ -371,7 +371,7 @@ void SwDrawTextShell::GetFormTextState(S
        else
        {
                if ( pDlg )
-                       pDlg->SetColorTable(XColorTable::GetStdColorTable());
+                       pDlg->SetColorTable(XColorList::GetStdColorList());
 
                pDrView->GetAttributes( rSet );
        }


Reply via email to