summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-04-28 10:57:18 +0000
committerArmin Le Grand <alg@apache.org>2013-04-28 10:57:18 +0000
commit5e5dca13097c4d23f4efce9296163ff47e26872e (patch)
tree59f7d3ffc8cfc9bb3e4a06f0d2928d6b4fc649e4 /sd
parenteb15aa364708f091c4c59a66f9c3f43e35dafd31 (diff)
i122120 Cleanup of XPropertyList and derivates to RefCounted instances, more cleanups
Notes
Notes: prefer: c8dc73720883333a13187865cd0d69b64af6b4b5
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdabstdlg.hxx3
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx34
-rw-r--r--sd/source/ui/dlg/celltempl.cxx116
-rw-r--r--sd/source/ui/dlg/celltempl.src70
-rw-r--r--sd/source/ui/dlg/copydlg.cxx8
-rw-r--r--sd/source/ui/dlg/dlgpage.cxx16
-rw-r--r--sd/source/ui/dlg/prltempl.cxx28
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx4
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx2
-rw-r--r--sd/source/ui/dlg/tabtempl.cxx28
-rw-r--r--sd/source/ui/dlg/tpaction.cxx4
-rw-r--r--sd/source/ui/docshell/docshel3.cxx7
-rw-r--r--sd/source/ui/docshell/docshell.cxx12
-rw-r--r--sd/source/ui/func/fuconrec.cxx8
-rw-r--r--sd/source/ui/func/fucopy.cxx2
-rw-r--r--sd/source/ui/func/fulinend.cxx14
-rw-r--r--sd/source/ui/inc/celltempl.hrc25
-rw-r--r--sd/source/ui/inc/celltempl.hxx55
-rw-r--r--sd/source/ui/inc/copydlg.hxx7
-rw-r--r--sd/source/ui/inc/dlgpage.hxx13
-rw-r--r--sd/source/ui/inc/prltempl.hxx18
-rw-r--r--sd/source/ui/inc/tabtempl.hxx18
-rw-r--r--sd/source/ui/inc/tpaction.hxx2
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx72
-rw-r--r--sd/source/ui/view/drviews6.cxx4
-rw-r--r--sd/source/ui/view/drviews9.cxx54
26 files changed, 163 insertions, 461 deletions
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index ead17cc3aeb5..de6583041aa4 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -51,7 +51,6 @@ class SfxObjectShell;
class SfxObjectShellLock;
class SvxFieldData;
class GDIMetaFile;
-class XColorList;
class SdDrawDocument;
class SfxMedium;
class SdrObject;
@@ -182,7 +181,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, XColorListSharedPtr aColTab, ::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/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index f098dd51aec3..70d1f6de171e 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -230,32 +230,27 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, Window* pParent, con
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorList* pColorTable = NULL;
- bool bKillTable = false;
+ XColorListSharedPtr aColorTable;
const SfxPoolItem* pItem = NULL;
if ( pDocSh && ( ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != 0) )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+ aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
- if ( !pColorTable )
+ if ( !aColorTable.get() )
{
- pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
- bKillTable = sal_True;
+ aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
}
sal_Int32 nColor = 0;
rValue >>= nColor;
- for ( long i = 0; i < pColorTable->Count(); i++ )
+ for ( long i = 0; i < aColorTable->Count(); i++ )
{
- XColorEntry* pEntry = pColorTable->GetColor(i);
+ XColorEntry* pEntry = aColorTable->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;
}
// --------------------------------------------------------------------
@@ -1250,32 +1245,27 @@ 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;
+ XColorListSharedPtr aColorTable;
const SfxPoolItem* pItem = NULL;
if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != 0 ) )
- pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+ aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
- if ( !pColorTable )
+ if ( !aColorTable.get() )
{
- pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
- bKillTable = sal_True;
+ aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
}
mpCLBDimColor->SetUpdateMode( sal_False );
- for ( long i = 0; i < pColorTable->Count(); i++ )
+ for ( long i = 0; i < aColorTable->Count(); i++ )
{
- XColorEntry* pEntry = pColorTable->GetColor(i);
+ XColorEntry* pEntry = aColorTable->GetColor(i);
mpCLBDimColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
mpCLBDimColor->SetUpdateMode( sal_True );
- if ( bKillTable )
- delete pColorTable;
-
//
// init settings controls
//
diff --git a/sd/source/ui/dlg/celltempl.cxx b/sd/source/ui/dlg/celltempl.cxx
deleted file mode 100644
index 9405bf7c5b2e..000000000000
--- a/sd/source/ui/dlg/celltempl.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#ifdef SD_DLLIMPLEMENTATION
-#undef SD_DLLIMPLEMENTATION
-#endif
-
-#include <svl/style.hxx>
-#include <svl/intitem.hxx>
-
-#include <svx/dialogs.hrc>
-#include <svx/drawitem.hxx>
-#include <editeng/bulitem.hxx>
-#include <editeng/eeitem.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/numitem.hxx>
-#include <svx/svdmodel.hxx>
-
-#include "DrawDocShell.hxx"
-#include "sdresid.hxx"
-#include "celltempl.hxx"
-#include "celltempl.hrc"
-#include "bulmaper.hxx"
-
-/*************************************************************************
-|*
-|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
-|*
-\************************************************************************/
-
-SdPresCellTemplateDlg::SdPresCellTemplateDlg( SdrModel* pModel, Window* pParent, SfxStyleSheetBase& rStyleBase )
-: SfxStyleDialog( pParent, SdResId(TAB_CELL_TEMPLATE), rStyleBase, sal_False )
-, mpColorTab( pModel->GetColorTable() )
-, mpGradientList( pModel->GetGradientList() )
-, mpHatchingList( pModel->GetHatchList() )
-, mpBitmapList( pModel->GetBitmapList() )
-{
- FreeResource();
-
- AddTabPage( RID_SVXPAGE_CHAR_NAME );
- AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
- AddTabPage( RID_SVXPAGE_BORDER );
- AddTabPage( RID_SVXPAGE_AREA );
-}
-
-// -----------------------------------------------------------------------
-
-SdPresCellTemplateDlg::~SdPresCellTemplateDlg()
-{
-}
-
-// -----------------------------------------------------------------------
-
-void SdPresCellTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
-{
- switch( nId )
- {
- case RID_SVXPAGE_AREA:
- {
- SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put (SvxColorTableItem(mpColorTab,SID_COLOR_TABLE));
- aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST));
- aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST));
- aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST));
- aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
- aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
- aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
- rPage.PageCreated(aSet);
- }
- break;
-
- default:
- SfxTabDialog::PageCreated( nId, rPage );
- break;
- }
-}
-
-// -----------------------------------------------------------------------
-
-const SfxItemSet* SdPresCellTemplateDlg::GetRefreshedSet()
-{
- SfxItemSet* pRet = GetInputSetImpl();
-
- if( pRet )
- {
- pRet->ClearItem();
- pRet->SetParent( GetStyleSheet().GetItemSet().GetParent() );
- }
- else
- pRet = new SfxItemSet( GetStyleSheet().GetItemSet() );
-
- return pRet;
-}
diff --git a/sd/source/ui/dlg/celltempl.src b/sd/source/ui/dlg/celltempl.src
deleted file mode 100644
index eaa2842257c2..000000000000
--- a/sd/source/ui/dlg/celltempl.src
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-#include "enumdlg.hrc"
-#include "celltempl.hrc"
-#include <svx/dialogs.hrc>
-
-TabDialog TAB_CELL_TEMPLATE
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- Text [ en-US ] = "Cell Style" ;
-
- Size = MAP_APPFONT ( 289 , 176 ) ;
-
- TabControl 1
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 3 , 3 ) ;
- Size = MAP_APPFONT ( 260 , 135 ) ;
- PageList =
- {
- PageItem
- {
- Identifier = RID_SVXPAGE_CHAR_NAME ;
- PageResID = RID_SVXPAGE_CHAR_NAME ;
- Text [ en-US ] = "Font" ;
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_CHAR_EFFECTS ;
- PageResID = RID_SVXPAGE_CHAR_EFFECTS ;
- Text [ en-US ] = "Font Effects" ;
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_BORDER;
- PageResID = RID_SVXPAGE_BORDER;
- Text [ en-US ] = "Borders" ;
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_AREA;
- PageResID = RID_SVXPAGE_AREA;
- Text [ en-US ] = "Background";
- };
- };
- };
-};
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 4efb7a576b17..461ffc1a8ba2 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -62,7 +62,7 @@ namespace sd {
CopyDlg::CopyDlg(
::Window* pWindow,
const SfxItemSet& rInAttrs,
- XColorList* pColTab,
+ XColorListSharedPtr aColTab,
::sd::View* pInView )
: SfxModalDialog ( pWindow, SdResId( DLG_COPY ) ),
maFtCopies ( this, SdResId( FT_COPIES ) ),
@@ -90,7 +90,7 @@ CopyDlg::CopyDlg(
maBtnHelp ( this, SdResId( BTN_HELP ) ),
maBtnSetDefault ( this, SdResId( BTN_SET_DEFAULT ) ),
mrOutAttrs ( rInAttrs ),
- mpColorTab ( pColTab ),
+ maColorTab ( aColTab ),
maUIScale(pInView->GetDoc()->GetUIScale()),
mpView ( pInView )
{
@@ -101,8 +101,8 @@ CopyDlg::CopyDlg(
maBtnSetViewData.SetAccessibleName (maBtnSetViewData.GetQuickHelpText());
// Farbtabellen
- DBG_ASSERT( mpColorTab, "Keine gueltige ColorTable uebergeben!" );
- maLbStartColor.Fill( mpColorTab );
+ DBG_ASSERT( maColorTab.get(), "Keine gueltige ColorTable uebergeben!" );
+ maLbStartColor.Fill( maColorTab );
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 eeb03420c48f..96f7fd298574 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -65,10 +65,10 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet*
SvxHatchListItem aHatchListItem(*( (const SvxHatchListItem*)
( mpDocShell->GetItem( SID_HATCH_LIST ) ) ) );
- mpColorTab = aColorTableItem.GetColorTable();
- mpGradientList = aGradientListItem.GetGradientList();
- mpHatchingList = aHatchListItem.GetHatchList();
- mpBitmapList = aBitmapListItem.GetBitmapList();
+ maColorTab = aColorTableItem.GetColorTable();
+ maGradientList = aGradientListItem.GetGradientList();
+ maHatchingList = aHatchListItem.GetHatchList();
+ maBitmapList = aBitmapListItem.GetBitmapList();
FreeResource();
@@ -98,10 +98,10 @@ 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 (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST));
- aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST));
- aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST));
+ aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxGradientListItem(maGradientList,SID_GRADIENT_LIST));
+ aSet.Put (SvxHatchListItem(maHatchingList,SID_HATCH_LIST));
+ aSet.Put (SvxBitmapListItem(maBitmapList,SID_BITMAP_LIST));
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index 9be3c131cce3..8995ef7ce2e0 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -145,12 +145,12 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
SvxLineEndListItem aLineEndListItem(*( (const SvxLineEndListItem*)
( mpDocShell->GetItem( SID_LINEEND_LIST ) ) ) );
- pColorTab = aColorTableItem.GetColorTable();
- pDashList = aDashListItem.GetDashList();
- pLineEndList = aLineEndListItem.GetLineEndList();
- pGradientList = aGradientListItem.GetGradientList();
- pHatchingList = aHatchListItem.GetHatchList();
- pBitmapList = aBitmapListItem.GetBitmapList();
+ maColorTab = aColorTableItem.GetColorTable();
+ maDashList = aDashListItem.GetDashList();
+ maLineEndList = aLineEndListItem.GetLineEndList();
+ maGradientList = aGradientListItem.GetGradientList();
+ maHatchingList = aHatchListItem.GetHatchList();
+ maBitmapList = aBitmapListItem.GetBitmapList();
switch( DlgId.GetId() )
{
@@ -257,9 +257,9 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
case RID_SVXPAGE_LINE:
{
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
- aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST));
- aSet.Put (SvxLineEndListItem(pLineEndList,SID_LINEEND_LIST));
+ aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxDashListItem(maDashList,SID_DASH_LIST));
+ aSet.Put (SvxLineEndListItem(maLineEndList,SID_LINEEND_LIST));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
rPage.PageCreated(aSet);
@@ -268,10 +268,10 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
case RID_SVXPAGE_AREA:
{
- aSet.Put (SvxColorTableItem(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));
+ aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxGradientListItem(maGradientList,SID_GRADIENT_LIST));
+ aSet.Put (SvxHatchListItem(maHatchingList,SID_HATCH_LIST));
+ aSet.Put (SvxBitmapListItem(maBitmapList,SID_BITMAP_LIST));
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,nPos));
@@ -281,7 +281,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
break;
case RID_SVXPAGE_SHADOW:
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE)); //add CHINA001
+ aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE)); //add CHINA001
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 f8f00cba2de0..3cac21c9f461 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -391,9 +391,9 @@ 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
+ XColorListSharedPtr aColTab, ::sd::View* pView ) //add for CopyDlg
{
- return new AbstractCopyDlg_Impl( new ::sd::CopyDlg( pWindow, rInAttrs, pColTab, pView ) );
+ return new AbstractCopyDlg_Impl( new ::sd::CopyDlg( pWindow, rInAttrs, aColTab, pView ) );
}
//add for CopyDlg end
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index aabb19d784b1..81c0ca827846 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -255,7 +255,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, XColorListSharedPtr aColTab, ::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 113f361248a8..d89fd628848e 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -69,12 +69,12 @@ SdTabTemplateDlg::SdTabTemplateDlg( Window* pParent,
SfxStyleDialog ( pParent, SdResId( TAB_TEMPLATE ), rStyleBase, sal_False ),
rDocShell ( *pDocShell ),
pSdrView ( pView ),
- pColorTab ( pModel->GetColorTable() ),
- pGradientList ( pModel->GetGradientList() ),
- pHatchingList ( pModel->GetHatchList() ),
- pBitmapList ( pModel->GetBitmapList() ),
- pDashList ( pModel->GetDashList() ),
- pLineEndList ( pModel->GetLineEndList() )
+ maColorTab ( pModel->GetColorTableFromSdrModel() ),
+ maGradientList ( pModel->GetGradientListFromSdrModel() ),
+ maHatchingList ( pModel->GetHatchListFromSdrModel() ),
+ maBitmapList ( pModel->GetBitmapListFromSdrModel() ),
+ maDashList ( pModel->GetDashListFromSdrModel() ),
+ maLineEndList ( pModel->GetLineEndListFromSdrModel() )
{
FreeResource();
@@ -123,18 +123,18 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
switch( nId )
{
case RID_SVXPAGE_LINE:
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE));
- aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST));
- aSet.Put (SvxLineEndListItem(pLineEndList,SID_LINEEND_LIST));
+ aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxDashListItem(maDashList,SID_DASH_LIST));
+ aSet.Put (SvxLineEndListItem(maLineEndList,SID_LINEEND_LIST));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
rPage.PageCreated(aSet);
break;
case RID_SVXPAGE_AREA:
- aSet.Put (SvxColorTableItem(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));
+ aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE));
+ aSet.Put (SvxGradientListItem(maGradientList,SID_GRADIENT_LIST));
+ aSet.Put (SvxHatchListItem(maHatchingList,SID_HATCH_LIST));
+ aSet.Put (SvxBitmapListItem(maBitmapList,SID_BITMAP_LIST));
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,nPos));
@@ -144,7 +144,7 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
break;
case RID_SVXPAGE_SHADOW:
- aSet.Put (SvxColorTableItem(pColorTab,SID_COLOR_TABLE)); //add CHINA001
+ aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE)); //add CHINA001
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 18879cf715e0..212a0141f716 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -186,8 +186,8 @@ void SdTPAction::SetView( const ::sd::View* pSdView )
aLbTreeDocument.SetViewFrame( pFrame );
SvxColorTableItem aItem( *(const SvxColorTableItem*)( pDocSh->GetItem( SID_COLOR_TABLE ) ) );
- pColTab = aItem.GetColorTable();
- DBG_ASSERT( pColTab, "Keine Farbtabelle vorhanden!" );
+ maColTab = aItem.GetColorTable();
+ DBG_ASSERT( maColTab.get(), "Keine Farbtabelle vorhanden!" );
}
else
{
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 51fe0cb0ff17..bccb935b5861 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -191,9 +191,10 @@ void DrawDocShell::Execute( SfxRequest& rReq )
case SID_GET_COLORTABLE:
{
// 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 ) );
+ const SvxColorTableItem* pColItem = static_cast< const SvxColorTableItem* >(GetItem( SID_COLOR_TABLE ));
+ XColorListSharedPtr aTable = pColItem->GetColorTable();
+
+ rReq.SetReturnValue( SvxColorTableItem( aTable, SID_GET_COLORTABLE ) );
}
break;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 4d984299a92f..805936a8deed 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -473,12 +473,12 @@ void DrawDocShell::Deactivate( sal_Bool )
void DrawDocShell::UpdateTablePointers()
{
- PutItem( SvxColorTableItem( mpDoc->GetColorTable(), SID_COLOR_TABLE ) );
- PutItem( SvxGradientListItem( mpDoc->GetGradientList(), SID_GRADIENT_LIST ) );
- PutItem( SvxHatchListItem( mpDoc->GetHatchList(), SID_HATCH_LIST ) );
- PutItem( SvxBitmapListItem( mpDoc->GetBitmapList(), SID_BITMAP_LIST ) );
- PutItem( SvxDashListItem( mpDoc->GetDashList(), SID_DASH_LIST ) );
- PutItem( SvxLineEndListItem( mpDoc->GetLineEndList(), SID_LINEEND_LIST ) );
+ PutItem( SvxColorTableItem( mpDoc->GetColorTableFromSdrModel(), SID_COLOR_TABLE ) );
+ PutItem( SvxGradientListItem( mpDoc->GetGradientListFromSdrModel(), SID_GRADIENT_LIST ) );
+ PutItem( SvxHatchListItem( mpDoc->GetHatchListFromSdrModel(), SID_HATCH_LIST ) );
+ PutItem( SvxBitmapListItem( mpDoc->GetBitmapListFromSdrModel(), SID_BITMAP_LIST ) );
+ PutItem( SvxDashListItem( mpDoc->GetDashListFromSdrModel(), SID_DASH_LIST ) );
+ PutItem( SvxLineEndListItem( mpDoc->GetLineEndListFromSdrModel(), SID_LINEEND_LIST ) );
UpdateFontList();
}
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index b2c042d77005..4e0473448138 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -591,16 +591,16 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
::basegfx::B2DPolyPolygon getPolygon( sal_uInt16 nResId, SdrModel* pDoc )
{
::basegfx::B2DPolyPolygon aRetval;
- XLineEndList* pLineEndList = pDoc->GetLineEndList();
+ XLineEndListSharedPtr aLineEndList = pDoc->GetLineEndListFromSdrModel();
- if( pLineEndList )
+ if( aLineEndList.get() )
{
String aArrowName( SVX_RES(nResId) );
- long nCount = pLineEndList->Count();
+ long nCount = aLineEndList->Count();
long nIndex;
for( nIndex = 0L; nIndex < nCount; nIndex++ )
{
- XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex);
+ XLineEndEntry* pEntry = aLineEndList->GetLineEnd(nIndex);
if( pEntry->GetName() == aArrowName )
{
aRetval = pEntry->GetLineEnd();
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 70188a95c6f0..897f19fa5c13 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -114,7 +114,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->GetColorTableFromSdrModel(), 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 41b3676c8bc1..553308c38652 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -108,14 +108,12 @@ void FuLineEnd::DoExecute( SfxRequest& )
// Loeschen des angelegten PolyObjektes
SdrObject::Free( pConvPolyObj );
- XLineEndList* pLineEndList = mpDoc->GetLineEndList();
- XLineEndEntry* pEntry;
-
String aNewName( SdResId( STR_LINEEND ) );
String aDesc( SdResId( STR_DESC_LINEEND ) );
String aName;
- long nCount = pLineEndList->Count();
+ XLineEndListSharedPtr aLineEndList = mpDoc->GetLineEndListFromSdrModel();
+ long nCount = aLineEndList.get() ? aLineEndList->Count() : 0;
long j = 1;
sal_Bool bDifferent = sal_False;
@@ -127,7 +125,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
bDifferent = sal_True;
for( long i = 0; i < nCount && bDifferent; i++ )
{
- if( aName == pLineEndList->GetLineEnd( i )->GetName() )
+ if( aName == aLineEndList->GetLineEnd( i )->GetName() )
bDifferent = sal_False;
}
}
@@ -146,14 +144,14 @@ void FuLineEnd::DoExecute( SfxRequest& )
for( long i = 0; i < nCount && bDifferent; i++ )
{
- if( aName == pLineEndList->GetLineEnd( i )->GetName() )
+ if( aName == aLineEndList->GetLineEnd( i )->GetName() )
bDifferent = sal_False;
}
if( bDifferent )
{
- pEntry = new XLineEndEntry( aPolyPolygon, aName );
- pLineEndList->Insert( pEntry, LIST_APPEND);
+ XLineEndEntry* pEntry = new XLineEndEntry( aPolyPolygon, aName );
+ aLineEndList->Insert( pEntry, LIST_APPEND);
}
else
{
diff --git a/sd/source/ui/inc/celltempl.hrc b/sd/source/ui/inc/celltempl.hrc
deleted file mode 100644
index ed4faf49beac..000000000000
--- a/sd/source/ui/inc/celltempl.hrc
+++ /dev/null
@@ -1,25 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#include <sfx2/sfx.hrc>
-#define TAB_CELL_TEMPLATE 910
-#define TAB_CONTROL 1
diff --git a/sd/source/ui/inc/celltempl.hxx b/sd/source/ui/inc/celltempl.hxx
deleted file mode 100644
index 7cb005c1c1ee..000000000000
--- a/sd/source/ui/inc/celltempl.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/**************************************************************
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-
-#ifndef SD_CELLTEMPL_HXX
-#define SD_CELLTEMPL_HXX
-
-#include <sfx2/styledlg.hxx>
-
-class XColorList;
-class XGradientList;
-class XHatchList;
-class XBitmapList;
-class SfxStyleSheetBase;
-class SdrModel;
-
-class SdPresCellTemplateDlg : public SfxStyleDialog
-{
-private:
- XColorList* mpColorTab;
- XGradientList* mpGradientList;
- XHatchList* mpHatchingList;
- XBitmapList* mpBitmapList;
-
- virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
- virtual const SfxItemSet* GetRefreshedSet();
-
-public:
- SdPresCellTemplateDlg( SdrModel* pModel, Window* pParent, SfxStyleSheetBase& rStyleBase );
- ~SdPresCellTemplateDlg();
-
- const SfxItemSet* GetOutputItemSet() const;
-};
-
-
-#endif // SD_CELLTEMPL_HXX
diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx
index 467f48b6ad47..7f91357ce485 100644
--- a/sd/source/ui/inc/copydlg.hxx
+++ b/sd/source/ui/inc/copydlg.hxx
@@ -33,8 +33,6 @@
#include <vcl/fixed.hxx>
#include <sfx2/basedlgs.hxx>
-class XColorList;
-
namespace sd {
class View;
@@ -48,8 +46,7 @@ class CopyDlg
: public SfxModalDialog
{
public:
- CopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
- XColorList* pColTab, ::sd::View* pView );
+ CopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorListSharedPtr aColTab, ::sd::View* pView );
~CopyDlg();
void GetAttr( SfxItemSet& rOutAttrs );
@@ -86,7 +83,7 @@ private:
PushButton maBtnSetDefault;
const SfxItemSet& mrOutAttrs;
- XColorList* mpColorTab;
+ XColorListSharedPtr maColorTab;
Fraction maUIScale;
::sd::View* mpView;
diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx
index 27116933a605..4a5674d992db 100644
--- a/sd/source/ui/inc/dlgpage.hxx
+++ b/sd/source/ui/inc/dlgpage.hxx
@@ -29,11 +29,6 @@
#include "dlgpage.hrc"
class SfxObjectShell;
-class XColorList;
-class XGradientList;
-class XHatchList;
-class XBitmapList;
-
typedef sal_uInt16 ChangeType;
/*************************************************************************
@@ -48,10 +43,10 @@ private:
const SfxObjectShell* mpDocShell;
- XColorList* mpColorTab;
- XGradientList* mpGradientList;
- XHatchList* mpHatchingList;
- XBitmapList* mpBitmapList;
+ XColorListSharedPtr maColorTab;
+ XGradientListSharedPtr maGradientList;
+ XHatchListSharedPtr maHatchingList;
+ XBitmapListSharedPtr maBitmapList;
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 c556703989bb..cdcd4c6376e9 100644
--- a/sd/source/ui/inc/prltempl.hxx
+++ b/sd/source/ui/inc/prltempl.hxx
@@ -34,12 +34,6 @@
#include "prlayout.hxx" // fuer enum PresentationObjects
-class XColorList;
-class XGradientList;
-class XHatchList;
-class XBitmapList;
-class XDashList;
-class XLineEndList;
class SfxObjectShell;
class SfxStyleSheetBase;
class SfxStyleSheetBasePool;
@@ -54,12 +48,12 @@ class SdPresLayoutTemplateDlg : public SfxTabDialog
private:
const SfxObjectShell* mpDocShell;
- XColorList* pColorTab;
- XGradientList* pGradientList;
- XHatchList* pHatchingList;
- XBitmapList* pBitmapList;
- XDashList* pDashList;
- XLineEndList* pLineEndList;
+ XColorListSharedPtr maColorTab;
+ XGradientListSharedPtr maGradientList;
+ XHatchListSharedPtr maHatchingList;
+ XBitmapListSharedPtr maBitmapList;
+ XDashListSharedPtr maDashList;
+ XLineEndListSharedPtr maLineEndList;
sal_uInt16 nPageType;
sal_uInt16 nDlgType;
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
index 0c114fc8ab27..cb6d2528bf36 100644
--- a/sd/source/ui/inc/tabtempl.hxx
+++ b/sd/source/ui/inc/tabtempl.hxx
@@ -30,12 +30,6 @@
class SdrModel;
class SfxObjectShell;
class SdrView;
-class XColorList;
-class XGradientList;
-class XBitmapList;
-class XDashList;
-class XHatchList;
-class XLineEndList;
/*************************************************************************
@@ -49,12 +43,12 @@ private:
const SfxObjectShell& rDocShell;
SdrView* pSdrView;
- XColorList* pColorTab;
- XGradientList* pGradientList;
- XHatchList* pHatchingList;
- XBitmapList* pBitmapList;
- XDashList* pDashList;
- XLineEndList* pLineEndList;
+ XColorListSharedPtr maColorTab;
+ XGradientListSharedPtr maGradientList;
+ XHatchListSharedPtr maHatchingList;
+ XBitmapListSharedPtr maBitmapList;
+ XDashListSharedPtr maDashList;
+ XLineEndListSharedPtr maLineEndList;
sal_uInt16 nPageType;
sal_uInt16 nDlgType;
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index 75c4cb6ffc66..de16381c2320 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -89,7 +89,7 @@ private:
const SfxItemSet& rOutAttrs;
const ::sd::View* mpView;
SdDrawDocument* mpDoc;
- XColorList* pColTab;
+ XColorListSharedPtr maColTab;
sal_Bool bTreeUpdated;
List* pCurrentActions;
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index f80119d2d0b4..e3efe1370b96 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -278,11 +278,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XColorList* pColTab = new XColorList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
- pColTab->SetName( aURL.getName() );
- if( pColTab->Load() )
+ XColorListSharedPtr aColTab(XPropertyListFactory::CreateSharedXColorList(aPathURL.GetMainURL(INetURLObject::NO_DECODE)));
+ aColTab->SetName( aURL.getName() );
+ if( aColTab->Load() )
{
- pDoc->SetColorTable( pColTab );
+ pDoc->SetColorTableAtSdrModel( aColTab );
bOk = sal_True;
bChanged = sal_True;
}
@@ -300,11 +300,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XDashList* pDashTab = new XDashList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
- pDashTab->SetName( aURL.getName() );
- if( pDashTab->Load() )
+ XDashListSharedPtr aDashTab(XPropertyListFactory::CreateSharedXDashList(aPathURL.GetMainURL(INetURLObject::NO_DECODE)));
+ aDashTab->SetName( aURL.getName() );
+ if( aDashTab->Load() )
{
- pDoc->SetDashList( pDashTab );
+ pDoc->SetDashListAtSdrModel( aDashTab );
bOk = sal_True;
bChanged = sal_True;
}
@@ -322,11 +322,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XLineEndList* pTab = new XLineEndList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
- pTab->SetName( aURL.getName() );
- if( pTab->Load() )
+ XLineEndListSharedPtr aTab(XPropertyListFactory::CreateSharedXLineEndList(aPathURL.GetMainURL(INetURLObject::NO_DECODE)));
+ aTab->SetName( aURL.getName() );
+ if( aTab->Load() )
{
- pDoc->SetLineEndList( pTab );
+ pDoc->SetLineEndListAtSdrModel( aTab );
bOk = sal_True;
bChanged = sal_True;
}
@@ -344,11 +344,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XHatchList* pTab = new XHatchList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
- pTab->SetName( aURL.getName() );
- if( pTab->Load() )
+ XHatchListSharedPtr aTab(XPropertyListFactory::CreateSharedXHatchList(aPathURL.GetMainURL(INetURLObject::NO_DECODE)));
+ aTab->SetName( aURL.getName() );
+ if( aTab->Load() )
{
- pDoc->SetHatchList( pTab );
+ pDoc->SetHatchListAtSdrModel( aTab );
bOk = sal_True;
bChanged = sal_True;
}
@@ -366,11 +366,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XGradientList* pTab = new XGradientList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
- pTab->SetName( aURL.getName() );
- if( pTab->Load() )
+ XGradientListSharedPtr aTab(XPropertyListFactory::CreateSharedXGradientList(aPathURL.GetMainURL(INetURLObject::NO_DECODE)));
+ aTab->SetName( aURL.getName() );
+ if( aTab->Load() )
{
- pDoc->SetGradientList( pTab );
+ pDoc->SetGradientListAtSdrModel( aTab );
bOk = sal_True;
bChanged = sal_True;
}
@@ -388,11 +388,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XBitmapList* pTab = new XBitmapList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
- pTab->SetName( aURL.getName() );
- if( pTab->Load() )
+ XBitmapListSharedPtr aTab(XPropertyListFactory::CreateSharedXBitmapList(aPathURL.GetMainURL(INetURLObject::NO_DECODE )));
+ aTab->SetName( aURL.getName() );
+ if( aTab->Load() )
{
- pDoc->SetBitmapList( pTab );
+ pDoc->SetBitmapListAtSdrModel( aTab );
bOk = sal_True;
bChanged = sal_True;
}
@@ -910,8 +910,8 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
{
case HANDLE_COLORTABLEURL:
{
- INetURLObject aPathURL( pDoc->GetColorTable()->GetPath() );
- aPathURL.insertName( pDoc->GetColorTable()->GetName() );
+ INetURLObject aPathURL( pDoc->GetColorTableFromSdrModel()->GetPath() );
+ aPathURL.insertName( pDoc->GetColorTableFromSdrModel()->GetName() );
String aExt( RTL_CONSTASCII_USTRINGPARAM("soc") );
aPathURL.setExtension( aExt );
OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -920,8 +920,8 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
break;
case HANDLE_DASHTABLEURL:
{
- INetURLObject aPathURL( pDoc->GetDashList()->GetPath() );
- aPathURL.insertName( pDoc->GetDashList()->GetName() );
+ INetURLObject aPathURL( pDoc->GetDashListFromSdrModel()->GetPath() );
+ aPathURL.insertName( pDoc->GetDashListFromSdrModel()->GetName() );
String aExt( RTL_CONSTASCII_USTRINGPARAM("sod") );
aPathURL.setExtension( aExt );
OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -930,8 +930,8 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
break;
case HANDLE_LINEENDTABLEURL:
{
- INetURLObject aPathURL( pDoc->GetLineEndList()->GetPath() );
- aPathURL.insertName( pDoc->GetLineEndList()->GetName() );
+ INetURLObject aPathURL( pDoc->GetLineEndListFromSdrModel()->GetPath() );
+ aPathURL.insertName( pDoc->GetLineEndListFromSdrModel()->GetName() );
String aExt( RTL_CONSTASCII_USTRINGPARAM("soe") );
aPathURL.setExtension( aExt );
OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -940,8 +940,8 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
break;
case HANDLE_HATCHTABLEURL:
{
- INetURLObject aPathURL( pDoc->GetHatchList()->GetPath() );
- aPathURL.insertName( pDoc->GetHatchList()->GetName() );
+ INetURLObject aPathURL( pDoc->GetHatchListFromSdrModel()->GetPath() );
+ aPathURL.insertName( pDoc->GetHatchListFromSdrModel()->GetName() );
String aExt( RTL_CONSTASCII_USTRINGPARAM("soh") );
aPathURL.setExtension( aExt );
OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -950,8 +950,8 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
break;
case HANDLE_GRADIENTTABLEURL:
{
- INetURLObject aPathURL( pDoc->GetGradientList()->GetPath() );
- aPathURL.insertName( pDoc->GetGradientList()->GetName() );
+ INetURLObject aPathURL( pDoc->GetGradientListFromSdrModel()->GetPath() );
+ aPathURL.insertName( pDoc->GetGradientListFromSdrModel()->GetName() );
String aExt( RTL_CONSTASCII_USTRINGPARAM("sog") );
aPathURL.setExtension( aExt );
OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -960,8 +960,8 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
break;
case HANDLE_BITMAPTABLEURL:
{
- INetURLObject aPathURL( pDoc->GetBitmapList()->GetPath() );
- aPathURL.insertName( pDoc->GetBitmapList()->GetName() );
+ INetURLObject aPathURL( pDoc->GetBitmapListFromSdrModel()->GetPath() );
+ aPathURL.insertName( pDoc->GetBitmapListFromSdrModel()->GetName() );
String aExt( RTL_CONSTASCII_USTRINGPARAM("sob") );
aPathURL.setExtension( aExt );
OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index a32c862a907b..9c8d44e760f5 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -159,7 +159,7 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
if ( pDlg )
{
// pDlg->SetActive();
- pDlg->SetColorTable(GetDoc()->GetColorTable());
+ pDlg->SetColorTable(GetDoc()->GetColorTableFromSdrModel());
}
SfxItemSet aSet( GetDoc()->GetPool() );
@@ -420,7 +420,7 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
pDlg = (SvxBmpMask*) ( GetViewFrame()->GetChildWindow( nId )->GetWindow() );
if ( pDlg->NeedsColorTable() )
- pDlg->SetColorTable( GetDoc()->GetColorTable() );
+ pDlg->SetColorTable( GetDoc()->GetColorTableFromSdrModel() );
}
if ( rMarkList.GetMarkCount() == 1 )
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 0b3f76224083..198b3e58322e 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -370,8 +370,8 @@ 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 ();
- long nCounts = pGradientList->Count ();
+ XGradientListSharedPtr aGradientList = GetDoc()->GetGradientListFromSdrModel();
+ long nCounts = aGradientList->Count ();
Color aColor ((sal_uInt8) pRed->GetValue (),
(sal_uInt8) pGreen->GetValue (),
(sal_uInt8) pBlue->GetValue ());
@@ -382,7 +382,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
for ( i = 0; i < nCounts; i ++)
{
- XGradientEntry *pEntry = pGradientList->GetGradient (i);
+ XGradientEntry *pEntry = aGradientList->GetGradient (i);
if (pEntry->GetName () == pName->GetValue ())
{
@@ -407,7 +407,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
? aColor
: aBlack);
- GetDoc()->GetGradientList ()->Insert (new XGradientEntry (aGradient, pName->GetValue ()));
+ GetDoc()->GetGradientListFromSdrModel()->Insert (new XGradientEntry (aGradient, pName->GetValue ()));
pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT);
@@ -430,8 +430,8 @@ 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 ();
- long nCounts = pHatchList->Count ();
+ XHatchListSharedPtr aHatchList = GetDoc()->GetHatchListFromSdrModel();
+ long nCounts = aHatchList.get() ? aHatchList->Count() : 0;
Color aColor ((sal_uInt8) pRed->GetValue (),
(sal_uInt8) pGreen->GetValue (),
(sal_uInt8) pBlue->GetValue ());
@@ -442,7 +442,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
for ( i = 0; i < nCounts; i ++)
{
- XHatchEntry *pEntry = pHatchList->GetHatch (i);
+ XHatchEntry *pEntry = aHatchList->GetHatch (i);
if (pEntry->GetName () == pName->GetValue ())
{
@@ -460,7 +460,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
{
XHatch aHatch (aColor);
- GetDoc()->GetHatchList ()->Insert (new XHatchEntry (aHatch, pName->GetValue ()));
+ GetDoc()->GetHatchListFromSdrModel()->Insert (new XHatchEntry (aHatch, pName->GetValue ()));
pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH);
@@ -495,19 +495,19 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->ClearItem (XATTR_LINEDASH);
pAttr->ClearItem (XATTR_LINESTYLE);
- XDashList *pDashList = GetDoc()->GetDashList ();
- long nCounts = pDashList->Count ();
+ XDashListSharedPtr aDashList = GetDoc()->GetDashListFromSdrModel();
+ long nCounts = aDashList.get() ? aDashList->Count() : 0;
XDashEntry *pEntry = new XDashEntry (aNewDash, pName->GetValue ());
long i;
for ( i = 0; i < nCounts; i++ )
- if (pDashList->GetDash (i)->GetName () == pName->GetValue ())
+ if (aDashList->GetDash (i)->GetName () == pName->GetValue ())
break;
if (i < nCounts)
- pDashList->Replace (pEntry, i);
+ aDashList->Replace (pEntry, i);
else
- pDashList->Insert (pEntry);
+ aDashList->Insert (pEntry);
pAttr->Put (XLineDashItem (pName->GetValue (), aNewDash), XATTR_LINEDASH);
pAttr->Put (XLineStyleItem (XLINE_DASH), XATTR_LINESTYLE);
@@ -547,13 +547,13 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->ClearItem (XATTR_FILLGRADIENT);
pAttr->ClearItem (XATTR_FILLSTYLE);
- XGradientList *pGradientList = GetDoc()->GetGradientList ();
- long nCounts = pGradientList->Count ();
+ XGradientListSharedPtr aGradientList = GetDoc()->GetGradientListFromSdrModel();
+ long nCounts = aGradientList->Count ();
long i;
for ( i = 0; i < nCounts; i++ )
{
- XGradientEntry *pEntry = pGradientList->GetGradient (i);
+ XGradientEntry *pEntry = aGradientList->GetGradient (i);
if (pEntry->GetName () == pName->GetValue ())
{
@@ -581,7 +581,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
(short) pCenterY->GetValue (), (short) pBorder->GetValue (),
(short) pStart->GetValue (), (short) pEnd->GetValue ());
- pGradientList->Insert (new XGradientEntry (aGradient, pName->GetValue ()));
+ aGradientList->Insert (new XGradientEntry (aGradient, pName->GetValue ()));
pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT);
}
@@ -613,13 +613,13 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
pAttr->ClearItem (XATTR_FILLHATCH);
pAttr->ClearItem (XATTR_FILLSTYLE);
- XHatchList *pHatchList = GetDoc()->GetHatchList ();
- long nCounts = pHatchList->Count ();
+ XHatchListSharedPtr aHatchList = GetDoc()->GetHatchListFromSdrModel();
+ long nCounts = aHatchList.get() ? aHatchList->Count() : 0;
long i;
for ( i = 0; i < nCounts; i++ )
{
- XHatchEntry *pEntry = pHatchList->GetHatch (i);
+ XHatchEntry *pEntry = aHatchList->GetHatch (i);
if (pEntry->GetName () == pName->GetValue ())
{
@@ -641,7 +641,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
XHatch aHatch (aBlack, (XHatchStyle) pStyle->GetValue (), pDistance->GetValue (),
pAngle->GetValue () * 10);
- pHatchList->Insert (new XHatchEntry (aHatch, pName->GetValue ()));
+ aHatchList->Insert (new XHatchEntry (aHatch, pName->GetValue ()));
pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH);
}
@@ -663,14 +663,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
{
SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
- XGradientList *pGradientList = GetDoc()->GetGradientList ();
- long nCounts = pGradientList->Count ();
+ XGradientListSharedPtr aGradientList = GetDoc()->GetGradientListFromSdrModel();
+ long nCounts = aGradientList->Count ();
for (long i = 0;
i < nCounts;
i ++)
{
- XGradientEntry *pEntry = pGradientList->GetGradient (i);
+ XGradientEntry *pEntry = aGradientList->GetGradient (i);
if (pEntry->GetName () == pName->GetValue ())
{
@@ -697,14 +697,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
{
SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
- XHatchList *pHatchList = GetDoc()->GetHatchList ();
- long nCounts = pHatchList->Count ();
+ XHatchListSharedPtr aHatchList = GetDoc()->GetHatchListFromSdrModel();
+ long nCounts = aHatchList.get() ? aHatchList->Count() : 0;
for (long i = 0;
i < nCounts;
i ++)
{
- XHatchEntry *pEntry = pHatchList->GetHatch (i);
+ XHatchEntry *pEntry = aHatchList->GetHatch (i);
if (pEntry->GetName () == pName->GetValue ())
{