summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-02 10:57:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-02 13:06:37 +0000
commitb1f8cf37828d5f37527e54774aa4935610aa6325 (patch)
tree33348c0208f76237f1b08823923f22f99d78b256 /sd
parentUpdated core (diff)
downloadcore-b1f8cf37828d5f37527e54774aa4935610aa6325.tar.gz
core-b1f8cf37828d5f37527e54774aa4935610aa6325.zip
loplugin:singlevalfields
Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76 Reviewed-on: https://gerrit.libreoffice.org/30476 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/TemplateScanner.cxx3
-rw-r--r--sd/source/ui/dlg/docprev.cxx70
-rw-r--r--sd/source/ui/inc/TemplateScanner.hxx6
-rw-r--r--sd/source/ui/inc/docprev.hxx2
4 files changed, 4 insertions, 77 deletions
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx
index ab816b504af2..edc802bdc462 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -153,7 +153,6 @@ TemplateScanner::TemplateScanner()
maFolderContent(),
mpTemplateDirectory(nullptr),
maFolderList(),
- mbEntrySortingEnabled(false),
mpLastAddedEntry(nullptr),
mpFolderDescriptors(new FolderDescriptorList()),
mxTemplateRoot(),
@@ -353,7 +352,7 @@ TemplateScanner::State TemplateScanner::ScanFolder()
// Scan the folder and insert it into the list of template
// folders.
mpTemplateDirectory = new TemplateDir;
- mpTemplateDirectory->EnableSorting(mbEntrySortingEnabled);
+ mpTemplateDirectory->EnableSorting(false);
// Continue with scanning all entries in the folder.
eNextState = INITIALIZE_ENTRY_SCAN;
}
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 32297a464562..640dec1a7032 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -62,7 +62,7 @@ VCL_BUILDER_DECL_FACTORY(SdDocPreviewWin)
}
SdDocPreviewWin::SdDocPreviewWin( vcl::Window* pParent, const WinBits nStyle )
-: Control(pParent, nStyle), pMetaFile( nullptr ), mpObj(nullptr), mnShowPage(0)
+: Control(pParent, nStyle), pMetaFile( nullptr )
{
SetBorderStyle( WindowBorderStyle::MONO );
svtools::ColorConfig aColorConfig;
@@ -182,9 +182,6 @@ bool SdDocPreviewWin::Notify( NotifyEvent& rNEvt )
void SdDocPreviewWin::updateViewSettings()
{
- ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( mpObj );
- SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():nullptr;
-
SvtAccessibilityOptions aAccOptions;
bool bUseWhiteColor = !aAccOptions.GetIsForPagePreviews() && GetSettings().GetStyleSettings().GetHighContrastMode();
if( bUseWhiteColor )
@@ -197,71 +194,8 @@ void SdDocPreviewWin::updateViewSettings()
maDocumentColor = Color( aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor );
}
- GDIMetaFile* pMtf = nullptr;
-
- if(pDoc)
- {
- SdPage * pPage = pDoc->GetSdPage( mnShowPage, PageKind::Standard );
- if( pPage )
- {
- SdrOutliner& rOutl = pDoc->GetDrawOutliner();
- Color aOldBackgroundColor = rOutl.GetBackgroundColor();
- rOutl.SetBackgroundColor( maDocumentColor );
-
- pMtf = new GDIMetaFile;
-
- ScopedVclPtrInstance< VirtualDevice > pVDev;
-
- const Fraction aFrac( pDoc->GetScaleFraction() );
- const MapMode aMap( pDoc->GetScaleUnit(), Point(), aFrac, aFrac );
-
- pVDev->SetMapMode( aMap );
-
- // Disable output, as we only want to record a metafile
- pVDev->EnableOutput( false );
-
- pMtf->Record( pVDev );
-
- ::sd::DrawView* pView = new ::sd::DrawView(pDocShell, this, nullptr);
-
- const Size aSize( pPage->GetSize() );
-
- pView->SetBordVisible( false );
- pView->SetPageVisible( false );
- pView->ShowSdrPage( pPage );
-
- const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() );
- const Size aNewSize( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(),
- aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() );
- const Rectangle aClipRect( aNewOrg, aNewSize );
- MapMode aVMap( aMap );
-
- pVDev->Push();
- aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
- pVDev->SetRelativeMapMode( aVMap );
- pVDev->IntersectClipRegion( aClipRect );
-
- // Use new StandardCheckVisisbilityRedirector
- StandardCheckVisisbilityRedirector aRedirector;
- const Rectangle aRedrawRectangle( Point(), aNewSize );
- vcl::Region aRedrawRegion(aRedrawRectangle);
- pView->SdrPaintView::CompleteRedraw(pVDev,aRedrawRegion,&aRedirector);
-
- pVDev->Pop();
-
- pMtf->Stop();
- pMtf->WindStart();
- pMtf->SetPrefMapMode( aMap );
- pMtf->SetPrefSize( aNewSize );
-
- rOutl.SetBackgroundColor( aOldBackgroundColor );
-
- delete pView;
- }
- }
-
delete pMetaFile;
- pMetaFile = pMtf;
+ pMetaFile = nullptr;
Invalidate();
}
diff --git a/sd/source/ui/inc/TemplateScanner.hxx b/sd/source/ui/inc/TemplateScanner.hxx
index fdd6f5b6b340..9cba2b67159f 100644
--- a/sd/source/ui/inc/TemplateScanner.hxx
+++ b/sd/source/ui/inc/TemplateScanner.hxx
@@ -148,11 +148,7 @@ private:
/** The data structure that is to be filled with information about the
template files.
*/
- std::vector<TemplateDir*> maFolderList;
-
- /** Whether the template entries have to be sorted.
- */
- bool mbEntrySortingEnabled;
+ std::vector<TemplateDir*> maFolderList;
/** This member points into the maFolderList to the member that was most
recently added.
diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx
index ad2b14e77807..48269801b3c5 100644
--- a/sd/source/ui/inc/docprev.hxx
+++ b/sd/source/ui/inc/docprev.hxx
@@ -43,8 +43,6 @@ class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
protected:
GDIMetaFile* pMetaFile;
Link<SdDocPreviewWin&,void> aClickHdl;
- SfxObjectShell* mpObj;
- sal_uInt16 mnShowPage;
Color maDocumentColor;
rtl::Reference< sd::SlideShow > mxSlideShow;