openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1478365 - in /openoffice/trunk/main: cui/source/options/ cui/source/tabpages/ svx/inc/svx/ svx/source/dialog/ svx/source/xoutdev/
Date Thu, 02 May 2013 13:22:18 GMT
Author: alg
Date: Thu May  2 13:22:17 2013
New Revision: 1478365

URL: http://svn.apache.org/r1478365
Log:
i122120 Ensured Append/Modify methods in LB implementations always add a UI graphic preview, corrected diag mirror in bitmap pattern

Modified:
    openoffice/trunk/main/cui/source/options/optchart.cxx
    openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx
    openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx
    openoffice/trunk/main/cui/source/tabpages/tpgradnt.cxx
    openoffice/trunk/main/cui/source/tabpages/tphatch.cxx
    openoffice/trunk/main/cui/source/tabpages/tplnedef.cxx
    openoffice/trunk/main/cui/source/tabpages/tplneend.cxx
    openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx
    openoffice/trunk/main/svx/inc/svx/xtable.hxx
    openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx
    openoffice/trunk/main/svx/source/xoutdev/xattrbmp.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabbtmp.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabcolr.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtable.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx

Modified: openoffice/trunk/main/cui/source/options/optchart.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/optchart.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/optchart.cxx (original)
+++ openoffice/trunk/main/cui/source/options/optchart.cxx Thu May  2 13:22:17 2013
@@ -40,7 +40,7 @@ void ChartColorLB::FillBox( const SvxCha
 
 	for( long i = 0; i < nCount; i++ )
 	{
-        Append( const_cast< XColorEntry * >( & rTab[ i ] ));
+        Append( rTab[ i ] );
 	}
 	SetUpdateMode( sal_True );
 }
@@ -217,10 +217,9 @@ IMPL_LINK( SvxDefaultColorOptPage, BoxCl
 	sal_uInt16 nIdx = aLbChartColors.GetSelectEntryPos();
 	if( nIdx != LISTBOX_ENTRY_NOTFOUND )
 	{
-		XColorEntry aEntry( aValSetColorBox.GetItemColor( aValSetColorBox.GetSelectItemId() ),
-                            aLbChartColors.GetSelectEntry() );
+		const XColorEntry aEntry( aValSetColorBox.GetItemColor( aValSetColorBox.GetSelectItemId() ), aLbChartColors.GetSelectEntry() );
 
-		aLbChartColors.Modify( & aEntry, nIdx );
+		aLbChartColors.Modify( aEntry, nIdx );
 		pColorConfig->ReplaceColorByIndex( nIdx, aEntry );
 
         aLbChartColors.SelectEntryPos( nIdx );	// reselect entry

Modified: openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx Thu May  2 13:22:17 2013
@@ -565,8 +565,8 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl
 		if( pWarnBox->Execute() != RET_OK )
 			break;
 	}
-	//Rectangle aDlgRect( pDlg->GetPosPixel(), pDlg->GetSizePixel() );
-	delete pDlg;
+
+    delete pDlg;
 	delete pWarnBox;
 
 	if( !nError )
@@ -597,16 +597,6 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl
 			aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
 			aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
 
-#ifdef WNT
-			// hack: #31355# W.P.
-			Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() );
-			if( sal_True ) {				// ??? overlapped with pDlg
-										// and srolling
-				Invalidate( aRect );
-				//aLbBitmaps.Invalidate();
-			}
-#endif
-
 			// Flag fuer modifiziert setzen
 			*pnBitmapListState |= CT_MODIFIED;
 
@@ -692,8 +682,8 @@ IMPL_LINK( SvxBitmapTabPage, ClickImport
 				if( pWarnBox->Execute() != RET_OK )
 					break;
 			}
-			//Rectangle aDlgRect( pDlg->GetPosPixel(), pDlg->GetSizePixel() );
-			delete pDlg;
+
+            delete pDlg;
 			delete pWarnBox;
 
 			if( !nError )
@@ -705,16 +695,6 @@ IMPL_LINK( SvxBitmapTabPage, ClickImport
                 aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
 				aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
 
-#ifdef WNT
-				// hack: #31355# W.P.
-				Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() );
-				if( sal_True ) {				// ??? overlapped with pDlg
-											// and srolling
-					Invalidate( aRect );
-					//aLbBitmaps.Invalidate();
-				}
-#endif
-
 				// Flag fuer modifiziert setzen
 				*pnBitmapListState |= CT_MODIFIED;
 
@@ -774,15 +754,11 @@ IMPL_LINK( SvxBitmapTabPage, ClickModify
 			if( bDifferent )
 			{
 				bLoop = sal_False;
-                XBitmapEntry* pEntry = maBitmapList->GetBitmap( nPos );
-
-				pEntry->SetName( aName );
 
 				const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
+                const XBitmapEntry aEntry(Graphic(aBitmapEx), aName);
 
-				pEntry->SetGraphicObject(Graphic(aBitmapEx));
-
-				aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry, nPos );
+				aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), aEntry, nPos );
 				aLbBitmaps.SelectEntryPos( nPos );
 
 				// Flag fuer modifiziert setzen

Modified: openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tpcolor.cxx Thu May  2 13:22:17 2013
@@ -548,9 +548,8 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_
 
 		maColorTab->Insert( pEntry, maColorTab->Count() );
 
-		aLbColor.Append( pEntry );
-		aValSetColorTable.InsertItem( aValSetColorTable.GetItemCount() + 1,
-				pEntry->GetColor(), pEntry->GetName() );
+		aLbColor.Append( *pEntry );
+		aValSetColorTable.InsertItem( aValSetColorTable.GetItemCount() + 1, pEntry->GetColor(), pEntry->GetName() );
         ImpColorCountChanged();
 
 		aLbColor.SelectEntryPos( aLbColor.GetEntryCount() - 1 );
