summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-05-02 13:22:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-18 15:35:15 +0100
commit6ed60d6a9314341bda0afbea7ed6b106f562393d (patch)
tree5ea1decacc5aec581540970cd137334641c840b5 /svx
parent5ba49392543bae1f6477c65f1887881b48a3143e (diff)
Related: #i122120# Ensured Append/Modify methods in LB implementations...
always add a UI graphic preview, corrected diag mirror in bitmap pattern (cherry picked from commit 36a8574012525fa837df6dfd1839fa65b5a2bc70) Conflicts: cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx svx/inc/svx/dlgctrl.hxx svx/inc/svx/xtable.hxx svx/source/dialog/dlgctrl.cxx svx/source/xoutdev/xtabbtmp.cxx svx/source/xoutdev/xtabcolr.cxx svx/source/xoutdev/xtabdash.cxx svx/source/xoutdev/xtabgrdt.cxx svx/source/xoutdev/xtabhtch.cxx svx/source/xoutdev/xtable.cxx svx/source/xoutdev/xtablend.cxx Change-Id: Iff0744061b76d8c608e285f81bcc8e76edeb6a69
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dlgctrl.cxx142
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx2
-rw-r--r--svx/source/unodraw/unoctabl.cxx8
-rw-r--r--svx/source/unodraw/unoshape.cxx22
-rw-r--r--svx/source/xoutdev/xattr.cxx2
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx4
-rw-r--r--svx/source/xoutdev/xtabbtmp.cxx13
-rw-r--r--svx/source/xoutdev/xtabcolr.cxx4
-rw-r--r--svx/source/xoutdev/xtabdash.cxx6
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx6
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx6
-rw-r--r--svx/source/xoutdev/xtable.cxx98
-rw-r--r--svx/source/xoutdev/xtablend.cxx6
13 files changed, 217 insertions, 102 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index a653b2643c6b..18d5671b37f3 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -934,18 +934,18 @@ void ColorLB::Fill( const XColorListRef &pColorTab )
/************************************************************************/
-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 );
+ InsertEntry( rEntry.GetColor(), rEntry.GetName(), nPos );
}
// Fills the Listbox with color and strings
@@ -1002,25 +1002,34 @@ void HatchingLB::Fill( const XHatchListRef &pList )
/************************************************************************/
-void HatchingLB::Append( XHatchEntry* pEntry, Bitmap* pBmp )
+void HatchingLB::Append( const XHatchEntry& rEntry, const Bitmap& rBitmap )
{
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
else
- InsertEntry( pEntry->GetName() );
+ {
+ 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 );
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ if( !rBitmap.IsEmpty() )
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
// Fills the listbox (provisional) with strings
@@ -1099,25 +1108,34 @@ void GradientLB::Fill( const XGradientListRef &pList )
/************************************************************************/
-void GradientLB::Append( XGradientEntry* pEntry, Bitmap* pBmp )
+void GradientLB::Append( const XGradientEntry& rEntry, const Bitmap& rBitmap )
{
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
else
- InsertEntry( pEntry->GetName() );
+ {
+ 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 );
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
/************************************************************************/
@@ -1261,11 +1279,12 @@ void BitmapLB::Fill( const XBitmapListRef &pList )
/************************************************************************/
-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();
+
+ if(!maBitmapEx.IsEmpty())
{
- maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
formatBitmapExToSize(maBitmapEx, rSize);
InsertEntry(rEntry.GetName(), maBitmapEx);
}
@@ -1279,13 +1298,13 @@ void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* p
/************************************************************************/
-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);
+ maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
- if(pBmpEx)
+ if(!maBitmapEx.IsEmpty())
{
- maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
formatBitmapExToSize(maBitmapEx, rSize);
InsertEntry(rEntry.GetName(), maBitmapEx, nPos);
}
@@ -1405,25 +1424,34 @@ void LineLB::Fill( const XDashListRef &pList )
/************************************************************************/
-void LineLB::Append( XDashEntry* pEntry, const Bitmap* pBmp )
+void LineLB::Append( const XDashEntry& rEntry, const Bitmap& rBitmap )
{
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
else
- InsertEntry( pEntry->GetName() );
+ {
+ 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 );
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
// Fills the listbox (provisional) with strings
@@ -1444,7 +1472,7 @@ LineEndLB::~LineEndLB(void)
{
}
-void LineEndLB::Fill( const XLineEndListRef &pList, sal_Bool bStart )
+void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
{
if( !pList.is() )
return;
@@ -1478,43 +1506,49 @@ void LineEndLB::Fill( const XLineEndListRef &pList, sal_Bool bStart )
/************************************************************************/
-void LineEndLB::Append( XLineEndEntry* pEntry, const Bitmap* pBmp, sal_Bool bStart )
+void LineEndLB::Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart )
{
- if( pBmp )
+ if(!rBitmap.IsEmpty())
{
VirtualDevice aVD;
- Size aBmpSize( pBmp->GetSizePixel() );
+ 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() ) ) );
+ 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( pEntry->GetName() );
+ {
+ InsertEntry(rEntry.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 );
- if( pBmp )
+ if(!rBitmap.IsEmpty())
{
VirtualDevice aVD;
- Size aBmpSize( pBmp->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 );
+ 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())),
+ nPos);
}
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry(rEntry.GetName(), nPos);
+ }
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index c9b9603fae67..ededdfd1eff3 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -87,7 +87,7 @@ SvxUnoXPropertyTable::~SvxUnoXPropertyTable() throw()
XPropertyEntry* SvxUnoXPropertyTable::get( long index ) const
{
if( mpList )
- return mpList->Get( index, 0 );
+ return mpList->Get(index);
else
return NULL;
}
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 605f09264b2e..82baea9440b2 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -135,7 +135,7 @@ void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno::
void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- long nIndex = pList.is() ? pList->Get( Name ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( Name ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -150,7 +150,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
if( !(aElement >>= nColor) )
throw lang::IllegalArgumentException();
- long nIndex = pList.is() ? pList->Get( aName ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -162,7 +162,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- long nIndex = pList.is() ? pList->Get( aName ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -190,7 +190,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames()
sal_Bool SAL_CALL SvxUnoColorTable::hasByName( const OUString& aName )
throw( uno::RuntimeException )
{
- long nIndex = pList.is() ? pList->Get( aName ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
return nIndex != -1;
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index c5199e601049..dffbd73ea403 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1497,9 +1497,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pBitmapList.is() )
return sal_False;
- long nPos = pBitmapList->Get(aStrName);
+ long nPos = pBitmapList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos );
XFillBitmapItem aBmpItem;
@@ -1516,9 +1516,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pGradientList.is() )
return sal_False;
- long nPos = pGradientList->Get(aStrName);
+ long nPos = pGradientList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XGradientEntry* pEntry = pGradientList->GetGradient( nPos );
XFillGradientItem aGrdItem;
@@ -1535,9 +1535,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pHatchList.is() )
return sal_False;
- long nPos = pHatchList->Get(aStrName);
+ long nPos = pHatchList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XHatchEntry* pEntry = pHatchList->GetHatch( nPos );
XFillHatchItem aHatchItem;
@@ -1555,9 +1555,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pLineEndList.is() )
return sal_False;
- long nPos = pLineEndList->Get(aStrName);
+ long nPos = pLineEndList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nPos );
if( XATTR_LINEEND == nWID )
@@ -1584,11 +1584,11 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
XDashListRef pDashList = pModel->GetDashList();
if( !pDashList.is() )
- return sal_False;
+ return false;
- long nPos = pDashList->Get(aStrName);
+ long nPos = pDashList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XDashEntry* pEntry = pDashList->GetDash( nPos );
XLineDashItem aDashItem;
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 2d26c8d22afa..f24d81282ce7 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -233,7 +233,7 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
int nIndex;
for( nIndex = 0; nIndex < nCount; nIndex++ )
{
- XPropertyEntry* pEntry = pDefaults->Get( nIndex, 0 );
+ XPropertyEntry* pEntry = pDefaults->Get(nIndex);
if( pEntry )
{
bool bFound = false;
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 462bae6b5036..3734e4a0d9e9 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -298,11 +298,11 @@ Bitmap createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, C
{
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);
}
}
}
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
index 328366a6c3ed..4cf5fd40e588 100644
--- a/svx/source/xoutdev/xtabbtmp.cxx
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -38,7 +38,7 @@ XBitmapEntry* XBitmapList::Remove(long nIndex)
XBitmapEntry* XBitmapList::GetBitmap(long nIndex) const
{
- return (XBitmapEntry*) XPropertyList::Get(nIndex, 0);
+ return (XBitmapEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XBitmapList::createInstance()
@@ -47,17 +47,8 @@ uno::Reference< container::XNameContainer > XBitmapList::createInstance()
SvxUnoXBitmapTable_createInstance( this ), uno::UNO_QUERY );
}
-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;
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index b4628c68d404..ef81ea84e91b 100644
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -53,7 +53,7 @@ XColorEntry* XColorList::Remove(long nIndex)
XColorEntry* XColorList::GetColor(long nIndex) const
{
- return (XColorEntry*) XPropertyList::Get(nIndex, 0);
+ return (XColorEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XColorList::createInstance()
@@ -63,7 +63,7 @@ uno::Reference< container::XNameContainer > XColorList::createInstance()
uno::UNO_QUERY );
}
-sal_Bool XColorList::Create()
+bool XColorList::Create()
{
XubString aStr;
xub_StrLen nLen;
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 1c4d707fba68..93ada53f8d76 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -57,7 +57,7 @@ XDashEntry* XDashList::Remove(long nIndex)
XDashEntry* XDashList::GetDash(long nIndex) const
{
- return (XDashEntry*) XPropertyList::Get(nIndex, 0);
+ return (XDashEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XDashList::createInstance()
@@ -66,7 +66,7 @@ uno::Reference< container::XNameContainer > XDashList::createInstance()
SvxUnoXDashTable_createInstance( this ), uno::UNO_QUERY );
}
-sal_Bool XDashList::Create()
+bool XDashList::Create()
{
XubString aStr( SVX_RES( RID_SVXSTR_LINESTYLE ) );
xub_StrLen nLen;
@@ -79,7 +79,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)
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 73ff6ad10647..559f66bbedf0 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -55,7 +55,7 @@ XGradientEntry* XGradientList::Remove(long nIndex)
XGradientEntry* XGradientList::GetGradient(long nIndex) const
{
- return( (XGradientEntry*) XPropertyList::Get( nIndex, 0 ) );
+ return( (XGradientEntry*) XPropertyList::Get( nIndex ) );
}
uno::Reference< container::XNameContainer > XGradientList::createInstance()
@@ -65,7 +65,7 @@ uno::Reference< container::XNameContainer > XGradientList::createInstance()
uno::UNO_QUERY );
}
-sal_Bool XGradientList::Create()
+bool XGradientList::Create()
{
XubString aStr( SVX_RES( RID_SVXSTR_GRADIENT ) );
xub_StrLen nLen;
@@ -84,7 +84,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 )
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 72033e38ebda..8235cabe0ce7 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -55,7 +55,7 @@ XHatchEntry* XHatchList::Remove(long nIndex)
XHatchEntry* XHatchList::GetHatch(long nIndex) const
{
- return (XHatchEntry*) XPropertyList::Get(nIndex, 0);
+ return (XHatchEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XHatchList::createInstance()
@@ -64,7 +64,7 @@ uno::Reference< container::XNameContainer > XHatchList::createInstance()
SvxUnoXHatchTable_createInstance( this ), uno::UNO_QUERY );
}
-sal_Bool XHatchList::Create()
+bool XHatchList::Create()
{
XubString aStr( SVX_RES( RID_SVXSTR_HATCH ) );
xub_StrLen nLen;
@@ -77,7 +77,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 )
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 99278c5a72e1..5fd2d5e558e5 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -37,6 +37,96 @@ 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)
+{
+}
+
// static int count = 0;
XPropertyList::XPropertyList(
@@ -70,7 +160,7 @@ long XPropertyList::Count() const
return maList.size();
}
-XPropertyEntry* XPropertyList::Get( long nIndex, sal_uInt16 /*nDummy*/) const
+XPropertyEntry* XPropertyList::Get( long nIndex ) const
{
if( mbListDirty )
{
@@ -80,12 +170,12 @@ XPropertyEntry* XPropertyList::Get( long nIndex, sal_uInt16 /*nDummy*/) const
return ( (size_t)nIndex < maList.size() ) ? maList[ nIndex ] : NULL;
}
-long XPropertyList::Get(const XubString& rName)
+long XPropertyList::GetIndex(const XubString& rName) const
{
if( mbListDirty )
{
- if( !Load() )
- Create();
+ if( !( (XPropertyList*) this )->Load() )
+ ( (XPropertyList*) this )->Create();
}
for( long i = 0, n = maList.size(); i < n; ++i ) {
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index 4accd713b8f1..d5bc78960b5a 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -49,7 +49,7 @@ XLineEndEntry* XLineEndList::Remove(long nIndex)
XLineEndEntry* XLineEndList::GetLineEnd(long nIndex) const
{
- return (XLineEndEntry*) XPropertyList::Get(nIndex, 0);
+ return (XLineEndEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XLineEndList::createInstance()
@@ -58,7 +58,7 @@ uno::Reference< container::XNameContainer > XLineEndList::createInstance()
SvxUnoXLineEndTable_createInstance( this ), uno::UNO_QUERY );
}
-sal_Bool XLineEndList::Create()
+bool XLineEndList::Create()
{
basegfx::B2DPolygon aTriangle;
aTriangle.append(basegfx::B2DPoint(10.0, 0.0));
@@ -78,7 +78,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 )