You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/05/18 12:12:56 UTC

svn commit: r1484083 [6/17] - in /openoffice/branches/ia2: ./ ext_libraries/apr/prj/ ext_libraries/coinmp/prj/ ext_libraries/ratscan/prj/ ext_libraries/serf/prj/ main/ main/avmedia/source/quicktime/ main/bridges/prj/ main/bridges/source/cpp_uno/cxx_mac...

Modified: openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh.cxx Sat May 18 10:12:43 2013
@@ -464,10 +464,7 @@ void ScDrawShell::ExecuteAreaDlg( SfxReq
 
     // #i74099# by default, the dialog deletes the current color table if a different one is loaded
     // (see SwDrawShell::ExecDrawDlg)
-    const SvxColorTableItem* pColorItem =
-        static_cast<const SvxColorTableItem*>( pViewData->GetSfxDocShell()->GetItem(SID_COLOR_TABLE) );
-    if (pColorItem->GetColorTable() == XColorList::GetStdColorList())
-        pDlg->DontDeleteColorTable();
+    // const SvxColorTableItem* pColorItem = static_cast<const SvxColorTableItem*>( pViewData->GetSfxDocShell()->GetItem(SID_COLOR_TABLE) );
 
 	if ( nTabPage != 0xffff )
 		pDlg->SetCurPageId( nTabPage );

Modified: openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh4.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh4.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh4.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/drawfunc/drawsh4.cxx Sat May 18 10:12:43 2013
@@ -93,15 +93,15 @@ void ScDrawShell::GetFormTextState(SfxIt
 			if ( pDocSh )
 			{
                 const SfxPoolItem*  pItem = pDocSh->GetItem( SID_COLOR_TABLE );
-				XColorList*		pColorTable = NULL;
+				XColorListSharedPtr aColorTable;
 
 				if ( pItem )
-					pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
+					aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
 
 				pDlg->SetActive();
 
-				if ( pColorTable )
-					pDlg->SetColorTable( pColorTable );
+				if ( aColorTable.get() )
+					pDlg->SetColorTable( aColorTable );
 				else
 					{ DBG_ERROR( "ColorList not found :-/" ); }
 			}

Modified: openoffice/branches/ia2/main/sc/source/ui/drawfunc/drtxtob2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/drawfunc/drtxtob2.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/drawfunc/drtxtob2.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/drawfunc/drtxtob2.cxx Sat May 18 10:12:43 2013
@@ -256,15 +256,15 @@ void ScDrawTextObjectBar::GetFormTextSta
 			if ( pDocSh )
 			{
                 const SfxPoolItem*  pItem = pDocSh->GetItem( SID_COLOR_TABLE );
-				XColorList*		pColorTable = NULL;
+				XColorListSharedPtr aColorTable;
 
 				if ( pItem )
-					pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
+					aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
 
 				pDlg->SetActive();
 
-				if ( pColorTable )
-					pDlg->SetColorTable( pColorTable );
+				if ( aColorTable )
+					pDlg->SetColorTable( aColorTable );
 				else
 					{ DBG_ERROR( "ColorList not found :-/" ); }
 			}

Modified: openoffice/branches/ia2/main/sc/source/ui/inc/drawview.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/inc/drawview.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/inc/drawview.hxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/inc/drawview.hxx Sat May 18 10:12:43 2013
@@ -75,7 +75,20 @@ public:
 
     virtual void    DeleteMarked();
 
-	void			DrawMarks( OutputDevice* pOut ) const;
+    virtual sal_Bool SdrBeginTextEdit(
+        SdrObject* pObj,
+        SdrPageView* pPV = 0L,
+        ::Window* pWin = 0L,
+        sal_Bool bIsNewObj = sal_False,
+        SdrOutliner* pGivenOutliner = 0L,
+        OutlinerView* pGivenOutlinerView = 0L,
+        sal_Bool bDontDeleteOutliner = sal_False,
+        sal_Bool bOnlyOneView = sal_False,
+        sal_Bool bGrabFocus = sal_True);
+
+    virtual SdrEndTextEditKind SdrEndTextEdit( sal_Bool bDontDeleteReally = sal_False );
+
+    void			DrawMarks( OutputDevice* pOut ) const;
 
 	void			MarkDropObj( SdrObject* pObj );
 

Modified: openoffice/branches/ia2/main/sc/source/ui/miscdlgs/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/miscdlgs/makefile.mk?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/miscdlgs/makefile.mk (original)
+++ openoffice/branches/ia2/main/sc/source/ui/miscdlgs/makefile.mk Sat May 18 10:12:43 2013
@@ -42,7 +42,6 @@ SLOFILES =  \
 	$(SLO)$/delcodlg.obj		\
 	$(SLO)$/inscodlg.obj		\
 	$(SLO)$/strindlg.obj		\
-    $(SLO)$/tabbgcolordlg.obj   \
 	$(SLO)$/mtrindlg.obj		\
 	$(SLO)$/lbseldlg.obj		\
 	$(SLO)$/filldlg.obj			\
@@ -72,6 +71,7 @@ SLOFILES =  \
 	$(SLO)$/conflictsdlg.obj    \
 	$(SLO)$/sharedocdlg.obj \
 	$(SLO)$/protectiondlg.obj \
+    $(SLO)$/tabbgcolordlg.obj   \
 	$(SLO)$/retypepassdlg.obj
 
 EXCEPTIONSFILES = \
@@ -83,6 +83,7 @@ EXCEPTIONSFILES = \
     $(SLO)$/crnrdlg.obj         \
     $(SLO)$/solverutil.obj \
     $(SLO)$/protectiondlg.obj \
+    $(SLO)$/tabbgcolordlg.obj   \
     $(SLO)$/retypepassdlg.obj
 
 SRS1NAME=$(TARGET)

Modified: openoffice/branches/ia2/main/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/miscdlgs/tabbgcolordlg.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/miscdlgs/tabbgcolordlg.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/miscdlgs/tabbgcolordlg.cxx Sat May 18 10:12:43 2013
@@ -89,9 +89,7 @@ void ScTabBgColorDlg::FillColorValueSets
 {
     SfxObjectShell* pDocSh = SfxObjectShell::Current();
     const SfxPoolItem* pItem = NULL;
-    XColorList* pColorTable = NULL;
-    ::boost::scoped_ptr< XColorList > pOwnColorTable; // locally instantiated in case the doc shell doesn't have one.
-
+    XColorListSharedPtr aColorTable;
     const Size aSize15x15 = Size( 15, 15 );
     const Size aSize10x10 = Size( 10, 10 );
     const Size aSize5x5 = Size( 5, 5 );
@@ -101,24 +99,23 @@ void ScTabBgColorDlg::FillColorValueSets
 
     if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem(SID_COLOR_TABLE) ) ) )
     {
-        pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+        aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
     }
 
