summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-25 11:03:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-25 12:03:50 +0200
commit2fffaf6f05d829e345ad8b391646a6e8df9a9a26 (patch)
treeec1b7343262433ee2ea9ab6e5197b6fd2327b685 /sd
parentf74da1315a5b2ec232a66944e41ff90231b383be (diff)
loplugin:unusedmethods
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb Reviewed-on: https://gerrit.libreoffice.org/40391 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/dlg/navigatr.cxx9
-rw-r--r--sd/source/ui/docshell/docshel4.cxx105
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx3
-rw-r--r--sd/source/ui/inc/navigatr.hxx1
4 files changed, 0 insertions, 118 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 91df1ef2564b..b77e744daf36 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -215,15 +215,6 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
return eDT;
}
-//Get SdDrawDocShell
-sd::DrawDocShell* SdNavigatorWin::GetDrawDocShell( const SdDrawDocument* pDoc )
-{
- if( !pDoc )
- return nullptr; // const as const can...
- sd::DrawDocShell* pDocShell = pDoc->GetDocSh();
- return pDocShell;
-}
-
IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl, ToolBox *, void)
{
sal_uInt16 nId = maToolbox->GetCurItemId();
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 351e763d3680..c101f4dc0866 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -861,111 +861,6 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
return bFound;
}
-// If object is marked return true else return false.
-bool DrawDocShell::IsMarked( SdrObject* pObject )
-{
- bool bisMarked =false;
-
- if (mpViewShell && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr)
- {
- DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpViewShell );
- if (pObject )
- {
- bisMarked = pDrViewSh->GetView()->IsObjMarked(pObject);
- }
- }
- return bisMarked;
-}
-
-// If object is marked return true else return false. Optionally realize multi-selection of objects.
-bool DrawDocShell::GetObjectIsmarked(const OUString& rBookmark, bool bRealizeMultiSelectionOfObjects /* = false */)
-{
- bool bUnMark = false;
- bool bFound = false;
-
- if (mpViewShell && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr)
- {
- DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpViewShell );
-
- OUString aBookmark( rBookmark );
-
- if( rBookmark.startsWith("#") )
- aBookmark = rBookmark.copy( 1 );
-
- // Is the bookmark a page ?
- bool bIsMasterPage;
- sal_uInt16 nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
- SdrObject* pObj = nullptr;
-
- if (nPgNum == SDRPAGE_NOTFOUND)
- {
- // Is the bookmark an object ?
- pObj = mpDoc->GetObj(aBookmark);
-
- if (pObj)
- {
- nPgNum = pObj->GetPage()->GetPageNum();
- }
- }
-
- if (nPgNum != SDRPAGE_NOTFOUND)
- {
- /********************
- * Skip to the page *
- ********************/
- bFound = true;
- SdPage* pPage = static_cast<SdPage*>( mpDoc->GetPage(nPgNum) );
-
- PageKind eNewPageKind = pPage->GetPageKind();
-
- if (eNewPageKind != pDrViewSh->GetPageKind())
- {
- // change workspace
- GetFrameView()->SetPageKind(eNewPageKind);
- ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
- mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->
- GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
-
- // The current ViewShell changed
- pDrViewSh = static_cast<DrawViewShell*>( mpViewShell );
- }
-
- setEditMode(pDrViewSh, bIsMasterPage);
-
- // Jump to the page. This is done by using the API because this
- // takes care of all the little things to be done. Especially
- // writing the view data to the frame view (see bug #107803#).
- SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
- *pDrViewSh,
- *pDrViewSh->GetView());
- css::uno::Reference<css::drawing::XDrawPage> xDrawPage( pPage->getUnoPage(), css::uno::UNO_QUERY);
- pUnoDrawView->setCurrentPage (xDrawPage);
- delete pUnoDrawView;
-
- if (pObj)
- {
- // Show and select object
- pDrViewSh->MakeVisible(pObj->GetLogicRect(),
- *pDrViewSh->GetActiveWindow());
- bUnMark = pDrViewSh->GetView()->IsObjMarked(pObj);
- if (bRealizeMultiSelectionOfObjects)
- {
- pDrViewSh->GetView()->MarkObj(pObj, pDrViewSh->GetView()->GetSdrPageView(), bUnMark);
- }
- }
- }
- if (bRealizeMultiSelectionOfObjects)
- {
- SfxBindings& rBindings = ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
- mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings();
- rBindings.Invalidate(SID_NAVIGATOR_STATE, true);
- rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
- }
- }
-
- return bRealizeMultiSelectionOfObjects ? bFound : bUnMark;
-}
-
/**
* If it should become a document template.
*/
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 640b76de4d3a..20f215f5c74c 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -131,9 +131,6 @@ public:
bool GotoBookmark(const OUString& rBookmark);
- bool IsMarked( SdrObject* pObject );
- // Optionally realize multi-selection of objects
- bool GetObjectIsmarked(const OUString& rBookmark, bool bRealizeMultiSelectionOfObjects);
Bitmap GetPagePreviewBitmap(SdPage* pPage);
/** checks, if the given name is a valid new name for a slide
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index 9a57ad02d8e4..34c98f246b08 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -142,7 +142,6 @@ private:
public:
//when object is marked , fresh the corresponding entry tree .
- static sd::DrawDocShell* GetDrawDocShell(const SdDrawDocument*);
void FreshTree ( const SdDrawDocument* pDoc );
void FreshEntry( );
};