@@ -627,20 +626,18 @@ IMPL_LINK( SvxColorTabPage, ClickModifyH
 		// Wenn nicht vorhanden, wird Eintrag aufgenommen
 		if( bDifferent )
 		{
-            XColorEntry* pEntry = maColorTab->GetColor( nPos );
-
 			Color aTmpColor (aAktuellColor);
-			if (eCM != CM_RGB)
+
+            if (eCM != CM_RGB)
 				ConvertColorValues (aTmpColor, CM_RGB);
 
-			pEntry->SetColor( aTmpColor );
-			pEntry->SetName( aName );
+            const XColorEntry aEntry(aTmpColor, aName);
 
-			aLbColor.Modify( pEntry, nPos );
+            aLbColor.Modify( aEntry, nPos );
 			aLbColor.SelectEntryPos( nPos );
-			/////
-			aValSetColorTable.SetItemColor( nPos + 1, pEntry->GetColor() );
-			aValSetColorTable.SetItemText( nPos + 1, pEntry->GetName() );
+
+            aValSetColorTable.SetItemColor( nPos + 1, aEntry.GetColor() );
+			aValSetColorTable.SetItemText( nPos + 1, aEntry.GetName() );
 			aEdtName.SetText( aName );
 
 			aCtlPreviewOld.Invalidate();

Modified: openoffice/trunk/main/cui/source/tabpages/tpgradnt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tpgradnt.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tpgradnt.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tpgradnt.cxx Thu May  2 13:22:17 2013
@@ -513,7 +513,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddH
 
 		maGradientList->Insert( pEntry, nCount );
 
-		aLbGradients.Append( pEntry );
+		aLbGradients.Append( *pEntry, maGradientList->GetUiBitmap( nCount ) );
 
 		aLbGradients.SelectEntryPos( aLbGradients.GetEntryCount() - 1 );
 
@@ -595,7 +595,7 @@ IMPL_LINK( SvxGradientTabPage, ClickModi
 
 				delete maGradientList->Replace( pEntry, nPos );
 
-				aLbGradients.Modify( pEntry, nPos );
+				aLbGradients.Modify( *pEntry, nPos, maGradientList->GetUiBitmap( nPos ) );
 
 				aLbGradients.SelectEntryPos( nPos );
 

Modified: openoffice/trunk/main/cui/source/tabpages/tphatch.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tphatch.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tphatch.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tphatch.cxx Thu May  2 13:22:17 2013
@@ -572,7 +572,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_
 
 		maHatchingList->Insert( pEntry, nCount );
 
-		aLbHatchings.Append( pEntry );
+		aLbHatchings.Append( *pEntry, maHatchingList->GetUiBitmap( nCount ) );
 
 		aLbHatchings.SelectEntryPos( aLbHatchings.GetEntryCount() - 1 );
 
@@ -648,7 +648,7 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyH
 
 				delete maHatchingList->Replace( pEntry, nPos );
 
-				aLbHatchings.Modify( pEntry, nPos );
+				aLbHatchings.Modify( *pEntry, nPos, maHatchingList->GetUiBitmap( nPos ) );
 
 				aLbHatchings.SelectEntryPos( nPos );
 

Modified: openoffice/trunk/main/cui/source/tabpages/tplnedef.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tplnedef.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tplnedef.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tplnedef.cxx Thu May  2 13:22:17 2013
@@ -631,8 +631,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHd
 
             long nDashCount = maDashList.get() ? maDashList->Count() : 0;
             maDashList->Insert( pEntry, nDashCount );
-            const Bitmap aBitmap = maDashList->GetUiBitmap( nDashCount );
-			aLbLineStyles.Append( pEntry, &aBitmap );
+			aLbLineStyles.Append( *pEntry, maDashList->GetUiBitmap( nDashCount ) );
 
 			aLbLineStyles.SelectEntryPos( aLbLineStyles.GetEntryCount() - 1 );
 
@@ -712,8 +711,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickModif
 				XDashEntry* pEntry = new XDashEntry( aDash, aName );
 
 				delete maDashList->Replace( pEntry, nPos );
-				const Bitmap aBitmap = maDashList->GetUiBitmap( nPos );
-				aLbLineStyles.Modify( pEntry, nPos, &aBitmap );
+				aLbLineStyles.Modify( *pEntry, nPos, maDashList->GetUiBitmap( nPos ) );
 
 				aLbLineStyles.SelectEntryPos( nPos );
 

Modified: openoffice/trunk/main/cui/source/tabpages/tplneend.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tplneend.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tplneend.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tplneend.cxx Thu May  2 13:22:17 2013
@@ -402,13 +402,13 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickMo
         // Wenn nicht vorhanden, wird Eintrag aufgenommen
         if( bDifferent )
         {
-            XLineEndEntry* pEntry = maLineEndList->GetLineEnd( nPos );
+            const XLineEndEntry* pEntry = maLineEndList->GetLineEnd( nPos );
 
-            pEntry->SetName( aName );
             aEdtName.SetText( aName );
 
-            const Bitmap aUiBitmap( maLineEndList->GetUiBitmap( nPos ) );
-            aLbLineEnds.Modify( pEntry, nPos, &aUiBitmap );
+            const XLineEndEntry aEntry(pEntry->GetLineEnd(), aName);
+            
+            aLbLineEnds.Modify( aEntry, nPos, maLineEndList->GetUiBitmap( nPos ) );
             aLbLineEnds.SelectEntryPos( nPos );
 
             // Flag fuer modifiziert setzen
@@ -506,10 +506,9 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAd
 
                 long nLineEndCount = maLineEndList.get() ? maLineEndList->Count() : 0;
                 maLineEndList->Insert( pEntry, nLineEndCount );
-                const Bitmap aBitmap = maLineEndList->GetUiBitmap( nLineEndCount );
 
 				// Zur ListBox hinzufuegen
-				aLbLineEnds.Append( pEntry, &aBitmap );
+				aLbLineEnds.Append( *pEntry, maLineEndList->GetUiBitmap( nLineEndCount ) );
 				aLbLineEnds.SelectEntryPos( aLbLineEnds.GetEntryCount() - 1 );
 
 				// Flag fuer modifiziert setzen

Modified: openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx Thu May  2 13:22:17 2013
@@ -260,8 +260,8 @@ public:
 
 	virtual void Fill( const XColorListSharedPtr aTab );
 
-	void Append( XColorEntry* pEntry, Bitmap* pBmp = NULL );
-	void Modify( XColorEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
+	void Append( const XColorEntry& rEntry );
+	void Modify( const XColorEntry& rEntry, sal_uInt16 nPos );
 };
 
 /*************************************************************************
@@ -281,8 +281,8 @@ public:
 
 	virtual void Fill( const XHatchListSharedPtr aList );
 
-	void	Append( XHatchEntry* pEntry, Bitmap* pBmp = NULL );
-	void	Modify( XHatchEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
+	void	Append( const XHatchEntry& rEntry, const Bitmap& rBitmap );
+	void	Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
 	void	SelectEntryByList( const XHatchListSharedPtr aList, const String& rStr, const XHatch& rXHatch, sal_uInt16 nDist = 0 );
 };
 
@@ -303,8 +303,8 @@ public:
 
 	virtual void Fill( const XGradientListSharedPtr aList );
 
-	void	Append( XGradientEntry* pEntry, Bitmap* pBmp = NULL );
-	void	Modify( XGradientEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
+	void	Append( const XGradientEntry& rEntry, const Bitmap& rBitmap );
+	void	Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
 	void	SelectEntryByList( const XGradientListSharedPtr aList, const String& rStr, const XGradient& rXGradient, sal_uInt16 nDist = 0 );
 
 private:
@@ -327,8 +327,8 @@ public:
 
 	virtual void Fill(const XBitmapListSharedPtr aList);
 
-	void Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx = 0);
-	void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = 0);
+	void Append(const Size& rSize, const XBitmapEntry& rEntry);
+	void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos);
 	void SelectEntryByList(const XBitmapListSharedPtr aList, const String& rStr);
 
 private:
@@ -398,8 +398,8 @@ public:
     bool getAddStandardFields() const { return mbAddStandardFields; }
     void setAddStandardFields(bool bNew);
 
-    void Append(XDashEntry* pEntry, const Bitmap* pBmp = 0);
-    void Modify(XDashEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = 0);
+    void Append(const XDashEntry& rEntry, const Bitmap& rBitmap );
+    void Modify(const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
     void SelectEntryByList(const XDashListSharedPtr aList, const String& rStr, const XDash& rDash, sal_uInt16 nDist = 0);
 };
 
@@ -420,12 +420,10 @@ public:
                           LineEndLB( Window* pParent, WinBits aWB );
                  virtual ~LineEndLB (void);
                  
-	virtual void Fill( const XLineEndListSharedPtr aList, sal_Bool bStart = sal_True );
+	virtual void Fill( const XLineEndListSharedPtr aList, bool bStart = true );
 
-	void	Append( XLineEndEntry* pEntry, const Bitmap* pBmp = NULL,
-					sal_Bool bStart = sal_True );
-	void	Modify( XLineEndEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = NULL,
-					sal_Bool bStart = sal_True );
+	void	Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart = true );
+	void	Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart = true );
 };
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/trunk/main/svx/inc/svx/xtable.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/xtable.hxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/xtable.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/xtable.hxx Thu May  2 13:22:17 2013
@@ -41,130 +41,109 @@ SVX_DLLPUBLIC Color RGB_Color( ColorData
 //////////////////////////////////////////////////////////////////////////////
 // class XColorEntry
 
-class XColorEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XColorEntry : public XPropertyEntry
 {
-	Color   aColor;
+private:
+    Color   aColor;
 
 public:
-			XColorEntry(const Color& rColor, const String& rName) :
-				XPropertyEntry(rName), aColor(rColor) {}
-			XColorEntry(const XColorEntry& rOther) :
-				XPropertyEntry(rOther), aColor(rOther.aColor) {}
+    XColorEntry(const Color& rColor, const String& rName);
+    XColorEntry(const XColorEntry& rOther);
 
-	void SetColor(const Color& rColor) { aColor = rColor; }
-	const Color& GetColor() const { return aColor; }
+    const Color& GetColor() const 
+    { 
+        return aColor; 
+    }
 };
 
 //////////////////////////////////////////////////////////////////////////////
 // class XLineEndEntry
 
-class XLineEndEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XLineEndEntry : public XPropertyEntry
 {
-	basegfx::B2DPolyPolygon	aB2DPolyPolygon;
+private:
+    basegfx::B2DPolyPolygon	aB2DPolyPolygon;
 
 public:
-	XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName) 
-	:	XPropertyEntry(rName), 
-		aB2DPolyPolygon(rB2DPolyPolygon) 
-	{}
-
-	XLineEndEntry(const XLineEndEntry& rOther) 
-	:	XPropertyEntry(rOther), 
-		aB2DPolyPolygon(rOther.aB2DPolyPolygon) 
-	{}
-
-	void SetLineEnd(const basegfx::B2DPolyPolygon& rB2DPolyPolygon) 
-	{ 
-		aB2DPolyPolygon = rB2DPolyPolygon; 
-	}
-
-	const basegfx::B2DPolyPolygon& GetLineEnd() const
-	{ 
-		return aB2DPolyPolygon; 
-	}
+    XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName);
+    XLineEndEntry(const XLineEndEntry& rOther);
+
+    const basegfx::B2DPolyPolygon& GetLineEnd() const
+    { 
+        return aB2DPolyPolygon; 
+    }
 };
 
 //////////////////////////////////////////////////////////////////////////////
 // class XDashEntry
 
-class XDashEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XDashEntry : public XPropertyEntry
 {
-	XDash   aDash;
+private:
+    XDash   aDash;
 
 public:
-			XDashEntry(const XDash& rDash, const String& rName) :
-				XPropertyEntry(rName), aDash(rDash) {}
-			XDashEntry(const XDashEntry& rOther) :
-				XPropertyEntry(rOther), aDash(rOther.aDash) {}
+    XDashEntry(const XDash& rDash, const String& rName);
+    XDashEntry(const XDashEntry& rOther);
 
-	void SetDash(const XDash& rDash) { aDash = rDash; }
-	const XDash& GetDash() const { return aDash; }
+    const XDash& GetDash() const 
+    { 
+        return aDash; 
+    }
 };
 
 //////////////////////////////////////////////////////////////////////////////
 // class XHatchEntry
 
-class XHatchEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XHatchEntry : public XPropertyEntry
 {
-	XHatch  aHatch;
+private:
+    XHatch  aHatch;
 
 public:
-			XHatchEntry(const XHatch& rHatch, const String& rName) :
-				XPropertyEntry(rName), aHatch(rHatch) {}
-			XHatchEntry(const XHatchEntry& rOther) :
-				XPropertyEntry(rOther), aHatch(rOther.aHatch) {}
+    XHatchEntry(const XHatch& rHatch, const String& rName);
+    XHatchEntry(const XHatchEntry& rOther);
 
-	void SetHatch(const XHatch& rHatch) { aHatch = rHatch; }
-	const XHatch& GetHatch() const { return aHatch; }
+    const XHatch& GetHatch() const 
+    { 
+        return aHatch; 
+    }
 };
 
 //////////////////////////////////////////////////////////////////////////////
 // class XGradientEntry
 
-class XGradientEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XGradientEntry : public XPropertyEntry
 {
-	XGradient  aGradient;
+private:
+    XGradient  aGradient;
 
 public:
-				XGradientEntry(const XGradient& rGradient, const String& rName):
-					XPropertyEntry(rName), aGradient(rGradient) {}
-				XGradientEntry(const XGradientEntry& rOther) :
-					XPropertyEntry(rOther), aGradient(rOther.aGradient) {}
+    XGradientEntry(const XGradient& rGradient, const String& rName);
+    XGradientEntry(const XGradientEntry& rOther);
 
-	void SetGradient(const XGradient& rGrad) { aGradient = rGrad; }
-	const XGradient& GetGradient() const { return aGradient; }
+    const XGradient& GetGradient() const 
+    { 
+        return aGradient; 
+    }
 };
 
 //////////////////////////////////////////////////////////////////////////////
 // class XBitmapEntry
 
-class XBitmapEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XBitmapEntry : public XPropertyEntry
 {
 private:
-	GraphicObject   maGraphicObject;
+    GraphicObject   maGraphicObject;
 
 public:
-	XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName)
-    :   XPropertyEntry(rName), 
-        maGraphicObject(rGraphicObject) 
-    {
-    }
-
-    XBitmapEntry(const XBitmapEntry& rOther) 
-    :   XPropertyEntry(rOther), 
-        maGraphicObject(rOther.maGraphicObject) 
-    {
-    }
+    XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName);
+    XBitmapEntry(const XBitmapEntry& rOther);
 
     const GraphicObject& GetGraphicObject() const
     {
         return maGraphicObject;
     }
-
-    void SetGraphicObject(const GraphicObject& rGraphicObject)
-    {
-        maGraphicObject = rGraphicObject;
-    }
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -174,40 +153,42 @@ class SVX_DLLPUBLIC XPropertyList
 {
 protected:
     String              maName; // nicht persistent !
-	String              maPath;
+    String              maPath;
 
     ::std::vector< XPropertyEntry* >    maContent;
 
     /// bitfield
-	bool                mbListDirty : 1;
+    bool                mbListDirty : 1;
 
-    XPropertyList( const String& rPath );
-	void                Clear();
-	virtual Bitmap      CreateBitmapForUI( long nIndex ) = 0;
+    XPropertyList(const String& rPath);
+    void Clear();
+    virtual Bitmap CreateBitmapForUI(long nIndex) = 0;
 
 public:
-	virtual				~XPropertyList();
+    virtual ~XPropertyList();
+
+    long Count() const;
+
+    void Insert(XPropertyEntry* pEntry, long nIndex = LIST_APPEND);
+    XPropertyEntry* Replace(XPropertyEntry* pEntry, long nIndex);
+    XPropertyEntry* Remove(long nIndex);
+    XPropertyEntry* Get(long nIndex) const;
 
-	long                Count() const;
+    long GetIndex(const String& rName) const;
+    Bitmap GetUiBitmap(long nIndex) const;
 
-	void                Insert( XPropertyEntry* pEntry, long nIndex = LIST_APPEND );
-	XPropertyEntry*     Replace( XPropertyEntry* pEntry, long nIndex );
-	XPropertyEntry*     Remove( long nIndex );
-	XPropertyEntry*     Get( long nIndex ) const;
+    const String& GetName() const { return maName; }
+    void SetName( const String& rString );
 
-	long                GetIndex(const String& rName) const;
-	Bitmap              GetUiBitmap( long nIndex ) const;
+    const String& GetPath() const { return maPath; }
+    void SetPath( const String& rString ) { maPath = rString; }
 
-	const String&       GetName() const { return maName; }
-	void                SetName( const String& rString );
-	const String&       GetPath() const { return maPath; }
-	void                SetPath( const String& rString ) { maPath = rString; }
-    bool                IsDirty() const { return mbListDirty; }
-	void                SetDirty( bool bDirty = true ) { mbListDirty = bDirty; }
+    bool IsDirty() const { return mbListDirty; }
+    void SetDirty( bool bDirty = true ) { mbListDirty = bDirty; }
 
-	virtual sal_Bool        Load() = 0;
-	virtual sal_Bool        Save() = 0;
-	virtual sal_Bool        Create() = 0;
+    virtual bool Load() = 0;
+    virtual bool Save() = 0;
+    virtual bool Create() = 0;
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -251,25 +232,25 @@ class SVX_DLLPUBLIC XColorList : public 
 {
 private:
     friend class XPropertyListFactory;
-    XColorList( const String& rPath );
+    XColorList(const String& rPath);
 
 protected:
-	virtual Bitmap  CreateBitmapForUI( long nIndex );
+    virtual Bitmap  CreateBitmapForUI(long nIndex);
 
 public:
-	virtual			~XColorList();
+    virtual ~XColorList();
 
-	using XPropertyList::Replace;
-	XColorEntry*    Replace(XColorEntry* pEntry, long nIndex );
-	using XPropertyList::Remove;
-	XColorEntry*    Remove(long nIndex);
-	XColorEntry*    GetColor(long nIndex) const;
+    using XPropertyList::Replace;
+    XColorEntry* Replace(XColorEntry* pEntry, long nIndex );
+    using XPropertyList::Remove;
+    XColorEntry* Remove(long nIndex);
+    XColorEntry* GetColor(long nIndex) const;
 
-	virtual sal_Bool    Load();
-	virtual sal_Bool    Save();
-	virtual sal_Bool    Create();
+    virtual bool Load();
+    virtual bool Save();
+    virtual bool Create();
 
-	static XColorListSharedPtr GetStdColorList();
+    static XColorListSharedPtr GetStdColorList();
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -279,23 +260,23 @@ class SVX_DLLPUBLIC XLineEndList : publi
 {
 private:
     friend class XPropertyListFactory;
-    XLineEndList(const String& rPath );
+    XLineEndList(const String& rPath);
 
 protected:
-	virtual Bitmap CreateBitmapForUI(long nIndex);
+    virtual Bitmap CreateBitmapForUI(long nIndex);
 
 public:
-	virtual ~XLineEndList();
+    virtual ~XLineEndList();
 
-	using XPropertyList::Replace;
-	XLineEndEntry* Replace(XLineEndEntry* pEntry, long nIndex);
-	using XPropertyList::Remove;
-	XLineEndEntry* Remove(long nIndex);
-	XLineEndEntry* GetLineEnd(long nIndex) const;
+    using XPropertyList::Replace;
+    XLineEndEntry* Replace(XLineEndEntry* pEntry, long nIndex);
+    using XPropertyList::Remove;
+    XLineEndEntry* Remove(long nIndex);
+    XLineEndEntry* GetLineEnd(long nIndex) const;
 
-	virtual sal_Bool Load();
-	virtual sal_Bool Save();
-	virtual sal_Bool Create();
+    virtual bool Load();
+    virtual bool Save();
+    virtual bool Create();
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -305,7 +286,7 @@ class SVX_DLLPUBLIC XDashList : public X
 {
 private:
     friend class XPropertyListFactory;
-    XDashList(const String& rPath );
+    XDashList(const String& rPath);
 
     Bitmap              maBitmapSolidLine;
     String              maStringSolidLine;
@@ -313,20 +294,20 @@ private:
 
 protected:
     Bitmap ImpCreateBitmapForXDash(const XDash* pDash);
-	virtual Bitmap CreateBitmapForUI(long nIndex);
+    virtual Bitmap CreateBitmapForUI(long nIndex);
 
 public:
-	virtual ~XDashList();
+    virtual ~XDashList();
 
-	using XPropertyList::Replace;
-	XDashEntry* Replace(XDashEntry* pEntry, long nIndex);
-	using XPropertyList::Remove;
-	XDashEntry* Remove(long nIndex);
-	XDashEntry* GetDash(long nIndex) const;
+    using XPropertyList::Replace;
+    XDashEntry* Replace(XDashEntry* pEntry, long nIndex);
+    using XPropertyList::Remove;
+    XDashEntry* Remove(long nIndex);
+    XDashEntry* GetDash(long nIndex) const;
 
-	virtual sal_Bool Load();
-	virtual sal_Bool Save();
-	virtual sal_Bool Create();
+    virtual bool Load();
+    virtual bool Save();
+    virtual bool Create();
 
     // Special call to get a bitmap for the solid line representation. It
     // creates a bitmap fitting in size and style to the ones you get by
@@ -346,23 +327,23 @@ class SVX_DLLPUBLIC XHatchList : public 
 {
 private:
     friend class XPropertyListFactory;
-    XHatchList(const String& rPath );
+    XHatchList(const String& rPath);
 
 protected:
-	virtual Bitmap CreateBitmapForUI(long nIndex);
+    virtual Bitmap CreateBitmapForUI(long nIndex);
 
 public:
-	~XHatchList();
+    ~XHatchList();
 
-	using XPropertyList::Replace;
-	XHatchEntry* Replace(XHatchEntry* pEntry, long nIndex);
-	using XPropertyList::Remove;
-	XHatchEntry* Remove(long nIndex);
-	XHatchEntry* GetHatch(long nIndex) const;
+    using XPropertyList::Replace;
+    XHatchEntry* Replace(XHatchEntry* pEntry, long nIndex);
+    using XPropertyList::Remove;
+    XHatchEntry* Remove(long nIndex);
+    XHatchEntry* GetHatch(long nIndex) const;
 
-	virtual sal_Bool Load();
-	virtual sal_Bool Save();
-	virtual sal_Bool Create();
+    virtual bool Load();
+    virtual bool Save();
+    virtual bool Create();
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -372,23 +353,23 @@ class SVX_DLLPUBLIC XGradientList : publ
 {
 private:
     friend class XPropertyListFactory;
-    XGradientList(const String& rPath );
+    XGradientList(const String& rPath);
 
 protected:
-	virtual Bitmap CreateBitmapForUI(long nIndex);
+    virtual Bitmap CreateBitmapForUI(long nIndex);
 
 public:
-	virtual ~XGradientList();
+    virtual ~XGradientList();
 
-	using XPropertyList::Replace;
-	XGradientEntry* Replace(XGradientEntry* pEntry, long nIndex);
-	using XPropertyList::Remove;
-	XGradientEntry* Remove(long nIndex);
-	XGradientEntry* GetGradient(long nIndex) const;
+    using XPropertyList::Replace;
+    XGradientEntry* Replace(XGradientEntry* pEntry, long nIndex);
+    using XPropertyList::Remove;
+    XGradientEntry* Remove(long nIndex);
+    XGradientEntry* GetGradient(long nIndex) const;
 
-	virtual sal_Bool Load();
-	virtual sal_Bool Save();
-	virtual sal_Bool Create();
+    virtual bool Load();
+    virtual bool Save();
+    virtual bool Create();
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -398,23 +379,23 @@ class SVX_DLLPUBLIC XBitmapList : public
 {
 private:
     friend class XPropertyListFactory;
-    XBitmapList( const String& rPath );
+    XBitmapList(const String& rPath);
 
 protected:
-	virtual Bitmap CreateBitmapForUI( long nIndex );
+    virtual Bitmap CreateBitmapForUI( long nIndex );
 
 public:
-	virtual			~XBitmapList();
+    virtual ~XBitmapList();
 
-	using XPropertyList::Replace;
-	XBitmapEntry*   Replace(XBitmapEntry* pEntry, long nIndex );
-	using XPropertyList::Remove;
-	XBitmapEntry*   Remove(long nIndex);
-	XBitmapEntry*   GetBitmap(long nIndex) const;
+    using XPropertyList::Replace;
+    XBitmapEntry* Replace(XBitmapEntry* pEntry, long nIndex );
+    using XPropertyList::Remove;
+    XBitmapEntry* Remove(long nIndex);
+    XBitmapEntry* GetBitmap(long nIndex) const;
 
-	virtual sal_Bool    Load();
-	virtual sal_Bool    Save();
-	virtual sal_Bool    Create();
+    virtual bool Load();
+    virtual bool Save();
+    virtual bool Create();
 };
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx (original)
+++ openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx Thu May  2 13:22:17 2013
@@ -1112,18 +1112,18 @@ void ColorLB::Fill( const XColorListShar
 
 /************************************************************************/
 
-void ColorLB::Append( XColorEntry* pEntry, Bitmap* )
+void ColorLB::Append( const XColorEntry& rEntry )
 {
-	InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+    InsertEntry( rEntry.GetColor(), rEntry.GetName() );
     AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
 
-void ColorLB::Modify( XColorEntry* pEntry, sal_uInt16 nPos, Bitmap*  )
+void ColorLB::Modify( const XColorEntry& rEntry, sal_uInt16 nPos )
 {
-	RemoveEntry( nPos );
-	InsertEntry( pEntry->GetColor(), pEntry->GetName(), nPos );
+    RemoveEntry( nPos );
+    InsertEntry( rEntry.GetColor(), rEntry.GetName(), nPos );
 }
 
 /*************************************************************************
@@ -1189,25 +1189,34 @@ void HatchingLB::Fill( const XHatchListS
 
 /************************************************************************/
 
-void HatchingLB::Append( XHatchEntry* pEntry, Bitmap* pBmp )
+void HatchingLB::Append( const XHatchEntry& rEntry, const Bitmap& rBitmap )
 {
-	if( pBmp )
-		InsertEntry( pEntry->GetName(), *pBmp );
-	else
-		InsertEntry( pEntry->GetName() );
+    if(!rBitmap.IsEmpty())
+    {
+        InsertEntry( rEntry.GetName(), rBitmap );
+    }
+    else
+    {
+        InsertEntry( rEntry.GetName() );
+    }
+
     AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
 
-void HatchingLB::Modify( XHatchEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp )
+void HatchingLB::Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
 {
-	RemoveEntry( nPos );
+    RemoveEntry( nPos );
 
-	if( pBmp )
-		InsertEntry( pEntry->GetName(), *pBmp, nPos );
-	else
-		InsertEntry( pEntry->GetName(), nPos );
+    if( !rBitmap.IsEmpty() )
+    {
+        InsertEntry( rEntry.GetName(), rBitmap, nPos );
+    }
+    else
+    {
+        InsertEntry( rEntry.GetName(), nPos );
+    }
 }
 
 /************************************************************************/
@@ -1300,25 +1309,34 @@ void GradientLB::Fill( const XGradientLi
 
 /************************************************************************/
 
-void GradientLB::Append( XGradientEntry* pEntry, Bitmap* pBmp )
+void GradientLB::Append( const XGradientEntry& rEntry, const Bitmap& rBitmap )
 {
-	if( pBmp )
-		InsertEntry( pEntry->GetName(), *pBmp );
-	else
-		InsertEntry( pEntry->GetName() );
+    if(!rBitmap.IsEmpty())
+    {
+        InsertEntry( rEntry.GetName(), rBitmap );
+    }
+    else
+    {
+        InsertEntry( rEntry.GetName() );
+    }
+
     AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
 
-void GradientLB::Modify( XGradientEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp )
+void GradientLB::Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
 {
-	RemoveEntry( nPos );
+    RemoveEntry( nPos );
 
-	if( pBmp )
-		InsertEntry( pEntry->GetName(), *pBmp, nPos );
-	else
-		InsertEntry( pEntry->GetName(), nPos );
+    if(!rBitmap.IsEmpty())
+    {
+        InsertEntry( rEntry.GetName(), rBitmap, nPos );
+    }
+    else
+    {
+        InsertEntry( rEntry.GetName(), nPos );
+    }
 }
 
 /************************************************************************/
@@ -1466,17 +1484,18 @@ void BitmapLB::Fill(const XBitmapListSha
 
 /************************************************************************/
 
-void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx)
+void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry)
 {
-	if(pBmpEx)
-	{
-		maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
+    maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
+
+    if(!maBitmapEx.IsEmpty())
+    {
         formatBitmapExToSize(maBitmapEx, rSize);
-		InsertEntry(rEntry.GetName(), maBitmapEx);
-	}
-	else
+        InsertEntry(rEntry.GetName(), maBitmapEx);
+    }
+    else
     {
-		InsertEntry(rEntry.GetName());
+        InsertEntry(rEntry.GetName());
     }
 
     AdaptDropDownLineCountToMaximum();
@@ -1484,19 +1503,19 @@ void BitmapLB::Append(const Size& rSize,
 
 /************************************************************************/
 
-void BitmapLB::Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos, BitmapEx* pBmpEx)
+void BitmapLB::Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos)
 {
-	RemoveEntry(nPos);
+    RemoveEntry(nPos);
+    maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
 
-	if(pBmpEx)
-	{
-		maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
+    if(!maBitmapEx.IsEmpty())
+    {
         formatBitmapExToSize(maBitmapEx, rSize);
-		InsertEntry(rEntry.GetName(), maBitmapEx, nPos);
-	}
-	else
+        InsertEntry(rEntry.GetName(), maBitmapEx, nPos);
+    }
+    else
     {
-		InsertEntry(rEntry.GetName());
+        InsertEntry(rEntry.GetName());
     }
 }
 
@@ -1682,25 +1701,34 @@ void LineLB::Fill( const XDashListShared
 
 /************************************************************************/
 
-void LineLB::Append( XDashEntry* pEntry, const Bitmap* pBmp )
+void LineLB::Append( const XDashEntry& rEntry, const Bitmap& rBitmap )
 {
-	if( pBmp )
-		InsertEntry( pEntry->GetName(), *pBmp );
-	else
-		InsertEntry( pEntry->GetName() );
+    if(!rBitmap.IsEmpty())
+    {
+        InsertEntry( rEntry.GetName(), rBitmap );
+    }
+    else
+    {
+        InsertEntry( rEntry.GetName() );
+    }
+
     AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
 
-void LineLB::Modify( XDashEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp )
+void LineLB::Modify( const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
 {
-	RemoveEntry( nPos );
+    RemoveEntry( nPos );
 
-	if( pBmp )
-		InsertEntry( pEntry->GetName(), *pBmp, nPos );
-	else
-		InsertEntry( pEntry->GetName(), nPos );
+    if(!rBitmap.IsEmpty())
+    {
+        InsertEntry( rEntry.GetName(), rBitmap, nPos );
+    }
+    else
+    {
+        InsertEntry( rEntry.GetName(), nPos );
+    }
 }
 
 /************************************************************************/
@@ -1750,7 +1778,7 @@ LineEndLB::~LineEndLB(void)
 }
 
 
-void LineEndLB::Fill( const XLineEndListSharedPtr aList, sal_Bool bStart )
+void LineEndLB::Fill( const XLineEndListSharedPtr aList, bool bStart )
 {
 	long nCount = aList.get() ? aList->Count() : 0;
 	XLineEndEntry* pEntry;
@@ -1781,43 +1809,49 @@ void LineEndLB::Fill( const XLineEndList
 
 /************************************************************************/
 
-void LineEndLB::Append( XLineEndEntry* pEntry, const Bitmap* pBmp, sal_Bool bStart )
+void LineEndLB::Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart )
 {
-	if( pBmp )
-	{
-		VirtualDevice aVD;
-		Size aBmpSize( pBmp->GetSizePixel() );
+    if(!rBitmap.IsEmpty())
+    {
+        VirtualDevice aVD;
+        const Size aBmpSize(rBitmap.GetSizePixel());
+
+        aVD.SetOutputSizePixel(aBmpSize, false);
+        aVD.DrawBitmap(Point(), rBitmap);
+        InsertEntry(
+            rEntry.GetName(),
+            aVD.GetBitmap(bStart ? Point() : Point(aBmpSize.Width() / 2, 0 ), Size(aBmpSize.Width() / 2, aBmpSize.Height())));
+    }
+    else
+    {
+        InsertEntry(rEntry.GetName());
+    }
 
-		aVD.SetOutputSizePixel( aBmpSize, sal_False );
-		aVD.DrawBitmap( Point(), *pBmp );
-		InsertEntry( pEntry->GetName(),
-			aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
-				Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ) );
-	}
-	else
-		InsertEntry( pEntry->GetName() );
     AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
 
-void LineEndLB::Modify( XLineEndEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp, sal_Bool bStart )
+void LineEndLB::Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart )
 {
-	RemoveEntry( nPos );
+    RemoveEntry( nPos );
 
-	if( pBmp )
-	{
-		VirtualDevice aVD;
-		Size aBmpSize( pBmp->GetSizePixel() );
+    if(!rBitmap.IsEmpty())
+    {
+        VirtualDevice aVD;
+        const Size aBmpSize(rBitmap.GetSizePixel());
 
-		aVD.SetOutputSizePixel( aBmpSize, sal_False );
-		aVD.DrawBitmap( Point(), *pBmp );
-		InsertEntry( pEntry->GetName(),
-			aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
-				Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ), nPos );
-	}
-	else
-		InsertEntry( pEntry->GetName(), nPos );
+        aVD.SetOutputSizePixel(aBmpSize, false);
+        aVD.DrawBitmap(Point(), rBitmap);
+        InsertEntry( 
+            rEntry.GetName(),
+            aVD.GetBitmap(bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ), Size( aBmpSize.Width() / 2, aBmpSize.Height())), 
+            nPos);
+    }
+    else
+    {
+        InsertEntry(rEntry.GetName(), nPos);
+    }
 }
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/trunk/main/svx/source/xoutdev/xattrbmp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xattrbmp.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xattrbmp.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xattrbmp.cxx Thu May  2 13:22:17 2013
@@ -95,11 +95,11 @@ Bitmap createHistorical8x8FromArray(cons
             {
                 if(pArray[(a * 8) + b])
                 {
-                    pContent->SetPixelIndex(b, a, 1);
+                    pContent->SetPixelIndex(a, b, 1);
                 }
                 else
                 {
-                    pContent->SetPixelIndex(b, a, 0);
+                    pContent->SetPixelIndex(a, b, 0);
                 }
             }
         }

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabbtmp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabbtmp.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabbtmp.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabbtmp.cxx Thu May  2 13:22:17 2013
@@ -87,7 +87,7 @@ XBitmapEntry* XBitmapList::GetBitmap(lon
 
 /************************************************************************/
 
-sal_Bool XBitmapList::Load()
+bool XBitmapList::Load()
 {
 	if( mbListDirty )
 	{
@@ -98,7 +98,7 @@ sal_Bool XBitmapList::Load()
 		if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 		{
 			DBG_ASSERT( !maPath.Len(), "invalid URL" );
-			return sal_False;
+			return false;
 		}
 
 		aURL.Append( maName );
@@ -109,19 +109,20 @@ sal_Bool XBitmapList::Load()
 		uno::Reference< container::XNameContainer > xTable( SvxUnoXBitmapTable_createInstance( this ), uno::UNO_QUERY );
 		return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 	}
-	return( sal_False );
+
+    return false;
 }
 
 /************************************************************************/
 
-sal_Bool XBitmapList::Save()
+bool XBitmapList::Save()
 {
 	INetURLObject aURL( maPath );
 
 	if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 	{
 		DBG_ASSERT( !maPath.Len(), "invalid URL" );
-		return sal_False;
+		return false;
 	}
 
 	aURL.Append( maName );
@@ -136,17 +137,8 @@ sal_Bool XBitmapList::Save()
 /************************************************************************/
 // Umgestellt am 27.07.95 auf XBitmap
 
-sal_Bool XBitmapList::Create()
+bool XBitmapList::Create()
 {
-	//-----------------------
-	// 00 01 02 03 04 05 06 07
-	// 08 09 10 11 12 13 14 15
-	// 16 17 18 19 20 21 22 23
-	// 24 25 26 27 28 29 30 31
-	// 32 33 34 35 36 37 38 39
-	// 40 41 42 43 44 45 46 47
-	// 48 49 50 51 52 53 54 55
-	// 56 57 58 59 60 61 62 63
 	String aStr(SVX_RES(RID_SVXSTR_BITMAP));
     sal_uInt16 aArray[64];
     Bitmap aBitmap;
@@ -180,7 +172,7 @@ sal_Bool XBitmapList::Create()
     aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_LIGHTBLUE), RGB_Color(COL_WHITE));
 	Insert(new XBitmapEntry(Graphic(aBitmap), aStr));
 
-	return( sal_True );
+	return true;
 }
 
 /************************************************************************/

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabcolr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabcolr.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabcolr.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabcolr.cxx Thu May  2 13:22:17 2013
@@ -88,7 +88,7 @@ XColorEntry* XColorList::GetColor(long n
 
 /************************************************************************/
 
-sal_Bool XColorList::Load()
+bool XColorList::Load()
 {
 	if( mbListDirty )
 	{
@@ -99,7 +99,7 @@ sal_Bool XColorList::Load()
 		if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 		{
 			OSL_ENSURE( !maPath.Len(), "invalid URL" );
-			return sal_False;
+			return false;
 		}
 
 		aURL.Append( maName );
@@ -110,19 +110,20 @@ sal_Bool XColorList::Load()
 		uno::Reference< container::XNameContainer > xTable( SvxUnoXColorTable_createInstance( this ), uno::UNO_QUERY );
 		return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 	}
-	return( sal_False );
+
+	return false;
 }
 
 /************************************************************************/
 
-sal_Bool XColorList::Save()
+bool XColorList::Save()
 {
 	INetURLObject aURL( maPath );
 
 	if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 	{
 		OSL_ENSURE( !maPath.Len(), "invalid URL" );
-		return sal_False;
+		return false;
 	}
 
 	aURL.Append( maName );
@@ -136,7 +137,7 @@ sal_Bool XColorList::Save()
 
 /************************************************************************/
 
-sal_Bool XColorList::Create()
+bool XColorList::Create()
 {
 	XubString aStr;
 	xub_StrLen nLen;

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx Thu May  2 13:22:17 2013
@@ -80,7 +80,7 @@ XDashEntry* XDashList::GetDash(long nInd
 	return (XDashEntry*) XPropertyList::Get(nIndex);
 }
 
-sal_Bool XDashList::Load()
+bool XDashList::Load()
 {
 	if( mbListDirty )
 	{
@@ -91,7 +91,7 @@ sal_Bool XDashList::Load()
 		if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 		{
 			OSL_ENSURE( !maPath.Len(), "invalid URL" );
-			return sal_False;
+			return false;
 		}
 
 		aURL.Append( maName );
@@ -102,17 +102,18 @@ sal_Bool XDashList::Load()
 		uno::Reference< container::XNameContainer > xTable( SvxUnoXDashTable_createInstance( this ), uno::UNO_QUERY );
 		return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 	}
-	return( sal_False );
+
+    return false;
 }
 
-sal_Bool XDashList::Save()
+bool XDashList::Save()
 {
 	INetURLObject aURL( maPath );
 
 	if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 	{
 		OSL_ENSURE( !maPath.Len(), "invalid URL" );
-		return sal_False;
+		return false;
 	}
 
 	aURL.Append( maName );
@@ -124,7 +125,7 @@ sal_Bool XDashList::Save()
 	return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 }
 
-sal_Bool XDashList::Create()
+bool XDashList::Create()
 {
 	XubString aStr( SVX_RES( RID_SVXSTR_LINESTYLE ) );
 	xub_StrLen nLen;
@@ -137,7 +138,7 @@ sal_Bool XDashList::Create()
 	aStr.SetChar(nLen, sal_Unicode('3'));
 	Insert(new XDashEntry(XDash(XDASH_RECT,2, 50,3,250,120),aStr));
 
-	return( sal_True );
+	return true;
 }
 
 Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx Thu May  2 13:22:17 2013
@@ -78,7 +78,7 @@ XGradientEntry* XGradientList::GetGradie
 	return( (XGradientEntry*) XPropertyList::Get( nIndex ) );
 }
 
-sal_Bool XGradientList::Load()
+bool XGradientList::Load()
 {
 	if( mbListDirty )
 	{
@@ -89,7 +89,7 @@ sal_Bool XGradientList::Load()
 		if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 		{
 			DBG_ASSERT( !maPath.Len(), "invalid URL" );
-			return sal_False;
+			return false;
 		}
 
 		aURL.Append( maName );
@@ -101,17 +101,18 @@ sal_Bool XGradientList::Load()
 		return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 
 	}
-	return( sal_False );
+
+    return false;
 }
 
-sal_Bool XGradientList::Save()
+bool XGradientList::Save()
 {
 	INetURLObject aURL( maPath );
 
 	if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 	{
 		DBG_ASSERT( !maPath.Len(), "invalid URL" );
-		return sal_False;
+		return false;
 	}
 
 	aURL.Append( maName );
@@ -123,7 +124,7 @@ sal_Bool XGradientList::Save()
 	return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 }
 
-sal_Bool XGradientList::Create()
+bool XGradientList::Create()
 {
 	XubString aStr( SVX_RES( RID_SVXSTR_GRADIENT ) );
 	xub_StrLen nLen;
@@ -142,7 +143,7 @@ sal_Bool XGradientList::Create()
 	aStr.SetChar(nLen, sal_Unicode('6'));
 	Insert(new XGradientEntry(XGradient(RGB_Color(COL_MAGENTA),RGB_Color(COL_YELLOW ),XGRAD_RECT	  , 1900,60,60,50,100,100),aStr));
 
-	return( sal_True );
+	return true;
 }
 
 Bitmap XGradientList::CreateBitmapForUI(long nIndex)

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx Thu May  2 13:22:17 2013
@@ -76,7 +76,7 @@ XHatchEntry* XHatchList::GetHatch(long n
 	return (XHatchEntry*) XPropertyList::Get(nIndex);
 }
 
-sal_Bool XHatchList::Load()
+bool XHatchList::Load()
 {
 	if( mbListDirty )
 	{
@@ -87,7 +87,7 @@ sal_Bool XHatchList::Load()
 		if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 		{
 			OSL_ENSURE( !maPath.Len(), "invalid URL" );
-			return sal_False;
+			return false;
 		}
 
 		aURL.Append( maName );
@@ -98,17 +98,18 @@ sal_Bool XHatchList::Load()
 		uno::Reference< container::XNameContainer > xTable( SvxUnoXHatchTable_createInstance( this ), uno::UNO_QUERY );
 		return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 	}
-	return( sal_False );
+
+    return false;
 }
 
-sal_Bool XHatchList::Save()
+bool XHatchList::Save()
 {
 	INetURLObject aURL( maPath );
 
 	if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 	{
 		OSL_ENSURE( !maPath.Len(), "invalid URL" );
-		return sal_False;
+		return false;
 	}
 
 	aURL.Append( maName );
@@ -120,7 +121,7 @@ sal_Bool XHatchList::Save()
 	return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 }
 
-sal_Bool XHatchList::Create()
+bool XHatchList::Create()
 {
 	XubString aStr( SVX_RES( RID_SVXSTR_HATCH ) );
 	xub_StrLen nLen;
@@ -133,7 +134,7 @@ sal_Bool XHatchList::Create()
 	aStr.SetChar(nLen, sal_Unicode('3'));
 	Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLUE ),XHATCH_TRIPLE,120,  0),aStr));
 
-	return( sal_True );
+	return true;
 }
 
 Bitmap XHatchList::CreateBitmapForUI( long nIndex )

Modified: openoffice/trunk/main/svx/source/xoutdev/xtable.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtable.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtable.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtable.cxx Thu May  2 13:22:17 2013
@@ -40,9 +40,98 @@ Color RGB_Color( ColorData nColorName )
 	return aRGBColor;
 }
 
-// --------------------
+//////////////////////////////////////////////////////////////////////////////
+// class XColorEntry
+
+XColorEntry::XColorEntry(const Color& rColor, const String& rName)
+:   XPropertyEntry(rName), 
+    aColor(rColor) 
+{
+}
+
+XColorEntry::XColorEntry(const XColorEntry& rOther)
+:   XPropertyEntry(rOther), 
+aColor(rOther.aColor) 
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XLineEndEntry
+
+XLineEndEntry::XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName)
+:   XPropertyEntry(rName),
+    aB2DPolyPolygon(rB2DPolyPolygon)
+{
+}
+
+XLineEndEntry::XLineEndEntry(const XLineEndEntry& rOther)
+:   XPropertyEntry(rOther), 
+    aB2DPolyPolygon(rOther.aB2DPolyPolygon)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XDashEntry
+
+XDashEntry::XDashEntry(const XDash& rDash, const String& rName)
+:   XPropertyEntry(rName), 
+    aDash(rDash) 
+{
+}
+
+XDashEntry::XDashEntry(const XDashEntry& rOther)
+:   XPropertyEntry(rOther), 
+aDash(rOther.aDash) 
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XHatchEntry
+
+XHatchEntry::XHatchEntry(const XHatch& rHatch, const String& rName)
+:   XPropertyEntry(rName), 
+    aHatch(rHatch) 
+{
+}
+
+XHatchEntry::XHatchEntry(const XHatchEntry& rOther)
+:   XPropertyEntry(rOther), 
+    aHatch(rOther.aHatch) 
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XGradientEntry
+
+XGradientEntry::XGradientEntry(const XGradient& rGradient, const String& rName)
+:   XPropertyEntry(rName), 
+    aGradient(rGradient) 
+{
+}
+
+XGradientEntry::XGradientEntry(const XGradientEntry& rOther)
+:   XPropertyEntry(rOther), 
+    aGradient(rOther.aGradient) 
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XBitmapEntry
+
+XBitmapEntry::XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName)
+:   XPropertyEntry(rName), 
+    maGraphicObject(rGraphicObject) 
+{
+}
+
+XBitmapEntry::XBitmapEntry(const XBitmapEntry& rOther) 
+:   XPropertyEntry(rOther), 
+    maGraphicObject(rOther.maGraphicObject) 
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
 // class XPropertyList
-// --------------------
 
 XPropertyList::XPropertyList( const String& rPath ) :
 			maName			( pszStandard, 8 ),
@@ -52,12 +141,6 @@ XPropertyList::XPropertyList( const Stri
 {
 }
 
-/*************************************************************************
-|*
-|* XPropertyList::~XPropertyList()
-|*
-*************************************************************************/
-
 XPropertyList::~XPropertyList()
 {
     while(!maContent.empty())
@@ -67,12 +150,6 @@ XPropertyList::~XPropertyList()
     }
 }
 
-/*************************************************************************
-|*
-|* XPropertyList::Clear()
-|*
-*************************************************************************/
-
 void XPropertyList::Clear()
 {
     while(!maContent.empty())
@@ -82,8 +159,6 @@ void XPropertyList::Clear()
     }
 }
 
-/************************************************************************/
-
 long XPropertyList::Count() const
 {
     if( mbListDirty )
@@ -97,12 +172,6 @@ long XPropertyList::Count() const
     return maContent.size();
 }
 
-/*************************************************************************
-|*
-|* XPropertyEntry* XPropertyList::Get()
-|*
-*************************************************************************/
-
 XPropertyEntry* XPropertyList::Get( long nIndex ) const
 {
     if( mbListDirty )
@@ -123,12 +192,6 @@ XPropertyEntry* XPropertyList::Get( long
     return maContent[nIndex];
 }
 
-/*************************************************************************
-|*
-|* XPropertyList::Get()
-|*
-*************************************************************************/
-
 long XPropertyList::GetIndex(const XubString& rName) const
 {
     if( mbListDirty )
@@ -155,12 +218,6 @@ long XPropertyList::GetIndex(const XubSt
     return -1;
 }
 
-/*************************************************************************
-|*
-|* Bitmap* XPropertyList::GetBitmap()
-|*
-*************************************************************************/
-
 Bitmap XPropertyList::GetUiBitmap( long nIndex ) const
 {
     Bitmap aRetval;
@@ -180,12 +237,6 @@ Bitmap XPropertyList::GetUiBitmap( long 
     return aRetval;
 }
 
-/*************************************************************************
-|*
-|* void XPropertyList::Insert()
-|*
-*************************************************************************/
-
 void XPropertyList::Insert( XPropertyEntry* pEntry, long nIndex )
 {
     if(pEntry)
@@ -203,12 +254,6 @@ void XPropertyList::Insert( XPropertyEnt
     }
 }
 
-/*************************************************************************
-|*
-|* void XPropertyList::Replace()
-|*
-*************************************************************************/
-
 XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex )
 {
     XPropertyEntry* pRetval = 0;
@@ -227,12 +272,6 @@ XPropertyEntry* XPropertyList::Replace( 
     return pRetval;
 }
 
-/*************************************************************************
-|*
-|* void XPropertyList::Remove()
-|*
-*************************************************************************/
-
 XPropertyEntry* XPropertyList::Remove( long nIndex )
 {
     XPropertyEntry* pRetval = 0;
@@ -255,8 +294,6 @@ XPropertyEntry* XPropertyList::Remove( l
     return pRetval;
 }
 
-/************************************************************************/
-
 void XPropertyList::SetName( const String& rString )
 {
 	if(rString.Len())

Modified: openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx?rev=1478365&r1=1478364&r2=1478365&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx Thu May  2 13:22:17 2013
@@ -77,7 +77,7 @@ XLineEndEntry* XLineEndList::GetLineEnd(
 	return (XLineEndEntry*) XPropertyList::Get(nIndex);
 }
 
-sal_Bool XLineEndList::Load()
+bool XLineEndList::Load()
 {
 	if( mbListDirty )
 	{
@@ -88,7 +88,7 @@ sal_Bool XLineEndList::Load()
 		if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 		{
 			OSL_ENSURE( !maPath.Len(), "invalid URL" );
-			return sal_False;
+			return false;
 		}
 
 		aURL.Append( maName );
@@ -99,17 +99,18 @@ sal_Bool XLineEndList::Load()
 		uno::Reference< container::XNameContainer > xTable( SvxUnoXLineEndTable_createInstance( this ), uno::UNO_QUERY );
 		return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 	}
-	return( sal_False );
+
+    return false;
 }
 
-sal_Bool XLineEndList::Save()
+bool XLineEndList::Save()
 {
 	INetURLObject aURL( maPath );
 
 	if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
 	{
 		OSL_ENSURE( !maPath.Len(), "invalid URL" );
-		return sal_False;
+		return false;
 	}
 
 	aURL.Append( maName );
@@ -121,7 +122,7 @@ sal_Bool XLineEndList::Save()
 	return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
 }
 
-sal_Bool XLineEndList::Create()
+bool XLineEndList::Create()
 {
 	basegfx::B2DPolygon aTriangle;
 	aTriangle.append(basegfx::B2DPoint(10.0, 0.0));
@@ -141,7 +142,7 @@ sal_Bool XLineEndList::Create()
 	basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 100.0));
 	Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aCircle), SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) );
 
-	return( sal_True );
+	return true;
 }
 
 Bitmap XLineEndList::CreateBitmapForUI( long nIndex )



Mime
View raw message