summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/LayerTabBar.cxx
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-02-01 19:58:05 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-02-01 20:00:29 +0400
commitbc8fa08a7ae48f68ee5578cb7820336c70898202 (patch)
tree470f439b2e5e72c629fd238428fe6a97855e1ba8 /sd/source/ui/dlg/LayerTabBar.cxx
parenta31acd6b405777aa3ccb7298fabbe8b4aba55a32 (diff)
pointer -> reference
Diffstat (limited to 'sd/source/ui/dlg/LayerTabBar.cxx')
-rw-r--r--sd/source/ui/dlg/LayerTabBar.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 0828437aa5e0..80384022ce3c 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -161,7 +161,8 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
{
sal_uInt16 nPageId = SDRPAGE_NOTFOUND;
Point aPos( PixelToLogic( rEvt.maPosPixel ) );
- sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( aPos ) ), sal_False );
+ sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID(
+ GetPageText( GetPageId( aPos ) ), sal_False );
nRet = pDrViewSh->AcceptDrop( rEvt, *this, NULL, nPageId, nLayerId );
@@ -180,7 +181,8 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
sal_Int8 LayerTabBar::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
sal_uInt16 nPageId = SDRPAGE_NOTFOUND;
- sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ), sal_False );
+ sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID(
+ GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ), sal_False );
sal_Int8 nRet = pDrViewSh->ExecuteDrop( rEvt, *this, NULL, nPageId, nLayerId );
EndSwitchPage();
@@ -234,9 +236,9 @@ long LayerTabBar::AllowRenaming()
// Ueberpruefung auf schon vorhandene Namen
::sd::View* pView = pDrViewSh->GetView();
- SdDrawDocument* pDoc = pView->GetDoc();
+ SdDrawDocument& rDoc = pView->GetDoc();
String aLayerName = pView->GetActiveLayer();
- SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
+ SdrLayerAdmin& rLayerAdmin = rDoc.GetLayerAdmin();
String aNewName( GetEditText() );
if ( aNewName.Len() == 0 ||
@@ -276,9 +278,9 @@ void LayerTabBar::EndRenaming()
::sd::View* pView = pDrViewSh->GetView();
DrawView* pDrView = PTR_CAST( DrawView, pView );
- SdDrawDocument* pDoc = pView->GetDoc();
+ SdDrawDocument& rDoc = pView->GetDoc();
String aLayerName = pView->GetActiveLayer();
- SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
+ SdrLayerAdmin& rLayerAdmin = rDoc.GetLayerAdmin();
SdrLayer* pLayer = rLayerAdmin.GetLayer(aLayerName, sal_False);
if (pLayer)
@@ -288,9 +290,9 @@ void LayerTabBar::EndRenaming()
DBG_ASSERT( pDrView, "Rename layer undo action is only working with a SdDrawView" );
if( pDrView )
{
- ::svl::IUndoManager* pManager = pDoc->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = rDoc.GetDocSh()->GetUndoManager();
SdLayerModifyUndoAction* pAction = new SdLayerModifyUndoAction(
- pDoc,
+ &rDoc,
pLayer,
aLayerName,
pLayer->GetTitle(),
@@ -313,7 +315,7 @@ void LayerTabBar::EndRenaming()
// schon bekannt sein muss.
pView->SetActiveLayer(aNewName);
pLayer->SetName(aNewName);
- pDoc->SetChanged(sal_True);
+ rDoc.SetChanged(sal_True);
}
}
}