From c4cd079b8f613084a99a83b95c3968b65cbd8900 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 22 Sep 2016 15:08:42 +0200 Subject: loplugin:unusedmethods in sc..vcl Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sd/source/ui/app/sdmod1.cxx | 196 -------------------------------------------- 1 file changed, 196 deletions(-) (limited to 'sd/source/ui/app/sdmod1.cxx') diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index b8872e307452..147a1caf5d7a 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -449,45 +449,6 @@ IMPL_STATIC_LINK_TYPED( SdModule, EventListenerHdl, VclSimpleEvent&, rSimpleEven } } -void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocument) -{ - if( !pViewFrame || !pViewFrame->GetDispatcher() || !pDocument ) - return; - - pViewFrame->GetDispatcher()->Execute(SID_SUMMARY_PAGE, - SfxCallMode::SYNCHRON | SfxCallMode::RECORD); - - OSL_ASSERT (pDocument!=nullptr); - - sal_Int32 nPageCount = pDocument->GetSdPageCount (PK_STANDARD); - - // We need at least two pages: the summary page and one to use as - // template to take the transition parameters from. - if (nPageCount >= 2) - { - // Get a page from which to retrieve the transition parameters. - SdPage* pTemplatePage = pDocument->GetSdPage (0, PK_STANDARD); - OSL_ASSERT (pTemplatePage!=nullptr); - - // The summary page, if it exists, is the last page. - SdPage* pSummaryPage = pDocument->GetSdPage ( - (sal_uInt16)nPageCount-1, PK_STANDARD); - OSL_ASSERT (pSummaryPage!=nullptr); - - // Take the change mode of the template page as indication of the - // document's kiosk mode. - pSummaryPage->setTransitionDuration(pTemplatePage->getTransitionDuration()); - pSummaryPage->SetPresChange(pTemplatePage->GetPresChange()); - pSummaryPage->SetTime(pTemplatePage->GetTime()); - pSummaryPage->SetSound(pTemplatePage->IsSoundOn()); - pSummaryPage->SetSoundFile(pTemplatePage->GetSoundFile()); - pSummaryPage->setTransitionType(pTemplatePage->getTransitionType()); - pSummaryPage->setTransitionSubtype(pTemplatePage->getTransitionSubtype()); - pSummaryPage->setTransitionDirection(pTemplatePage->getTransitionDirection()); - pSummaryPage->setTransitionFadeColor(pTemplatePage->getTransitionFadeColor()); - pSummaryPage->setTransitionDuration(pTemplatePage->getTransitionDuration()); - } -} SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Reference< XFrame >& i_rFrame ) { @@ -592,163 +553,6 @@ SfxFrame* SdModule::CreateEmptyDocument( const Reference< XFrame >& i_rFrame ) return pFrame; } -void SdModule::ChangeMedium( ::sd::DrawDocShell* pDocShell, SfxViewFrame* pViewFrame, const sal_Int32 eMedium ) -{ - if( !pDocShell ) - return; - - SdDrawDocument* pDoc = pDocShell->GetDoc(); - if( !pDoc ) - return; - - // settings for the Outputmedium - Size aNewSize; - sal_uInt32 nLeft = 0; - sal_uInt32 nRight = 0; - sal_uInt32 nLower = 0; - sal_uInt32 nUpper = 0; - switch(eMedium) - { - case OUTPUT_PAGE: - case OUTPUT_OVERHEAD: - { - SfxPrinter* pPrinter = pDocShell->GetPrinter(true); - - if( pPrinter && pPrinter->IsValid()) - { - // Unfortunately, the printer does not provide an exact format - // like A4 - Size aSize(pPrinter->GetPaperSize()); - Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, MAP_100TH_MM, true); - - if (ePaper != PAPER_USER) - { - // get correct size - aSize = SvxPaperInfo::GetPaperSize(ePaper, MAP_100TH_MM); - } - - if (aSize.Height() > aSize.Width()) - { - // always landscape - aNewSize.Width() = aSize.Height(); - aNewSize.Height() = aSize.Width(); - } - else - { - aNewSize = aSize; - } - } - else - { - aNewSize=Size(29700, 21000); - } - - if (eMedium == OUTPUT_PAGE) - { - nLeft =1000; - nRight=1000; - nUpper=1000; - nLower=1000; - } - else - { - nLeft =0; - nRight=0; - nUpper=0; - nLower=0; - } - } - break; - - case OUTPUT_SLIDE: - { - aNewSize = Size(27000, 18000); - nLeft =0; - nRight=0; - nUpper=0; - nLower=0; - } - break; - - case OUTPUT_WIDESCREEN: - { - aNewSize = Size(28000, 15750); - nLeft =0; - nRight=0; - nUpper=0; - nLower=0; - } - break; - - case OUTPUT_PRESENTATION: - { - aNewSize = Size(28000, 21000); - nLeft =0; - nRight=0; - nUpper=0; - nLower=0; - } - break; - } - - bool bScaleAll = true; - sal_uInt16 nPageCnt = pDoc->GetMasterSdPageCount(PK_STANDARD); - sal_uInt16 i; - SdPage* pPage; - - // master pages first - for (i = 0; i < nPageCnt; i++) - { - pPage = pDoc->GetMasterSdPage(i, PK_STANDARD); - - if (pPage) - { - if(eMedium != OUTPUT_ORIGINAL) - { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); - pPage->ScaleObjects(aNewSize, aBorderRect, bScaleAll); - pPage->SetSize(aNewSize); - pPage->SetBorder(nLeft, nUpper, nRight, nLower); - } - SdPage* pNotesPage = pDoc->GetMasterSdPage(i, PK_NOTES); - DBG_ASSERT( pNotesPage, "Wrong page ordering!" ); - if( pNotesPage ) pNotesPage->CreateTitleAndLayout(); - pPage->CreateTitleAndLayout(); - } - } - - nPageCnt = pDoc->GetSdPageCount(PK_STANDARD); - - // then slides - for (i = 0; i < nPageCnt; i++) - { - pPage = pDoc->GetSdPage(i, PK_STANDARD); - - if (pPage) - { - if(eMedium != OUTPUT_ORIGINAL) - { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); - pPage->ScaleObjects(aNewSize, aBorderRect, bScaleAll); - pPage->SetSize(aNewSize); - pPage->SetBorder(nLeft, nUpper, nRight, nLower); - } - SdPage* pNotesPage = pDoc->GetSdPage(i, PK_NOTES); - DBG_ASSERT( pNotesPage, "Wrong page ordering!" ); - if( pNotesPage ) pNotesPage->SetAutoLayout( pNotesPage->GetAutoLayout() ); - pPage->SetAutoLayout( pPage->GetAutoLayout() ); - } - } - - SdPage* pHandoutPage = pDoc->GetSdPage(0, PK_HANDOUT); - pHandoutPage->CreateTitleAndLayout(true); - - if( (eMedium != OUTPUT_ORIGINAL) && pViewFrame && pViewFrame->GetDispatcher()) - { - pViewFrame->GetDispatcher()->Execute(SID_SIZE_PAGE, SfxCallMode::SYNCHRON | SfxCallMode::RECORD); - } -} - //===== OutlineToImpressFinalize ============================================== namespace { -- cgit