-    if ( !pColorTable )
+    if ( !aColorTable.get() )
     {
-        pOwnColorTable.reset(new XColorList(SvtPathOptions().GetPalettePath()));
-        pColorTable = pOwnColorTable.get();
+        aColorTable = XPropertyListFactory::CreateSharedXColorList(SvtPathOptions().GetPalettePath());
     }
     
     long nColorCount(0);
 
-    if ( pColorTable )
+    if ( aColorTable.get() )
     {
-        nColorCount = pColorTable->Count();
+        nColorCount = aColorTable->Count();
         Color aColWhite( COL_WHITE );
         String aStrWhite( EditResId( RID_SVXITEMS_COLOR_WHITE ) );
 
-        aTabBgColorSet.addEntriesForXColorList(*pColorTable);
+        aTabBgColorSet.addEntriesForXColorList(aColorTable);
     }
 
     if(nColorCount)

Modified: openoffice/branches/ia2/main/sc/source/ui/optdlg/opredlin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/optdlg/opredlin.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/optdlg/opredlin.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/optdlg/opredlin.cxx Sat May 18 10:12:43 2013
@@ -171,7 +171,7 @@ sal_Bool __EXPORT ScRedlineOptionsTabPag
 void __EXPORT ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
 {
 
-	XColorList* pColorTbl = XColorList::GetStdColorList();
+	XColorListSharedPtr aColorTbl = XColorList::GetStdColorList();
 	aContentColorLB.InsertEntry(aAuthorStr);
 	aMoveColorLB.InsertEntry(aAuthorStr);
 	aInsertColorLB.InsertEntry(aAuthorStr);
@@ -182,9 +182,9 @@ void __EXPORT ScRedlineOptionsTabPage::R
 	aInsertColorLB.SetUpdateMode( sal_False);
 	aRemoveColorLB.SetUpdateMode( sal_False);
 
-	for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
+	for( sal_uInt16 i = 0; i < aColorTbl->Count(); ++i )
 	{
-		XColorEntry* pEntry = pColorTbl->GetColor( i );
+		XColorEntry* pEntry = aColorTbl->GetColor( i );
 		Color aColor = pEntry->GetColor();
 		String sName = pEntry->GetName();
 

Modified: openoffice/branches/ia2/main/sc/source/ui/optdlg/tpview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/optdlg/tpview.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/optdlg/tpview.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/optdlg/tpview.cxx Sat May 18 10:12:43 2013
@@ -351,19 +351,19 @@ void ScTpContentOptions::InitGridOpt()
 		// hier koennte auch eine andere DocShell kommen!
 		pDocSh = PTR_CAST(ScDocShell, pDocSh);
 
-		XColorList* pColorTable = NULL;
+		XColorListSharedPtr aColorTable;
 
 		if ( pDocSh  )
 		{
             const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
 
 			if ( pItem )
-				pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
+				aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
 		}
 		else
-			pColorTable = XColorList::GetStdColorList();
+			aColorTable = XColorList::GetStdColorList();
 
-		if ( !pColorTable )
+		if ( !aColorTable.get() )
 			return;
 
 		//------------------------------------------------------
@@ -372,10 +372,10 @@ void ScTpContentOptions::InitGridOpt()
 
 		//	Eintraege aus der Colortable
 
-		long nCount = pColorTable->Count();
+		long nCount = aColorTable->Count();
 		for ( long n=0; n<nCount; n++ )
 		{
-			XColorEntry* pEntry = pColorTable->GetColor(n);
+			XColorEntry* pEntry = aColorTable->GetColor(n);
 			aColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
 		}
 

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx Sat May 18 10:12:43 2013
@@ -21,7 +21,7 @@
 
 #include "precompiled_sc.hxx"
 
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include <AlignmentPropertyPanel.hxx>

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx Sat May 18 10:12:43 2013
@@ -22,7 +22,6 @@
 #ifndef SC_PROPERTYPANEL_ALIGNMENT_HXX
 #define SC_PROPERTYPANEL_ALIGNMENT_HXX
 
-#include <sfx2/sidebar/SidebarPanelBase.hxx>
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <vcl/fixed.hxx>

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.src?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.src (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/AlignmentPropertyPanel.src Sat May 18 10:12:43 2013
@@ -20,7 +20,7 @@
  *************************************************************/
 
 #include "AlignmentPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include "sc.hrc"
 #include "helpids.h"
 

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx Sat May 18 10:12:43 2013
@@ -21,7 +21,7 @@
 
 #include "precompiled_sc.hxx"
 
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include <CellAppearancePropertyPanel.hxx>

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx Sat May 18 10:12:43 2013
@@ -22,7 +22,6 @@
 #ifndef SC_PROPERTYPANEL_APPEARANCE_HXX
 #define SC_PROPERTYPANEL_APPEARANCE_HXX
 
-#include <sfx2/sidebar/SidebarPanelBase.hxx>
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <boost/scoped_ptr.hpp>

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.src?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.src (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/CellAppearancePropertyPanel.src Sat May 18 10:12:43 2013
@@ -20,7 +20,7 @@
  *************************************************************/
 
 #include "CellAppearancePropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include "sc.hrc"
 #include "helpids.h"
 

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx Sat May 18 10:12:43 2013
@@ -21,7 +21,7 @@
 
 #include "precompiled_sc.hxx"
 
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include <NumberFormatPropertyPanel.hxx>

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc Sat May 18 10:12:43 2013
@@ -37,7 +37,7 @@
 //===============================================================position=============================================
 
 #define MBOX_WIDTH							28
-#define	TOOLBOX_ITEM_HEIGHT					12
+#define	LOCAL_TOOLBOX_ITEM_HEIGHT					12
 #define CHECKBOX_HEIGHT						10
 
 #define FT_CATEGORY_X						SECTIONPAGE_MARGIN_HORIZONTAL
@@ -49,7 +49,7 @@
 #define TBX_CATEGORY_Y						LB_CATEGORY_Y + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
 
 #define FT_DECIMALS_X						SECTIONPAGE_MARGIN_HORIZONTAL
-#define FT_DECIMALS_Y						TBX_CATEGORY_Y + TOOLBOX_ITEM_HEIGHT + 4 + CONTROL_SPACING_VERTICAL
+#define FT_DECIMALS_Y						TBX_CATEGORY_Y + LOCAL_TOOLBOX_ITEM_HEIGHT + 4 + CONTROL_SPACING_VERTICAL
 #define LB_DECIMALS_X						FT_CATEGORY_X
 #define LB_DECIMALS_Y						FT_DECIMALS_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
 

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx Sat May 18 10:12:43 2013
@@ -22,7 +22,6 @@
 #ifndef SC_PROPERTYPANEL_NUMFORMAT_HXX
 #define SC_PROPERTYPANEL_NUMFORMAT_HXX
 
-#include <sfx2/sidebar/SidebarPanelBase.hxx>
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <boost/scoped_ptr.hpp>
@@ -97,6 +96,6 @@ private:
 
 } } // end of namespace ::sc::sidebar
 
-#endif SC_PROPERTYPANEL_NUMFORMAT_HXX
+#endif
 
 // eof

Modified: openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src (original)
+++ openoffice/branches/ia2/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src Sat May 18 10:12:43 2013
@@ -20,7 +20,7 @@
  *************************************************************/
 
 #include "NumberFormatPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include "sc.hrc"
 #include "helpids.h"
 

Modified: openoffice/branches/ia2/main/sc/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/view/drawview.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/view/drawview.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/view/drawview.cxx Sat May 18 10:12:43 2013
@@ -587,6 +587,60 @@ void ScDrawView::MarkListHasChanged()
 
 }
 
+sal_Bool ScDrawView::SdrBeginTextEdit(
+    SdrObject* pObj,
+    SdrPageView* pPV,
+    ::Window* pWinL,
+    sal_Bool bIsNewObj,
+    SdrOutliner* pGivenOutliner,
+    OutlinerView* pGivenOutlinerView,
+    sal_Bool bDontDeleteOutliner,
+    sal_Bool bOnlyOneView,
+    sal_Bool bGrabFocus )
+{
+    const sal_Bool bRet = FmFormView::SdrBeginTextEdit(
+        pObj, pPV, pWinL, bIsNewObj,
+        pGivenOutliner, pGivenOutlinerView, bDontDeleteOutliner,
+        bOnlyOneView, bGrabFocus );
+
+    ScTabViewShell* pViewSh = pViewData->GetViewShell();
+    if ( pViewSh->GetViewFrame() )
+    {
+        SfxFrame& rFrame = pViewSh->GetViewFrame()->GetFrame();
+        uno::Reference< frame::XController > xController = rFrame.GetController();
+        if (xController.is())
+        {
+            ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
+            if (pImp)
+                pImp->SelectionChanged();
+        }
+    }
+
+    return bRet;
+}
+
+
+SdrEndTextEditKind ScDrawView::SdrEndTextEdit( sal_Bool bDontDeleteReally )
+{
+    const SdrEndTextEditKind eRet = FmFormView::SdrEndTextEdit( bDontDeleteReally );
+
+    ScTabViewShell* pViewSh = pViewData->GetViewShell();
+    if ( pViewSh->GetViewFrame() )
+    {
+        SfxFrame& rFrame = pViewSh->GetViewFrame()->GetFrame();
+        uno::Reference< frame::XController > xController = rFrame.GetController();
+        if (xController.is())
+        {
+            ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
+            if (pImp)
+                pImp->SelectionChanged();
+        }
+    }
+
+    return eRet;
+}
+
+
 void __EXPORT ScDrawView::ModelHasChanged()
 {
 	SdrObject* pEditObj = GetTextEditObject();

Modified: openoffice/branches/ia2/main/sc/source/ui/view/editsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/view/editsh.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/view/editsh.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/view/editsh.cxx Sat May 18 10:12:43 2013
@@ -921,33 +921,41 @@ void ScEditShell::ExecuteAttr(SfxRequest
 			lcl_InvalidateUnder( rBindings );
 			break;
 
-		case SID_ATTR_CHAR_UNDERLINE:	// Toggles
-		case SID_ULINE_VAL_SINGLE:
-		case SID_ULINE_VAL_DOUBLE:
-		case SID_ULINE_VAL_DOTTED:
-			{
-				FontUnderline eOld = ((const SvxUnderlineItem&) pEditView->
-									GetAttribs().Get(EE_CHAR_UNDERLINE)).GetLineStyle();
-				FontUnderline eNew = eOld;
-				switch (nSlot)
-				{
-					case SID_ATTR_CHAR_UNDERLINE:
-						eNew = ( eOld != UNDERLINE_NONE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE;
-						break;
-					case SID_ULINE_VAL_SINGLE:
-						eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE;
-						break;
-					case SID_ULINE_VAL_DOUBLE:
-						eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE;
-						break;
-					case SID_ULINE_VAL_DOTTED:
-						eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED;
-						break;
-				}
-				aSet.Put( SvxUnderlineItem( eNew, EE_CHAR_UNDERLINE ) );
-				lcl_InvalidateUnder( rBindings );
-			}
-			break;
+        case SID_ATTR_CHAR_UNDERLINE:
+        case SID_ULINE_VAL_SINGLE:
+        case SID_ULINE_VAL_DOUBLE:
+        case SID_ULINE_VAL_DOTTED:
+            {
+                FontUnderline eOld = ((const SvxUnderlineItem&) pEditView->
+                                    GetAttribs().Get(EE_CHAR_UNDERLINE)).GetLineStyle();
+                FontUnderline eNew = eOld;
+                switch (nSlot)
+                {
+                    case SID_ATTR_CHAR_UNDERLINE:
+                        if ( pArgs )
+                        {
+                            const SvxTextLineItem& rTextLineItem = static_cast< const SvxTextLineItem& >( pArgs->Get( pArgs->GetPool()->GetWhich(nSlot) ) );
+                            eNew = rTextLineItem.GetLineStyle();
+                        }
+                        else
+                        {
+                            eNew = ( eOld != UNDERLINE_NONE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE;
+                        }
+                        break;
+                    case SID_ULINE_VAL_SINGLE:
+                        eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE;
+                        break;
+                    case SID_ULINE_VAL_DOUBLE:
+                        eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE;
+                        break;
+                    case SID_ULINE_VAL_DOTTED:
+                        eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED;
+                        break;
+                }
+                aSet.Put( SvxUnderlineItem( eNew, EE_CHAR_UNDERLINE ) );
+                lcl_InvalidateUnder( rBindings );
+            }
+            break;
 
 		case SID_ATTR_CHAR_OVERLINE:
 			{

Modified: openoffice/branches/ia2/main/sc/source/ui/view/formatsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/view/formatsh.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/view/formatsh.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/view/formatsh.cxx Sat May 18 10:12:43 2013
@@ -2057,23 +2057,13 @@ void ScFormatShell::GetAttrState( SfxIte
 				rSet.Put( rBrushItem, GetPool().GetWhich(nWhich) );
 			}
 			break;
-/*			case SID_ATTR_ALIGN_LINEBREAK:
-			{
-				const SfxBoolItem& rBreakItem = (const SfxBoolItem&)rAttrSet.Get( ATTR_LINEBREAK );
-				rSet.Put( rBreakItem, GetPool().GetWhich(nWhich) );
-			}
-			break;
-*/
 		}
 		nWhich = aIter.NextWhich();
 	}
 
-    if(nWhich)
-    {
-        // stuff for sidebar panels
-        Invalidate(SID_ATTR_ALIGN_DEGREES);
-        Invalidate(SID_ATTR_ALIGN_STACKED);  
-    }
+    // stuff for sidebar panels
+    Invalidate(SID_ATTR_ALIGN_DEGREES);
+    Invalidate(SID_ATTR_ALIGN_STACKED);
 }
 
 //------------------------------------------------------------------

Modified: openoffice/branches/ia2/main/sc/source/ui/view/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/view/makefile.mk?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/view/makefile.mk (original)
+++ openoffice/branches/ia2/main/sc/source/ui/view/makefile.mk Sat May 18 10:12:43 2013
@@ -102,7 +102,6 @@ SLOFILES =  \
         $(SLO)$/hdrcont.obj \
         $(SLO)$/colrowba.obj \
         $(SLO)$/olkact.obj \
-        $(SLO)$/galwrap.obj \
         $(SLO)$/imapwrap.obj \
         $(SLO)$/reffact.obj \
         $(SLO)$/selectionstate.obj \

Modified: openoffice/branches/ia2/main/sc/source/ui/view/tabvwsh9.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sc/source/ui/view/tabvwsh9.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sc/source/ui/view/tabvwsh9.cxx (original)
+++ openoffice/branches/ia2/main/sc/source/ui/view/tabvwsh9.cxx Sat May 18 10:12:43 2013
@@ -47,13 +47,8 @@
 #include "userdat.hxx"
 #include "docsh.hxx"
 
-// forwards -> galwrap.cxx (wg. CLOOKs)
-
-sal_uInt16	GallerySGA_FORMAT_GRAPHIC();
-Graphic GalleryGetGraphic		();
-sal_Bool	GalleryIsLinkage		();
-String	GalleryGetFullPath		();
-String	GalleryGetFilterName	();
+#include <svx/galleryitem.hxx>
+#include <com/sun/star/gallery/GalleryItemType.hpp>
 
 // forwards -> imapwrap.cxx (wg. CLOOKs)
 
@@ -109,49 +104,36 @@ void ScTabViewShell::GetChildWinState( S
 
 void ScTabViewShell::ExecGallery( SfxRequest& rReq )
 {
-	const SfxItemSet* pArgs = rReq.GetArgs();
-
-	if ( pArgs )
-	{
-		const SfxPoolItem* pItem = NULL;
-		SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, sal_True, &pItem);
-		if ( eState == SFX_ITEM_SET )
-		{
-			sal_uInt32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue();
-
-			/******************************************************************
-			* Graphik einfuegen
-			******************************************************************/
-			if ( nFormats & GallerySGA_FORMAT_GRAPHIC() )
-			{
-				MakeDrawLayer();
-
-				Graphic aGraphic = GalleryGetGraphic();
-				Point 	aPos     = GetInsertPos();
-
-				String aPath, aFilter;
-				if ( GalleryIsLinkage() )			// als Link einfuegen?
-				{
-					aPath = GalleryGetFullPath();
-					aFilter = GalleryGetFilterName();
-				}
+    const SfxItemSet* pArgs = rReq.GetArgs();
 
-				PasteGraphic( aPos, aGraphic, aPath, aFilter );
-			}
-			else if ( nFormats & SGA_FORMAT_SOUND )
-			{
-				//	#98115# for sounds (linked or not), insert a hyperlink button,
-				//	like in Impress and Writer
-
-				GalleryExplorer* pGal = SVX_GALLERY();
-				if ( pGal )
-				{
-        		    const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
-       			    GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
-				}
-			}
-		}
-	}
+    SFX_ITEMSET_ARG( pArgs, pGalleryItem, SvxGalleryItem, SID_GALLERY_FORMATS, sal_False );
+    if ( !pGalleryItem )
+        return;
+
+    sal_Int8 nType( pGalleryItem->GetType() );
+    if ( nType == com::sun::star::gallery::GalleryItemType::GRAPHIC )
+    {
+        MakeDrawLayer();
+
+        Graphic aGraphic( pGalleryItem->GetGraphic() );
+        Point 	aPos     = GetInsertPos();
+
+        String aPath, aFilter;
+        if ( pGalleryItem->IsLink() ) // als Link einfuegen?
+        {
+            aPath = pGalleryItem->GetURL();
+            aFilter = pGalleryItem->GetFilterName();
+        }
+
+        PasteGraphic( aPos, aGraphic, aPath, aFilter );
+    }
+    else if ( nType == com::sun::star::gallery::GalleryItemType::MEDIA )
+    {
+        //	#98115# for sounds (linked or not), insert a hyperlink button,
+        //	like in Impress and Writer
+        const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() );
+        GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
+    }
 }
 
 void ScTabViewShell::GetGalleryState( SfxItemSet& /* rSet */ )

Modified: openoffice/branches/ia2/main/sd/inc/sdabstdlg.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/inc/sdabstdlg.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/inc/sdabstdlg.hxx (original)
+++ openoffice/branches/ia2/main/sd/inc/sdabstdlg.hxx Sat May 18 10:12:43 2013
@@ -51,7 +51,6 @@ class SfxObjectShell;
 class SfxObjectShellLock;
 class SvxFieldData;
 class GDIMetaFile;
-class XColorList;
 class SdDrawDocument;
 class SfxMedium;
 class SdrObject;
@@ -66,6 +65,8 @@ class Window;
 class SdPage;
 class TabPage;
 class ViewShell;
+class XColorList;
+typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr;
 
 class AbstractCopyDlg : public VclAbstractDialog  //add for CopyDlg
 {
@@ -182,7 +183,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;

Modified: openoffice/branches/ia2/main/sd/source/core/typemap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/core/typemap.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/core/typemap.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/core/typemap.cxx Sat May 18 10:12:43 2013
@@ -132,6 +132,7 @@
 #include <svx/xflftrit.hxx>
 #include <svx/xlinjoit.hxx>
 #include <svx/AffineMatrixItem.hxx>
+#include <svx/galleryitem.hxx>
 
 #define SFX_TYPEMAP
 #include "sdslots.hxx"

Modified: openoffice/branches/ia2/main/sd/source/ui/animations/CustomAnimationDialog.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/animations/CustomAnimationDialog.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/animations/CustomAnimationDialog.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/animations/CustomAnimationDialog.cxx Sat May 18 10:12:43 2013
@@ -230,32 +230,27 @@ ColorPropertyBox::ColorPropertyBox( sal_
 
 	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::CustomAnim
 	// 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
 	//
@@ -1813,7 +1803,7 @@ void CustomAnimationEffectTabPage::openS
 		if( nPos < 0 ) // not in Soundliste
 		{
 			// try to insert in Gallery
-			if( GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aFile, SGA_FORMAT_SOUND ) )
+			if( GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aFile ) )
 			{
 				clearSoundListBox();
 				fillSoundListBox();

Modified: openoffice/branches/ia2/main/sd/source/ui/animations/SlideTransitionPane.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/animations/SlideTransitionPane.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/animations/SlideTransitionPane.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/animations/SlideTransitionPane.cxx Sat May 18 10:12:43 2013
@@ -976,7 +976,7 @@ void SlideTransitionPane::openSoundFileD
 		else // not in sound list
 		{
 			// try to insert into gallery
-			if( GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aFile, SGA_FORMAT_SOUND ) )
+			if( GalleryExplorer::InsertURL( GALLERY_THEME_USERSOUNDS, aFile ) )
 			{
                 updateSoundList();
                 bValidSoundFile = lcl_findSoundInList( maSoundList, aFile, nPos );

Modified: openoffice/branches/ia2/main/sd/source/ui/dlg/copydlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/dlg/copydlg.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/dlg/copydlg.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/dlg/copydlg.cxx Sat May 18 10:12:43 2013
@@ -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 ) );

Modified: openoffice/branches/ia2/main/sd/source/ui/dlg/dlgpage.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/dlg/dlgpage.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/dlg/dlgpage.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/dlg/dlgpage.cxx Sat May 18 10:12:43 2013
@@ -65,10 +65,10 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pD
 	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 n
 		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));

Modified: openoffice/branches/ia2/main/sd/source/ui/dlg/prltempl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/dlg/prltempl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/dlg/prltempl.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/dlg/prltempl.cxx Sat May 18 10:12:43 2013
@@ -145,12 +145,12 @@ SdPresLayoutTemplateDlg::SdPresLayoutTem
 	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::PageCreate
 	{
 		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::PageCreate
 
 		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::PageCreate
 		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);

Modified: openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.cxx Sat May 18 10:12:43 2013
@@ -391,9 +391,9 @@ VclAbstractDialog * SdAbstractDialogFact
 //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
 

Modified: openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.hxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/dlg/sddlgfact.hxx Sat May 18 10:12:43 2013
@@ -255,7 +255,7 @@ class SdAbstractDialogFactory_Impl : pub
 
 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 );

