summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdabstdlg.hxx3
-rw-r--r--sd/sdi/_docsh.sdi2
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx39
-rw-r--r--sd/source/ui/dlg/celltempl.cxx4
-rw-r--r--sd/source/ui/dlg/copydlg.cxx12
-rw-r--r--sd/source/ui/dlg/dlgpage.cxx6
-rw-r--r--sd/source/ui/dlg/prltempl.cxx10
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx3
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx2
-rw-r--r--sd/source/ui/dlg/tabtempl.cxx8
-rw-r--r--sd/source/ui/dlg/tpaction.cxx6
-rw-r--r--sd/source/ui/docshell/docshel3.cxx9
-rw-r--r--sd/source/ui/docshell/docshell.cxx2
-rw-r--r--sd/source/ui/func/fuconrec.cxx4
-rw-r--r--sd/source/ui/func/fucopy.cxx2
-rw-r--r--sd/source/ui/func/fulinend.cxx2
-rw-r--r--sd/source/ui/inc/celltempl.hxx8
-rw-r--r--sd/source/ui/inc/copydlg.hxx4
-rw-r--r--sd/source/ui/inc/dlgpage.hxx8
-rw-r--r--sd/source/ui/inc/prltempl.hxx12
-rw-r--r--sd/source/ui/inc/tabtempl.hxx12
-rw-r--r--sd/source/ui/inc/tpaction.hxx2
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx51
-rw-r--r--sd/source/ui/view/drviews6.cxx8
-rw-r--r--sd/source/ui/view/drviews9.cxx14
25 files changed, 94 insertions, 139 deletions
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 02a9b7d372fb..09aabe3a87b5 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -30,6 +30,7 @@
// include ---------------------------------------------------------------
+#include <rtl/ref.hxx>
#include <tools/solar.h>
#include <tools/string.hxx>
#include <sfx2/sfxdlg.hxx>
@@ -188,7 +189,7 @@ public:
static SdAbstractDialogFactory* Create();
virtual VclAbstractDialog* CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0;
- virtual AbstractCopyDlg* CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorList* pColTab, ::sd::View* pView ) = 0;
+ virtual AbstractCopyDlg* CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, const rtl::Reference<XColorList> &pColTab, ::sd::View* pView ) = 0;
virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc ) = 0;
virtual SfxAbstractTabDialog* CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) = 0;
virtual SfxAbstractTabDialog* CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True ) = 0;
diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi
index c63d20c0f5f6..178d0dcf26e9 100644
--- a/sd/sdi/_docsh.sdi
+++ b/sd/sdi/_docsh.sdi
@@ -71,7 +71,7 @@ interface DrawDocument
Cachable ;
]
- SID_GET_COLORTABLE
+ SID_GET_COLORLIST
[
ExecMethod = Execute;
]
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index cdd455a4ebfe..4c2f535df793 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -223,32 +223,25 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, Window* pParent, con
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorList* pColorTable = NULL;
- bool bKillTable = false;
+ XColorListRef pColorList;
const SfxPoolItem* pItem = NULL;
if ( pDocSh && ( ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != 0) )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+ pColorList = ( (SvxColorListItem*)pItem )->GetColorList();
- if ( !pColorTable )
- {
- pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
- bKillTable = sal_True;
- }
+ if ( !pColorList.is() )
+ pColorList = XColorList::CreateStdColorList();
sal_Int32 nColor = 0;
rValue >>= nColor;
- for ( long i = 0; i < pColorTable->Count(); i++ )
+ for ( long i = 0; i < pColorList->Count(); i++ )
{
- XColorEntry* pEntry = pColorTable->GetColor(i);
+ XColorEntry* pEntry = pColorList->GetColor(i);
sal_uInt16 nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
if( pEntry->GetColor().GetRGBColor() == (sal_uInt32)nColor )
mpControl->SelectEntryPos( nPos );
}
-
- if ( bKillTable )
- delete pColorTable;
}
// --------------------------------------------------------------------
@@ -1231,36 +1224,28 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
// fill the color box
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorList* pColorTable = NULL;
- bool bKillTable = false;
+ XColorListRef pColorList;
const SfxPoolItem* pItem = NULL;
if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != 0 ) )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+ pColorList = ( (SvxColorListItem*)pItem )->GetColorList();
- if ( !pColorTable )
- {
- pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
- bKillTable = sal_True;
- }
+ if ( !pColorList.is() )
+ pColorList = XColorList::CreateStdColorList();
mpCLBDimColor->SetUpdateMode( sal_False );
- for ( long i = 0; i < pColorTable->Count(); i++ )
+ for ( long i = 0; i < pColorList->Count(); i++ )
{
- XColorEntry* pEntry = pColorTable->GetColor(i);
+ XColorEntry* pEntry = pColorList->GetColor(i);
mpCLBDimColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
mpCLBDimColor->SetUpdateMode( sal_True );
- if ( bKillTable )
- delete pColorTable;
-
//
// init settings controls
//
-
int nOffsetY = 0;
int nOffsetX = 0;
diff --git a/sd/source/ui/dlg/celltempl.cxx b/sd/source/ui/dlg/celltempl.cxx
index 195b59d46019..5be01ee3e09c 100644
--- a/sd/source/ui/dlg/celltempl.cxx
+++ b/sd/source/ui/dlg/celltempl.cxx
@@ -58,7 +58,7 @@
SdPresCellTemplateDlg::SdPresCellTemplateDlg( SdrModel* pModel, Window* pParent, SfxStyleSheetBase& rStyleBase )
: SfxStyleDialog( pParent, SdResId(TAB_CELL_TEMPLATE), rStyleBase, sal_False )
-, mpColorTab( pModel->GetColorTable() )
+, mpColorList( pModel->GetColorList() )
, mpGradientList( pModel->GetGradientList() )
, mpHatchingList( pModel->GetHatchList() )
, mpBitmapList( pModel->GetBitmapList() )
@@ -86,7 +86,7 @@ void SdPresCellTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
case RID_SVXPAGE_AREA:
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put (SvxColorTableItem(mpColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(mpColorList,SID_COLOR_TABLE));
aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST));
aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST));
aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST));
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 2fb53f0b9d8d..83144e7d82ba 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -67,7 +67,7 @@ namespace sd {
CopyDlg::CopyDlg(
::Window* pWindow,
const SfxItemSet& rInAttrs,
- XColorList* pColTab,
+ const XColorListRef &pColList,
::sd::View* pInView )
: SfxModalDialog ( pWindow, SdResId( DLG_COPY ) ),
maFtCopies ( this, SdResId( FT_COPIES ) ),
@@ -94,10 +94,10 @@ CopyDlg::CopyDlg(
maBtnCancel ( this, SdResId( BTN_CANCEL ) ),
maBtnHelp ( this, SdResId( BTN_HELP ) ),
maBtnSetDefault ( this, SdResId( BTN_SET_DEFAULT ) ),
- mrOutAttrs ( rInAttrs ),
- mpColorTab ( pColTab ),
+ mrOutAttrs ( rInAttrs ),
+ mpColorList ( pColList ),
maUIScale(pInView->GetDoc()->GetUIScale()),
- mpView ( pInView )
+ mpView ( pInView )
{
FreeResource();
@@ -105,8 +105,8 @@ CopyDlg::CopyDlg(
maBtnSetViewData.SetAccessibleName (maBtnSetViewData.GetQuickHelpText());
// Farbtabellen
- DBG_ASSERT( mpColorTab, "Keine gueltige ColorTable uebergeben!" );
- maLbStartColor.Fill( mpColorTab );
+ DBG_ASSERT( mpColorList, "Keine gueltige ColorTable uebergeben!" );
+ maLbStartColor.Fill( mpColorList );
maLbEndColor.CopyEntries( maLbStartColor );
maLbStartColor.SetSelectHdl( LINK( this, CopyDlg, SelectColorHdl ) );
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index f09c6ea21db5..6d34292ae9cc 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -57,7 +57,7 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet*
mrOutAttrs ( *pAttr ),
mpDocShell ( pDocSh )
{
- SvxColorTableItem aColorTableItem(*( (const SvxColorTableItem*)
+ SvxColorListItem aColorListItem(*( (const SvxColorListItem*)
( mpDocShell->GetItem( SID_COLOR_TABLE ) ) ) );
SvxGradientListItem aGradientListItem(*( (const SvxGradientListItem*)
( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) ) );
@@ -66,7 +66,7 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet*
SvxHatchListItem aHatchListItem(*( (const SvxHatchListItem*)
( mpDocShell->GetItem( SID_HATCH_LIST ) ) ) );
- mpColorTab = aColorTableItem.GetColorTable();
+ mpColorList = aColorListItem.GetColorList();
mpGradientList = aGradientListItem.GetGradientList();
mpHatchingList = aHatchListItem.GetHatchList();
mpBitmapList = aBitmapListItem.GetBitmapList();
@@ -99,7 +99,7 @@ void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
rPage.PageCreated(aSet);
break;
case RID_SVXPAGE_AREA:
- aSet.Put (SvxColorTableItem(mpColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(mpColorList,SID_COLOR_TABLE));
aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST));
aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST));
aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST));
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index 112eb6e3c68e..a7c06e56b151 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -136,7 +136,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
FreeResource();
- SvxColorTableItem aColorTableItem(*( (const SvxColorTableItem*)
+ SvxColorListItem aColorListItem(*( (const SvxColorListItem*)
( mpDocShell->GetItem( SID_COLOR_TABLE ) ) ) );
SvxGradientListItem aGradientListItem(*( (const SvxGradientListItem*)
( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) ) );
@@ -149,7 +149,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
SvxLineEndListItem aLineEndListItem(*( (const SvxLineEndListItem*)
( mpDocShell->GetItem( SID_LINEEND_LIST ) ) ) );
- pColorTab = aColorTableItem.GetColorTable();
+ pColorTab = aColorListItem.GetColorList();
pDashList = aDashListItem.GetDashList();
pLineEndList = aLineEndListItem.GetLineEndList();
pGradientList = aGradientListItem.GetGradientList();
@@ -261,7 +261,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
case RID_SVXPAGE_LINE:
{
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE));
aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST));
aSet.Put (SvxLineEndListItem(pLineEndList,SID_LINEEND_LIST));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
@@ -272,7 +272,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
case RID_SVXPAGE_AREA:
{
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE));
aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST));
aSet.Put (SvxHatchListItem(pHatchingList,SID_HATCH_LIST));
aSet.Put (SvxBitmapListItem(pBitmapList,SID_BITMAP_LIST));
@@ -285,7 +285,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
break;
case RID_SVXPAGE_SHADOW:
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE));
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
rPage.PageCreated(aSet);
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 57683a9f5f19..4b9eda9134b1 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -396,7 +396,8 @@ VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateBreakDlg(
//add for CopyDlg begin
AbstractCopyDlg * SdAbstractDialogFactory_Impl::CreateCopyDlg(
::Window* pWindow, const SfxItemSet& rInAttrs,
- XColorList* pColTab, ::sd::View* pView ) //add for CopyDlg
+ const rtl::Reference<XColorList> &pColTab,
+ ::sd::View* pView ) //add for CopyDlg
{
return new AbstractCopyDlg_Impl( new ::sd::CopyDlg( pWindow, rInAttrs, pColTab, pView ) );
}
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 4b6f4b76002e..9a0f5f829d1e 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -260,7 +260,7 @@ class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
public:
virtual VclAbstractDialog* CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount );
- virtual AbstractCopyDlg* CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorList* pColTab, ::sd::View* pView );
+ virtual AbstractCopyDlg* CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, const rtl::Reference<XColorList> &pColTab, ::sd::View* pView );
virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc );
virtual SfxAbstractTabDialog* CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell );
virtual SfxAbstractTabDialog* CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True );
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index fc8333658ba1..17fee1a6e186 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -74,7 +74,7 @@ SdTabTemplateDlg::SdTabTemplateDlg( Window* pParent,
SfxStyleDialog ( pParent, SdResId( TAB_TEMPLATE ), rStyleBase, sal_False ),
rDocShell ( *pDocShell ),
pSdrView ( pView ),
- pColorTab ( pModel->GetColorTable() ),
+ pColorList ( pModel->GetColorList() ),
pGradientList ( pModel->GetGradientList() ),
pHatchingList ( pModel->GetHatchList() ),
pBitmapList ( pModel->GetBitmapList() ),
@@ -128,7 +128,7 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
switch( nId )
{
case RID_SVXPAGE_LINE:
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE));
aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST));
aSet.Put (SvxLineEndListItem(pLineEndList,SID_LINEEND_LIST));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
@@ -136,7 +136,7 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
break;
case RID_SVXPAGE_AREA:
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE));
aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST));
aSet.Put (SvxHatchListItem(pHatchingList,SID_HATCH_LIST));
aSet.Put (SvxBitmapListItem(pBitmapList,SID_BITMAP_LIST));
@@ -149,7 +149,7 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
break;
case RID_SVXPAGE_SHADOW:
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE));
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
rPage.PageCreated(aSet);
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 988b288871e0..0e64d8940d6f 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -187,9 +187,9 @@ void SdTPAction::SetView( const ::sd::View* pSdView )
aLbTree.SetViewFrame( pFrame );
aLbTreeDocument.SetViewFrame( pFrame );
- SvxColorTableItem aItem( *(const SvxColorTableItem*)( pDocSh->GetItem( SID_COLOR_TABLE ) ) );
- pColTab = aItem.GetColorTable();
- DBG_ASSERT( pColTab, "Keine Farbtabelle vorhanden!" );
+ SvxColorListItem aItem( *(const SvxColorListItem*)( pDocSh->GetItem( SID_COLOR_TABLE ) ) );
+ pColList = aItem.GetColorList();
+ DBG_ASSERT( pColList, "Keine Farbtabelle vorhanden!" );
}
else
{
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index c853a6c72d8a..75cbaf86d656 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -188,12 +188,11 @@ void DrawDocShell::Execute( SfxRequest& rReq )
}
break;
- case SID_GET_COLORTABLE:
+ case SID_GET_COLORLIST:
{
- // passende ColorTable ist per PutItem gesetzt worden
- SvxColorTableItem* pColItem = (SvxColorTableItem*) GetItem( SID_COLOR_TABLE );
- XColorList* pTable = pColItem->GetColorTable();
- rReq.SetReturnValue( OfaPtrItem( SID_GET_COLORTABLE, pTable ) );
+ SvxColorListItem* pColItem = (SvxColorListItem*) GetItem( SID_COLOR_TABLE );
+ XColorListRef pList = pColItem->GetColorList();
+ rReq.SetReturnValue( OfaRefItem<XColorList>( SID_GET_COLORLIST, pList ) );
}
break;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index d87363f30b06..ce1f9469a6d6 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -443,7 +443,7 @@ void DrawDocShell::Deactivate( sal_Bool )
void DrawDocShell::UpdateTablePointers()
{
- PutItem( SvxColorTableItem( mpDoc->GetColorTable(), SID_COLOR_TABLE ) );
+ PutItem( SvxColorListItem( mpDoc->GetColorList(), SID_COLOR_TABLE ) );
PutItem( SvxGradientListItem( mpDoc->GetGradientList(), SID_GRADIENT_LIST ) );
PutItem( SvxHatchListItem( mpDoc->GetHatchList(), SID_HATCH_LIST ) );
PutItem( SvxBitmapListItem( mpDoc->GetBitmapList(), SID_BITMAP_LIST ) );
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 85cd8cc5945a..79d10da3a998 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -592,9 +592,9 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
::basegfx::B2DPolyPolygon getPolygon( sal_uInt16 nResId, SdrModel* pDoc )
{
::basegfx::B2DPolyPolygon aRetval;
- XLineEndList* pLineEndList = pDoc->GetLineEndList();
+ XLineEndListRef pLineEndList = pDoc->GetLineEndList();
- if( pLineEndList )
+ if( pLineEndList.is() )
{
String aArrowName( SVX_RES(nResId) );
long nCount = pLineEndList->Count();
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index ee83ece60cc9..2ecfccc95f3c 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -119,7 +119,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact )
{
- AbstractCopyDlg* pDlg = pFact->CreateCopyDlg(NULL, aSet, mpDoc->GetColorTable(), mpView );
+ AbstractCopyDlg* pDlg = pFact->CreateCopyDlg(NULL, aSet, mpDoc->GetColorList(), mpView );
if( pDlg )
{
sal_uInt16 nResult = pDlg->Execute();
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index b3086c316e21..023b1f376bef 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -111,7 +111,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
// Loeschen des angelegten PolyObjektes
SdrObject::Free( pConvPolyObj );
- XLineEndList* pLineEndList = mpDoc->GetLineEndList();
+ XLineEndListRef pLineEndList = mpDoc->GetLineEndList();
XLineEndEntry* pEntry;
String aNewName( SdResId( STR_LINEEND ) );
diff --git a/sd/source/ui/inc/celltempl.hxx b/sd/source/ui/inc/celltempl.hxx
index ca2b3736e345..621c7507541f 100644
--- a/sd/source/ui/inc/celltempl.hxx
+++ b/sd/source/ui/inc/celltempl.hxx
@@ -41,10 +41,10 @@ class SdrModel;
class SdPresCellTemplateDlg : public SfxStyleDialog
{
private:
- XColorList* mpColorTab;
- XGradientList* mpGradientList;
- XHatchList* mpHatchingList;
- XBitmapList* mpBitmapList;
+ XColorListRef mpColorTab;
+ XGradientListRef mpGradientList;
+ XHatchListRef mpHatchingList;
+ XBitmapListRef mpBitmapList;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual const SfxItemSet* GetRefreshedSet();
diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx
index 17da615a5583..1fa4e08342e9 100644
--- a/sd/source/ui/inc/copydlg.hxx
+++ b/sd/source/ui/inc/copydlg.hxx
@@ -52,7 +52,7 @@ class CopyDlg
{
public:
CopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
- XColorList* pColTab, ::sd::View* pView );
+ const XColorListRef &pColList, ::sd::View* pView );
~CopyDlg();
void GetAttr( SfxItemSet& rOutAttrs );
@@ -89,7 +89,7 @@ private:
PushButton maBtnSetDefault;
const SfxItemSet& mrOutAttrs;
- XColorList* mpColorTab;
+ XColorListRef mpColorList;
Fraction maUIScale;
::sd::View* mpView;
diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx
index 40b931ae0e80..1b7e8de35862 100644
--- a/sd/source/ui/inc/dlgpage.hxx
+++ b/sd/source/ui/inc/dlgpage.hxx
@@ -53,10 +53,10 @@ private:
const SfxObjectShell* mpDocShell;
- XColorList* mpColorTab;
- XGradientList* mpGradientList;
- XHatchList* mpHatchingList;
- XBitmapList* mpBitmapList;
+ XColorListRef mpColorList;
+ XGradientListRef mpGradientList;
+ XHatchListRef mpHatchingList;
+ XBitmapListRef mpBitmapList;
public:
SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, sal_Bool bAreaPage = sal_True );
diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx
index 3d502708f066..eafa1a3fc1b0 100644
--- a/sd/source/ui/inc/prltempl.hxx
+++ b/sd/source/ui/inc/prltempl.hxx
@@ -57,12 +57,12 @@ class SdPresLayoutTemplateDlg : public SfxTabDialog
private:
const SfxObjectShell* mpDocShell;
- XColorList* pColorTab;
- XGradientList* pGradientList;
- XHatchList* pHatchingList;
- XBitmapList* pBitmapList;
- XDashList* pDashList;
- XLineEndList* pLineEndList;
+ XColorListRef pColorTab;
+ XGradientListRef pGradientList;
+ XHatchListRef pHatchingList;
+ XBitmapListRef pBitmapList;
+ XDashListRef pDashList;
+ XLineEndListRef pLineEndList;
sal_uInt16 nPageType;
sal_uInt16 nDlgType;
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
index fccf3f789276..005dd57bc26c 100644
--- a/sd/source/ui/inc/tabtempl.hxx
+++ b/sd/source/ui/inc/tabtempl.hxx
@@ -54,12 +54,12 @@ private:
const SfxObjectShell& rDocShell;
SdrView* pSdrView;
- XColorList* pColorTab;
- XGradientList* pGradientList;
- XHatchList* pHatchingList;
- XBitmapList* pBitmapList;
- XDashList* pDashList;
- XLineEndList* pLineEndList;
+ XColorListRef pColorList;
+ XGradientListRef pGradientList;
+ XHatchListRef pHatchingList;
+ XBitmapListRef pBitmapList;
+ XDashListRef pDashList;
+ XLineEndListRef pLineEndList;
sal_uInt16 nPageType;
sal_uInt16 nDlgType;
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index f3fd62d5e6c0..4dd08c840162 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -93,7 +93,7 @@ private:
const SfxItemSet& rOutAttrs;
const ::sd::View* mpView;
SdDrawDocument* mpDoc;
- XColorList* pColTab;
+ XColorListRef pColList;
sal_Bool bTreeUpdated;
std::vector<com::sun::star::presentation::ClickAction> maCurrentActions;
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index ffd645e03248..56d8a850ff3e 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -237,35 +237,6 @@ DocumentSettings::~DocumentSettings() throw()
{
}
-static inline bool SetPropertyList( SdDrawDocument *pDoc, XPropertyListType t, XPropertyList *pList )
-{
- switch (t) {
- case XCOLOR_LIST: pDoc->SetColorTable( static_cast<XColorList *>(pList) ); break;
- case XDASH_LIST: pDoc->SetDashList( static_cast<XDashList *>(pList) ); break;
- case XLINE_END_LIST: pDoc->SetLineEndList( static_cast<XLineEndList *>(pList) ); break;
- case XHATCH_LIST: pDoc->SetHatchList( static_cast<XHatchList *>(pList) ); break;
- case XGRADIENT_LIST: pDoc->SetGradientList( static_cast<XGradientList *>(pList) ); break;
- case XBITMAP_LIST: pDoc->SetBitmapList( static_cast<XBitmapList *>(pList) ); break;
- default:
- return false;
- }
- return true;
-}
-
-static inline XPropertyList *GetPropertyList( SdDrawDocument *pDoc, XPropertyListType t)
-{
- switch (t) {
- case XCOLOR_LIST: return pDoc->GetColorTable();
- case XDASH_LIST: return pDoc->GetDashList();
- case XLINE_END_LIST: return pDoc->GetLineEndList();
- case XHATCH_LIST: return pDoc->GetHatchList();
- case XGRADIENT_LIST: return pDoc->GetGradientList();
- case XBITMAP_LIST: return pDoc->GetBitmapList();
- default:
- return NULL;
- }
-}
-
bool DocumentSettings::LoadList( XPropertyListType t, const rtl::OUString &rInPath,
const uno::Reference< embed::XStorage > &xStorage )
{
@@ -280,14 +251,15 @@ bool DocumentSettings::LoadList( XPropertyListType t, const rtl::OUString &rInPa
aPath = rInPath.copy( 0, nSlash );
}
- XPropertyList *pList = XPropertyList::CreatePropertyList(
+ XPropertyListRef pList = XPropertyList::CreatePropertyList(
t, aPath, (XOutdevItemPool*)&pDoc->GetPool() );
pList->SetName( aName );
if( pList->LoadFrom( xStorage, rInPath ) )
- return SetPropertyList( pDoc, t, pList );
- else
- delete pList;
+ {
+ pDoc->SetPropertyList( pList );
+ return true;
+ }
return false;
}
@@ -369,9 +341,8 @@ uno::Sequence<beans::PropertyValue>
SdDrawDocument* pDoc = mpModel->GetDoc();
for( size_t i = 0; i < SAL_N_ELEMENTS( aURLPropertyNames ); i++ )
{
- XPropertyListType t = (XPropertyListType) i;
- XPropertyList *pList = GetPropertyList( pDoc, t );
- if( ( bHasEmbed = pList && pList->IsEmbedInDocument() ) )
+ XPropertyListRef pList = pDoc->GetPropertyList( (XPropertyListType) i );
+ if( ( bHasEmbed = pList.is() && pList->IsEmbedInDocument() ) )
break;
}
if( !bHasEmbed )
@@ -392,8 +363,8 @@ uno::Sequence<beans::PropertyValue>
XPropertyListType t = getTypeOfName( aConfigProps[i].Name );
aRet[i] = aConfigProps[i];
if (t >= 0) {
- XPropertyList *pList = GetPropertyList( pDoc, t );
- if( !pList || !pList->IsEmbedInDocument() )
+ XPropertyListRef pList = pDoc->GetPropertyList( t );
+ if( !pList.is() || !pList->IsEmbedInDocument() )
continue; // no change ...
else
{
@@ -967,8 +938,8 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
void DocumentSettings::ExtractURL( XPropertyListType t, Any* pValue )
{
- XPropertyList *pList = GetPropertyList( mpModel->GetDoc(), t );
- if( !pList )
+ XPropertyListRef pList = mpModel->GetDoc()->GetPropertyList( t );
+ if( !pList.is() )
return;
INetURLObject aPathURL( pList->GetPath() );
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 73c4eded2346..9d93c312adde 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -166,9 +166,7 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
else
{
if ( pDlg )
- {
- pDlg->SetColorTable(GetDoc()->GetColorTable());
- }
+ pDlg->SetColorList(GetDoc()->GetColorList());
SfxItemSet aSet( GetDoc()->GetPool() );
mpDrawView->GetAttributes( aSet );
@@ -420,8 +418,8 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
{
pDlg = (SvxBmpMask*) ( GetViewFrame()->GetChildWindow( nId )->GetWindow() );
- if ( pDlg->NeedsColorTable() )
- pDlg->SetColorTable( GetDoc()->GetColorTable() );
+ if ( pDlg->NeedsColorList() )
+ pDlg->SetColorList( GetDoc()->GetColorList() );
}
if ( rMarkList.GetMarkCount() == 1 )
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index c1b3cbf249f1..9a9b67cc5f79 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -371,7 +371,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, sal_False);
SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, sal_False);
- XGradientList *pGradientList = GetDoc()->GetGradientList ();
+ XGradientListRef pGradientList = GetDoc()->GetGradientList ();
long nCounts = pGradientList->Count ();
Color aColor ((sal_uInt8) pRed->GetValue (),
(sal_uInt8) pGreen->GetValue (),
@@ -431,7 +431,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, sal_False);
SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, sal_False);
- XHatchList *pHatchList = GetDoc()->GetHatchList ();
+ XHatchListRef pHatchList = GetDoc()->GetHatchList ();
long nCounts = pHatchList->Count ();
Color aColor ((sal_uInt8) pRed->GetValue (),
(sal_uInt8) pGreen->GetValue (),
@@ -496,7 +496,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->ClearItem (XATTR_LINEDASH);
pAttr->ClearItem (XATTR_LINESTYLE);
- XDashList *pDashList = GetDoc()->GetDashList ();
+ XDashListRef pDashList = GetDoc()->GetDashList();
long nCounts = pDashList->Count ();
XDashEntry *pEntry = new XDashEntry (aNewDash, pName->GetValue ());
long i;
@@ -548,7 +548,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->ClearItem (XATTR_FILLGRADIENT);
pAttr->ClearItem (XATTR_FILLSTYLE);
- XGradientList *pGradientList = GetDoc()->GetGradientList ();
+ XGradientListRef pGradientList = GetDoc()->GetGradientList ();
long nCounts = pGradientList->Count ();
long i;
@@ -614,7 +614,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->ClearItem (XATTR_FILLHATCH);
pAttr->ClearItem (XATTR_FILLSTYLE);
- XHatchList *pHatchList = GetDoc()->GetHatchList ();
+ XHatchListRef pHatchList = GetDoc()->GetHatchList ();
long nCounts = pHatchList->Count ();
long i;
@@ -664,7 +664,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
{
SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
- XGradientList *pGradientList = GetDoc()->GetGradientList ();
+ XGradientListRef pGradientList = GetDoc()->GetGradientList ();
long nCounts = pGradientList->Count ();
for (long i = 0;
@@ -698,7 +698,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
{
SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
- XHatchList *pHatchList = GetDoc()->GetHatchList ();
+ XHatchListRef pHatchList = GetDoc()->GetHatchList ();
long nCounts = pHatchList->Count ();
for (long i = 0;