diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-22 15:08:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-22 18:56:58 +0000 |
commit | c4cd079b8f613084a99a83b95c3968b65cbd8900 (patch) | |
tree | 16051edcfd1f7109aefa08af6d71da0687b20f8a /sd/source/ui | |
parent | ba3d6d8a39d31316923d2326059c07b0a7e3c05e (diff) |
loplugin:unusedmethods in sc..vcl
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8
Reviewed-on: https://gerrit.libreoffice.org/29183
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/app/sdmod1.cxx | 196 | ||||
-rw-r--r-- | sd/source/ui/dlg/TemplateScanner.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgctrls.cxx | 84 | ||||
-rw-r--r-- | sd/source/ui/dlg/docprev.cxx | 37 | ||||
-rw-r--r-- | sd/source/ui/inc/TemplateScanner.hxx | 18 | ||||
-rw-r--r-- | sd/source/ui/inc/dlgctrls.hxx | 5 | ||||
-rw-r--r-- | sd/source/ui/inc/docprev.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/filedlg.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.hxx | 1 |
10 files changed, 1 insertions, 356 deletions
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 { diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx index e0d79029da3b..0f6723d503b6 100644 --- a/sd/source/ui/dlg/TemplateScanner.cxx +++ b/sd/source/ui/dlg/TemplateScanner.cxx @@ -374,12 +374,6 @@ TemplateScanner::State TemplateScanner::ScanFolder() return eNextState; } -void TemplateScanner::Scan() -{ - while (HasNextStep()) - RunNextStep(); -} - void TemplateScanner::RunNextStep() { switch (meState) diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx index ff6141410a6d..6f29aeb8ebb5 100644 --- a/sd/source/ui/dlg/dlgctrls.cxx +++ b/sd/source/ui/dlg/dlgctrls.cxx @@ -58,58 +58,6 @@ void FadeEffectLB::dispose() ListBox::dispose(); } -void FadeEffectLB::Fill() -{ - InsertEntry( SD_RESSTR( STR_EFFECT_NONE ) ); - mpImpl->maPresets.push_back( TransitionPresetPtr() ); - mpImpl->maSet.push_back( "" ); - - const TransitionPresetList& rPresetList = TransitionPreset::getTransitionPresetList(); - - for( auto aIter = rPresetList.begin(); aIter != rPresetList.end(); ++aIter ) - { - TransitionPresetPtr pPreset = *aIter; - const OUString sLabel( pPreset->getSetLabel() ); - if( !sLabel.isEmpty() ) - { - if( mpImpl->maNumVariants.find( pPreset->getSetId() ) == mpImpl->maNumVariants.end() ) - { - InsertEntry( sLabel ); - mpImpl->maSet.push_back( pPreset->getSetId() ); - mpImpl->maNumVariants[pPreset->getSetId()] = 1; - } - else - { - mpImpl->maNumVariants[pPreset->getSetId()]++; - } - mpImpl->maPresets.push_back( pPreset ); - } - } - - assert( static_cast<size_t>( GetEntryCount() ) == mpImpl->maSet.size() ); - assert( mpImpl->maPresets.size() == 1 + TransitionPreset::getTransitionPresetList().size() ); - - SelectEntryPos(0); -} - -void FadeEffectLB::FillVariantLB(ListBox& rVariantLB) -{ - rVariantLB.Clear(); - for( auto aIter = mpImpl->maPresets.begin(); aIter != mpImpl->maPresets.end(); ++aIter ) - { - TransitionPresetPtr pPreset = *aIter; - if( !pPreset ) - continue; - const OUString sLabel( pPreset->getSetLabel() ); - if( !sLabel.isEmpty() && mpImpl->maSet[GetSelectEntryPos()].equals( pPreset->getSetId() ) ) - { - rVariantLB.InsertEntry( pPreset->getVariantLabel() ); - } - } - if( rVariantLB.GetEntryCount() > 0 ) - rVariantLB.SelectEntryPos( 0 ); -} - VCL_BUILDER_DECL_FACTORY(FadeEffectLB) { WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK; @@ -122,37 +70,5 @@ VCL_BUILDER_DECL_FACTORY(FadeEffectLB) rRet = VclPtr<FadeEffectLB>::Create(pParent, nBits); } -void FadeEffectLB::applySelected( SdPage* pSlide, ListBox& rVariantLB ) const -{ - if( !pSlide ) - return; - - if( GetSelectEntryPos() == 0 ) - { - pSlide->setTransitionType( 0 ); - pSlide->setTransitionSubtype( 0 ); - pSlide->setTransitionDirection( true ); - pSlide->setTransitionFadeColor( 0 ); - return; - } - - int nMatch = 0; - for( auto aIter = mpImpl->maPresets.begin(); aIter != mpImpl->maPresets.end(); ++aIter ) - { - TransitionPresetPtr pPreset = *aIter; - if( !pPreset ) - continue; - const OUString sLabel( pPreset->getSetLabel() ); - if( !sLabel.isEmpty() && mpImpl->maSet[GetSelectEntryPos()].equals( pPreset->getSetId() ) ) - { - if( nMatch == rVariantLB.GetSelectEntryPos() ) - { - pPreset->apply( pSlide ); - break; - } - nMatch++; - } - } -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index cc1f3bb44151..e90752452106 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -50,18 +50,6 @@ using namespace ::com::sun::star::uno; const int SdDocPreviewWin::FRAME = 4; -void SdDocPreviewWin::SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage ) -{ - mpObj = pObj; - mnShowPage = nShowPage; - if (mxSlideShow.is()) - { - mxSlideShow->end(); - mxSlideShow.clear(); - } - updateViewSettings(); -} - VCL_BUILDER_DECL_FACTORY(SdDocPreviewWin) { WinBits nWinStyle = 0; @@ -175,31 +163,6 @@ void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta } } -void SdDocPreviewWin::startPreview() -{ - ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell * >( mpObj ); - if( pDocShell ) - { - SdDrawDocument* pDoc = pDocShell->GetDoc(); - - if( pDoc ) - { - SdPage* pPage = pDoc->GetSdPage( mnShowPage, PK_STANDARD ); - - if( pPage && (pPage->getTransitionType() != 0) ) - { - if( !mxSlideShow.is() ) - mxSlideShow = sd::SlideShow::Create( pDoc ); - - Reference< XDrawPage > xDrawPage( pPage->getUnoPage(), UNO_QUERY ); - Reference< XAnimationNode > xAnimationNode; - - mxSlideShow->startPreview( xDrawPage, xAnimationNode, this ); - } - } - } -} - bool SdDocPreviewWin::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) diff --git a/sd/source/ui/inc/TemplateScanner.hxx b/sd/source/ui/inc/TemplateScanner.hxx index 106559ee7012..fdd6f5b6b340 100644 --- a/sd/source/ui/inc/TemplateScanner.hxx +++ b/sd/source/ui/inc/TemplateScanner.hxx @@ -110,19 +110,6 @@ public: */ virtual ~TemplateScanner(); - /** Execute the actual scanning of templates. When this method - terminates the result can be obtained by calling the - <member>GetTemplateList</member> method. - */ - void Scan(); - - /** Return the list of template folders. It lies in the responsibility - of the caller to take ownership of some or all entries and remove - them from the returned list. All entries that remain until the - destructor is called will be destroyed. - */ - std::vector<TemplateDir*>& GetFolderList() { return maFolderList;} - /** Implementation of the AsynchronousTask interface method. */ virtual void RunNextStep() override; @@ -139,11 +126,6 @@ public: */ const TemplateEntry* GetLastAddedEntry() const { return mpLastAddedEntry;} - /** Set whether to sort the template entries inside the regions. - */ - void EnableEntrySorting () - {mbEntrySortingEnabled = true;} - private: /** The current state determines which step will be executed next by RunNextStep(). diff --git a/sd/source/ui/inc/dlgctrls.hxx b/sd/source/ui/inc/dlgctrls.hxx index 06bec9386321..bbc76b638fd0 100644 --- a/sd/source/ui/inc/dlgctrls.hxx +++ b/sd/source/ui/inc/dlgctrls.hxx @@ -38,11 +38,6 @@ public: FadeEffectLB(vcl::Window* pParent, WinBits nStyle); virtual ~FadeEffectLB() override; virtual void dispose() override; - void Fill(); - - void FillVariantLB(ListBox& rVariantLB); - - void applySelected( SdPage* pSlide, ListBox& rVariantLB ) const; FadeEffectLBImpl* mpImpl; }; diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx index ddcae4bdfa86..ad2b14e77807 100644 --- a/sd/source/ui/inc/docprev.hxx +++ b/sd/source/ui/inc/docprev.hxx @@ -63,14 +63,10 @@ public: SdDocPreviewWin( vcl::Window* pParent, const WinBits nStyle ); virtual ~SdDocPreviewWin() override; virtual void dispose() override; - void SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage ); virtual void Resize() override; - void startPreview(); virtual bool Notify( NotifyEvent& rNEvt ) override; - void SetClickHdl( const Link<SdDocPreviewWin&,void>& rLink ) { aClickHdl = rLink; } - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; }; diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx index 68e507c8fc93..918a956ff2dd 100644 --- a/sd/source/ui/inc/filedlg.hxx +++ b/sd/source/ui/inc/filedlg.hxx @@ -50,6 +50,7 @@ public: ErrCode Execute(); OUString GetPath() const; void SetPath( const OUString& rPath ); + // WIP, please don't remove, dear Clang plugins bool IsInsertAsLinkSelected(); }; diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 4d7b6f4563dd..225849505413 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -135,11 +135,6 @@ SlideBackground::~SlideBackground() disposeOnce(); } -bool SlideBackground::IsDraw() -{ - return ( maApplication == vcl::EnumContext::Application_Draw ); -} - bool SlideBackground::IsImpress() { return ( maApplication == vcl::EnumContext::Application_Impress ); diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx index 7514b4388ba4..ed41aa08004d 100644 --- a/sd/source/ui/sidebar/SlideBackground.hxx +++ b/sd/source/ui/sidebar/SlideBackground.hxx @@ -137,7 +137,6 @@ private: const OUString GetBitmapSetOrDefault(); const OUString GetPatternSetOrDefault(); bool IsImpress(); - bool IsDraw(); void addListener(); void removeListener(); void populateMasterSlideDropdown(); |