Modified: openoffice/branches/ia2/main/sd/source/ui/dlg/tabtempl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/dlg/tabtempl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/dlg/tabtempl.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/dlg/tabtempl.cxx Sat May 18 10:12:43 2013
@@ -69,12 +69,12 @@ SdTabTemplateDlg::SdTabTemplateDlg( Wind
 		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_
 	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_
 		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);

Modified: openoffice/branches/ia2/main/sd/source/ui/dlg/tpaction.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/dlg/tpaction.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/dlg/tpaction.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/dlg/tpaction.cxx Sat May 18 10:12:43 2013
@@ -186,8 +186,8 @@ void SdTPAction::SetView( const ::sd::Vi
 		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
 	{

Modified: openoffice/branches/ia2/main/sd/source/ui/docshell/docshel3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/docshell/docshel3.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/docshell/docshel3.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/docshell/docshel3.cxx Sat May 18 10:12:43 2013
@@ -191,9 +191,10 @@ void DrawDocShell::Execute( SfxRequest& 
 		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;
 

Modified: openoffice/branches/ia2/main/sd/source/ui/docshell/docshell.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/docshell/docshell.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/docshell/docshell.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/docshell/docshell.cxx Sat May 18 10:12:43 2013
@@ -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();
 }

Modified: openoffice/branches/ia2/main/sd/source/ui/func/fuconrec.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/func/fuconrec.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/func/fuconrec.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/func/fuconrec.cxx Sat May 18 10:12:43 2013
@@ -591,16 +591,16 @@ void FuConstructRectangle::SetAttributes
 ::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();

Modified: openoffice/branches/ia2/main/sd/source/ui/func/fucopy.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/func/fucopy.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/func/fucopy.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/func/fucopy.cxx Sat May 18 10:12:43 2013
@@ -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();

Modified: openoffice/branches/ia2/main/sd/source/ui/func/fulinend.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/func/fulinend.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/func/fulinend.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/func/fulinend.cxx Sat May 18 10:12:43 2013
@@ -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
 				{

Modified: openoffice/branches/ia2/main/sd/source/ui/inc/copydlg.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/inc/copydlg.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/inc/copydlg.hxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/inc/copydlg.hxx Sat May 18 10:12:43 2013
@@ -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;
 

Modified: openoffice/branches/ia2/main/sd/source/ui/inc/dlgpage.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/inc/dlgpage.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/inc/dlgpage.hxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/inc/dlgpage.hxx Sat May 18 10:12:43 2013
@@ -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 );

Modified: openoffice/branches/ia2/main/sd/source/ui/inc/prltempl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/inc/prltempl.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/inc/prltempl.hxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/inc/prltempl.hxx Sat May 18 10:12:43 2013
@@ -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 S
 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;

Modified: openoffice/branches/ia2/main/sd/source/ui/inc/tabtempl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/inc/tabtempl.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/inc/tabtempl.hxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/inc/tabtempl.hxx Sat May 18 10:12:43 2013
@@ -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;

Modified: openoffice/branches/ia2/main/sd/source/ui/inc/tpaction.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/inc/tpaction.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/inc/tpaction.hxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/inc/tpaction.hxx Sat May 18 10:12:43 2013
@@ -89,7 +89,7 @@ private:
 	const SfxItemSet&	    rOutAttrs;
 	const ::sd::View*		mpView;
 	SdDrawDocument*		    mpDoc;
-	XColorList*		    pColTab;
+	XColorListSharedPtr     maColTab;
                             
 	sal_Bool				    bTreeUpdated;
 	List*   			    pCurrentActions;

Modified: openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx Sat May 18 10:12:43 2013
@@ -278,11 +278,11 @@ void DocumentSettings::_setPropertyValue
 						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::_setPropertyValue
 						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::_setPropertyValue
 						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::_setPropertyValue
 						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::_setPropertyValue
 						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::_setPropertyValue
 						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::_getPropertyValue
 		{
 			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::_getPropertyValue
 				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::_getPropertyValue
 				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::_getPropertyValue
 				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::_getPropertyValue
 				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::_getPropertyValue
 				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 ) );

Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews1.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews1.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews1.cxx Sat May 18 10:12:43 2013
@@ -516,6 +516,11 @@ void DrawViewShell::ChangeEditMode(EditM
 		Invalidate( SID_TITLE_MASTERPAGE );
 		Invalidate( SID_NOTES_MASTERPAGE );
 		Invalidate( SID_HANDOUT_MASTERPAGE );
+
+        if (meEditMode == EM_PAGE)
+            SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawPage));
+        else
+            SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_MasterPage));
 	}
 }
 

Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx Sat May 18 10:12:43 2013
@@ -159,7 +159,7 @@ void DrawViewShell::GetFormTextState(Sfx
 		if ( pDlg )
 		{
 //			pDlg->SetActive();
-			pDlg->SetColorTable(GetDoc()->GetColorTable());
+			pDlg->SetColorTable(GetDoc()->GetColorTableFromSdrModel());
 		}
 
 		SfxItemSet aSet( GetDoc()->GetPool() );
@@ -420,7 +420,7 @@ void DrawViewShell::GetBmpMaskState( Sfx
 		pDlg = (SvxBmpMask*) ( GetViewFrame()->GetChildWindow( nId )->GetWindow() );
 
 		if ( pDlg->NeedsColorTable() )
-			pDlg->SetColorTable( GetDoc()->GetColorTable() );
+			pDlg->SetColorTable( GetDoc()->GetColorTableFromSdrModel() );
 	}
 
 	if ( rMarkList.GetMarkCount() == 1 )

Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx Sat May 18 10:12:43 2013
@@ -68,6 +68,9 @@
 #include "sdresid.hxx"
 #include "fupoor.hxx"
 
+#include <svx/galleryitem.hxx>
+#include <com/sun/star/gallery/GalleryItemType.hpp>
+
 namespace sd {
 
 #ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
@@ -94,131 +97,127 @@ void DrawViewShell::ExecGallery(SfxReque
 
 	const SfxItemSet* pArgs = rReq.GetArgs();
 
-	if ( pArgs )
-	{
-		const sal_uInt32		nFormats = ( (SfxUInt32Item&) pArgs->Get( SID_GALLERY_FORMATS ) ).GetValue();
-		GalleryExplorer*	pGal = SVX_GALLERY();
-
-		if ( pGal )
-		{
-			GetDocSh()->SetWaitCursor( sal_True );
-
-			// Graphik einfuegen
-			if (nFormats & SGA_FORMAT_GRAPHIC)
-			{
-				Graphic aGraphic = pGal->GetGraphic();
-
-				// Ggf. Groesse reduzieren
-				Window aWindow (GetActiveWindow());
-				aWindow.SetMapMode(aGraphic.GetPrefMapMode());
-				Size aSizePix = aWindow.LogicToPixel(aGraphic.GetPrefSize());
-				aWindow.SetMapMode( MapMode(MAP_100TH_MM) );
-				Size aSize = aWindow.PixelToLogic(aSizePix);
-
-				// Groesse ggf. auf Seitengroesse begrenzen
-				SdrPage* pPage = mpDrawView->GetSdrPageView()->GetPage();
-				Size aPageSize = pPage->GetSize();
-				aPageSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder();
-				aPageSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder();
-
-
-				// Falls Grafik zu gross, wird die Grafik
-				// in die Seite eingepasst
-				if ( ( ( aSize.Height() > aPageSize.Height() ) || ( aSize.Width()	> aPageSize.Width() ) ) &&
-					aSize.Height() && aPageSize.Height() )
-				{
-					float fGrfWH =	(float)aSize.Width() /
-									(float)aSize.Height();
-					float fWinWH =	(float)aPageSize.Width() /
-									(float)aPageSize.Height();
-
-					// Grafik an Pagesize anpassen (skaliert)
-					if ((fGrfWH != 0.F) && (fGrfWH < fWinWH))
-					{
-						aSize.Width() = (long)(aPageSize.Height() * fGrfWH);
-						aSize.Height()= aPageSize.Height();
-					}
-					else
-					{
-						aSize.Width() = aPageSize.Width();
-						aSize.Height()= (long)(aPageSize.Width() / fGrfWH);
-					}
-				}
+    SFX_ITEMSET_ARG( pArgs, pGalleryItem, SvxGalleryItem, SID_GALLERY_FORMATS, sal_False );
+    if ( !pGalleryItem )
+        return;
+
+    GetDocSh()->SetWaitCursor( sal_True );
+
+    sal_Int8 nType( pGalleryItem->GetType() );
+    // Graphik einfuegen
+    if (nType == com::sun::star::gallery::GalleryItemType::GRAPHIC)
+    {
+        Graphic aGraphic( pGalleryItem->GetGraphic() );
+
+        // Ggf. Groesse reduzieren
+        Window aWindow (GetActiveWindow());
+        aWindow.SetMapMode(aGraphic.GetPrefMapMode());
+        Size aSizePix = aWindow.LogicToPixel(aGraphic.GetPrefSize());
+        aWindow.SetMapMode( MapMode(MAP_100TH_MM) );
+        Size aSize = aWindow.PixelToLogic(aSizePix);
+
+        // Groesse ggf. auf Seitengroesse begrenzen
+        SdrPage* pPage = mpDrawView->GetSdrPageView()->GetPage();
+        Size aPageSize = pPage->GetSize();
+        aPageSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder();
+        aPageSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder();
+
+
+        // Falls Grafik zu gross, wird die Grafik
+        // in die Seite eingepasst
+        if ( ( ( aSize.Height() > aPageSize.Height() ) || ( aSize.Width()	> aPageSize.Width() ) ) &&
+            aSize.Height() && aPageSize.Height() )
+        {
+            float fGrfWH =	(float)aSize.Width() /
+                            (float)aSize.Height();
+            float fWinWH =	(float)aPageSize.Width() /
+                            (float)aPageSize.Height();
+
+            // Grafik an Pagesize anpassen (skaliert)
+            if ((fGrfWH != 0.F) && (fGrfWH < fWinWH))
+            {
+                aSize.Width() = (long)(aPageSize.Height() * fGrfWH);
+                aSize.Height()= aPageSize.Height();
+            }
+            else
+            {
+                aSize.Width() = aPageSize.Width();
+                aSize.Height()= (long)(aPageSize.Width() / fGrfWH);
+            }
+        }
+
+
+        // Ausgaberechteck fuer Grafik setzen
+        Point aPnt ((aPageSize.Width()	- aSize.Width())  / 2,
+                    (aPageSize.Height() - aSize.Height()) / 2);
+        aPnt += Point(pPage->GetLftBorder(), pPage->GetUppBorder());
+        Rectangle aRect (aPnt, aSize);
+
+        SdrGrafObj* pGrafObj = NULL;
+
+        sal_Bool bInsertNewObject = sal_True;
+
+        if ( mpDrawView->AreObjectsMarked() )
+        {
+            /******************************************************
+            * Ist ein leeres Graphik-Objekt vorhanden?
+            ******************************************************/
+            const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
+
+            if (rMarkList.GetMarkCount() == 1)
+            {
+                SdrMark* pMark = rMarkList.GetMark(0);
+                SdrObject* pObj = pMark->GetMarkedSdrObj();
+
+                if (pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF)
+                {
+                    pGrafObj = (SdrGrafObj*) pObj;
+
+                    if( pGrafObj->IsEmptyPresObj() )
+                    {
+                        /******************************************
+                        * Das leere Graphik-Objekt bekommt eine neue
+                        * Graphik
+                        ******************************************/
+                        bInsertNewObject = sal_False;
+
+                        SdrGrafObj* pNewGrafObj = (SdrGrafObj*) pGrafObj->Clone();
+                        pNewGrafObj->SetEmptyPresObj(sal_False);
+                        pNewGrafObj->SetOutlinerParaObject(NULL);
+                        pNewGrafObj->SetGraphic(aGraphic);
+
+                        String aStr(mpDrawView->GetDescriptionOfMarkedObjects());
+                        aStr += sal_Unicode(' ');
+                        aStr += String(SdResId(STR_UNDO_REPLACE));
+                        mpDrawView->BegUndo(aStr);
+                        SdrPageView* pPV = mpDrawView->GetSdrPageView();
+                        mpDrawView->ReplaceObjectAtView(pGrafObj, *pPV, pNewGrafObj);
+                        mpDrawView->EndUndo();
+                    }
+                }
+            }
+        }
+
+
+        if( bInsertNewObject )
+        {
+            pGrafObj = new SdrGrafObj(aGraphic, aRect);
+            SdrPageView* pPV = mpDrawView->GetSdrPageView();
+            mpDrawView->InsertObjectAtView(pGrafObj, *pPV, SDRINSERT_SETDEFLAYER);
+        }
+
+        // Soll nur ein Link benutzt werden?
+        if( pGrafObj && pGalleryItem->IsLink() )
+            pGrafObj->SetGraphicLink( pGalleryItem->GetURL(), pGalleryItem->GetFilterName() );
+    }
+    // insert sound
+    else if( nType == com::sun::star::gallery::GalleryItemType::MEDIA )
+    {
+        const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() );
+        GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
+    }
 
-
-				// Ausgaberechteck fuer Grafik setzen
-				Point aPnt ((aPageSize.Width()	- aSize.Width())  / 2,
-							(aPageSize.Height() - aSize.Height()) / 2);
-				aPnt += Point(pPage->GetLftBorder(), pPage->GetUppBorder());
-				Rectangle aRect (aPnt, aSize);
-
-				SdrGrafObj* pGrafObj = NULL;
-
-				sal_Bool bInsertNewObject = sal_True;
-
-				if ( mpDrawView->AreObjectsMarked() )
-				{
-					/******************************************************
-					* Ist ein leeres Graphik-Objekt vorhanden?
-					******************************************************/
-					const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
-
-					if (rMarkList.GetMarkCount() == 1)
-					{
-						SdrMark* pMark = rMarkList.GetMark(0);
-						SdrObject* pObj = pMark->GetMarkedSdrObj();
-
-						if (pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF)
-						{
-							pGrafObj = (SdrGrafObj*) pObj;
-
-							if( pGrafObj->IsEmptyPresObj() )
-							{
-								/******************************************
-								* Das leere Graphik-Objekt bekommt eine neue
-								* Graphik
-								******************************************/
-								bInsertNewObject = sal_False;
-
-								SdrGrafObj* pNewGrafObj = (SdrGrafObj*) pGrafObj->Clone();
-								pNewGrafObj->SetEmptyPresObj(sal_False);
-								pNewGrafObj->SetOutlinerParaObject(NULL);
-								pNewGrafObj->SetGraphic(aGraphic);
-
-								String aStr(mpDrawView->GetDescriptionOfMarkedObjects());
-								aStr += sal_Unicode(' ');
-								aStr += String(SdResId(STR_UNDO_REPLACE));
-								mpDrawView->BegUndo(aStr);
-								SdrPageView* pPV = mpDrawView->GetSdrPageView();
-								mpDrawView->ReplaceObjectAtView(pGrafObj, *pPV, pNewGrafObj);
-								mpDrawView->EndUndo();
-							}
-						}
-					}
-				}
-
-
-				if( bInsertNewObject )
-				{
-					pGrafObj = new SdrGrafObj(aGraphic, aRect);
-					SdrPageView* pPV = mpDrawView->GetSdrPageView();
-					mpDrawView->InsertObjectAtView(pGrafObj, *pPV, SDRINSERT_SETDEFLAYER);
-				}
-
-				// Soll nur ein Link benutzt werden?
-				if( pGrafObj && pGal->IsLinkage() )
-					pGrafObj->SetGraphicLink( pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ), pGal->GetFilterName() );
-			}
-			// insert sound
-			else if( nFormats & SGA_FORMAT_SOUND )
-			{
-        		const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
-       			GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
-			}
-
-			GetDocSh()->SetWaitCursor( sal_False );
-		}
-	}
+    GetDocSh()->SetWaitCursor( sal_False );
 }
 
 
@@ -370,8 +369,8 @@ void DrawViewShell::AttrExec (SfxRequest
 					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 +381,7 @@ void DrawViewShell::AttrExec (SfxRequest
 
 					for ( i = 0; i < nCounts; i ++)
 					{
-						XGradientEntry *pEntry = pGradientList->GetGradient (i);
+						XGradientEntry *pEntry = aGradientList->GetGradient (i);
 
 						if (pEntry->GetName () == pName->GetValue ())
 						{
@@ -407,7 +406,7 @@ void DrawViewShell::AttrExec (SfxRequest
 												 ? 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 +429,8 @@ void DrawViewShell::AttrExec (SfxRequest
 					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 +441,7 @@ void DrawViewShell::AttrExec (SfxRequest
 
 					for ( i = 0; i < nCounts; i ++)
 					{
-						XHatchEntry *pEntry = pHatchList->GetHatch (i);
+						XHatchEntry *pEntry = aHatchList->GetHatch (i);
 
 						if (pEntry->GetName () == pName->GetValue ())
 						{
@@ -460,7 +459,7 @@ void DrawViewShell::AttrExec (SfxRequest
 					{
 						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 +494,19 @@ void DrawViewShell::AttrExec (SfxRequest
 						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 +546,13 @@ void DrawViewShell::AttrExec (SfxRequest
 						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 +580,7 @@ void DrawViewShell::AttrExec (SfxRequest
 												 (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 +612,13 @@ void DrawViewShell::AttrExec (SfxRequest
 						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 +640,7 @@ void DrawViewShell::AttrExec (SfxRequest
 							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 +662,14 @@ void DrawViewShell::AttrExec (SfxRequest
 				{
 					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 +696,14 @@ void DrawViewShell::AttrExec (SfxRequest
 				{
 					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 ())
 						{