summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-04 15:34:03 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-05 07:15:04 +0000
commitb8c528a3515616bf0ec852c2f7b1bb07dc9f7ed2 (patch)
tree4ea7dac8d26da2645ef871d149d7c7f31191ca06 /sd
parent5334ff287c65f028753171c7b38da7ffbcebc1cc (diff)
loplugin:constantparam in sd
Change-Id: Ife610abb1f8ed19ab219301d41d7fc2174ff1d29 Reviewed-on: https://gerrit.libreoffice.org/23830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdpage.hxx2
-rw-r--r--sd/source/core/sdpage.cxx24
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.cxx2
-rw-r--r--sd/source/ui/inc/PreviewRenderer.hxx14
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerProviders.cxx3
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx13
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx3
-rw-r--r--sd/source/ui/slidesorter/cache/SlsPageCache.cxx2
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx7
9 files changed, 23 insertions, 47 deletions
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 2427a5cd6f8b..46d47b907a11 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -172,7 +172,7 @@ public:
void EnsureMasterPageDefaultBackground();
SdrObject* CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInsert=false);
- SdrObject* CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert);
+ SdrObject* CreateDefaultPresObj(PresObjKind eObjKind);
void DestroyDefaultPresObj(PresObjKind eObjKind);
SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool bFuzzySearch = false );
PresObjKind GetPresObjKind(SdrObject* pObj) const;
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index a4a6c655a7aa..55c779c41ff9 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -820,11 +820,11 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
{
SdrObject* pMasterTitle = pMasterPage->GetPresObj( PRESOBJ_TITLE );
if( pMasterTitle == nullptr )
- pMasterPage->CreateDefaultPresObj(PRESOBJ_TITLE, true);
+ pMasterPage->CreateDefaultPresObj(PRESOBJ_TITLE);
SdrObject* pMasterOutline = pMasterPage->GetPresObj( mePageKind==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
if( pMasterOutline == nullptr )
- pMasterPage->CreateDefaultPresObj( mePageKind == PK_STANDARD ? PRESOBJ_OUTLINE : PRESOBJ_NOTES, true );
+ pMasterPage->CreateDefaultPresObj( mePageKind == PK_STANDARD ? PRESOBJ_OUTLINE : PRESOBJ_NOTES );
}
// create header&footer objects
@@ -835,20 +835,20 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
{
SdrObject* pHeader = pMasterPage->GetPresObj( PRESOBJ_HEADER );
if( pHeader == nullptr )
- pMasterPage->CreateDefaultPresObj( PRESOBJ_HEADER, true );
+ pMasterPage->CreateDefaultPresObj( PRESOBJ_HEADER );
}
SdrObject* pDate = pMasterPage->GetPresObj( PRESOBJ_DATETIME );
if( pDate == nullptr )
- pMasterPage->CreateDefaultPresObj( PRESOBJ_DATETIME, true );
+ pMasterPage->CreateDefaultPresObj( PRESOBJ_DATETIME );
SdrObject* pFooter = pMasterPage->GetPresObj( PRESOBJ_FOOTER );
if( pFooter == nullptr )
- pMasterPage->CreateDefaultPresObj( PRESOBJ_FOOTER, true );
+ pMasterPage->CreateDefaultPresObj( PRESOBJ_FOOTER );
SdrObject* pNumber = pMasterPage->GetPresObj( PRESOBJ_SLIDENUMBER );
if( pNumber == nullptr )
- pMasterPage->CreateDefaultPresObj( PRESOBJ_SLIDENUMBER, true );
+ pMasterPage->CreateDefaultPresObj( PRESOBJ_SLIDENUMBER );
}
}
}
@@ -932,23 +932,23 @@ void getPresObjProp( const SdPage& rPage, const char* sObjKind, const char* sPag
}
-SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
+SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind)
{
if( eObjKind == PRESOBJ_TITLE )
{
Rectangle aTitleRect( GetTitleRect() );
- return CreatePresObj(PRESOBJ_TITLE, false, aTitleRect, bInsert);
+ return CreatePresObj(PRESOBJ_TITLE, false, aTitleRect, true/*bInsert*/);
}
else if( eObjKind == PRESOBJ_OUTLINE )
{
Rectangle aLayoutRect( GetLayoutRect() );
- return CreatePresObj( PRESOBJ_OUTLINE, false, aLayoutRect, bInsert);
+ return CreatePresObj( PRESOBJ_OUTLINE, false, aLayoutRect, true/*bInsert*/);
}
else if( eObjKind == PRESOBJ_NOTES )
{
Rectangle aLayoutRect( GetLayoutRect() );
- return CreatePresObj( PRESOBJ_NOTES, false, aLayoutRect, bInsert);
+ return CreatePresObj( PRESOBJ_NOTES, false, aLayoutRect, true/*bInsert*/);
}
else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) )
{
@@ -981,7 +981,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
else
{
Rectangle aRect( aPos, aSize );
- return CreatePresObj( eObjKind, false, aRect, bInsert );
+ return CreatePresObj( eObjKind, false, aRect, true/*bInsert*/ );
}
}
else
@@ -1008,7 +1008,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
aPos.Y() = aPosition.Y() + long( aPageSize.Height() - NOTES_HEADER_FOOTER_HEIGHT );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( eObjKind, false, aRect, bInsert );
+ return CreatePresObj( eObjKind, false, aRect, true/*bInsert*/ );
}
}
else
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index 07d04fd1caa0..e49bc3374487 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -138,7 +138,7 @@ void MasterLayoutDialog::applyChanges()
void MasterLayoutDialog::create(PresObjKind eKind)
{
- mpCurrentPage->CreateDefaultPresObj(eKind, true);
+ mpCurrentPage->CreateDefaultPresObj(eKind);
}
void MasterLayoutDialog::remove( PresObjKind eKind )
diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx
index 692010999259..af23ec430c71 100644
--- a/sd/source/ui/inc/PreviewRenderer.hxx
+++ b/sd/source/ui/inc/PreviewRenderer.hxx
@@ -65,21 +65,13 @@ public:
When the actual preview can not be created for some reason, then
this text is painted in an empty rectangle of the requested size
instead.
- @param bObeyHighContrastMode
- When <FALSE/> then the high contrast mode of the application is
- ignored and the preview is rendered in normal mode. When
- <TRUE/> and high contrast mode is active then the preview is
- rendered in high contrast mode.
- @param bDisplayPresentationObjects
- When <FALSE/> then the PresObj place holders are not displayed
- in the returned preview.
+ The high contrast mode of the application is
+ ignored and the preview is rendered in normal mode.
*/
Image RenderPage (
const SdPage* pPage,
const sal_Int32 nWidth,
- const OUString& sSubstitutionText,
- const bool bObeyHighContrastMode = true,
- const bool bDisplayPresentationObjects = true);
+ const OUString& sSubstitutionText);
/** Render a page with the given pixel size.
@param pPage
diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
index 709f9a0efd4c..3bec4c2ce059 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
@@ -58,8 +58,7 @@ Image PagePreviewProvider::operator () (
aPreview = rRenderer.RenderPage(
pPage,
nWidth,
- OUString(),
- false);
+ OUString());
}
return aPreview;
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index ca3438510052..ec5e6fbf5ea7 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -141,24 +141,13 @@ Bitmap GenericPageCache::GetPreviewBitmap (
}
Bitmap GenericPageCache::GetMarkedPreviewBitmap (
- const CacheKey aKey,
- const bool bResize)
+ const CacheKey aKey)
{
OSL_ASSERT(aKey != nullptr);
ProvideCacheAndProcessor();
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
Bitmap aMarkedPreview (mpBitmapCache->GetMarkedBitmap(pPage));
- const Size aBitmapSize (aMarkedPreview.GetSizePixel());
- if (bResize && aBitmapSize != maPreviewSize)
- {
- // Scale the bitmap to the desired size when that is possible,
- // i.e. the bitmap is not empty.
- if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
- {
- aMarkedPreview.Scale(maPreviewSize);
- }
- }
return aMarkedPreview;
}
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
index 91e8a9f8f403..f440450fc178 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
@@ -81,8 +81,7 @@ public:
const CacheKey aKey,
const bool bResize);
Bitmap GetMarkedPreviewBitmap (
- const CacheKey aKey,
- const bool bResize);
+ const CacheKey aKey);
void SetMarkedPreviewBitmap (
const CacheKey aKey,
const Bitmap& rMarkedBitmap);
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
index b10dbd66255d..1efb875f2d4c 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
@@ -62,7 +62,7 @@ Bitmap PageCache::GetPreviewBitmap (
Bitmap PageCache::GetMarkedPreviewBitmap (
const CacheKey aKey)
{
- return mpImplementation->GetMarkedPreviewBitmap(aKey, false/*bResize*/);
+ return mpImplementation->GetMarkedPreviewBitmap(aKey);
}
void PageCache::SetMarkedPreviewBitmap (
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 5c6af241911f..bfa61b6f53ad 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -92,9 +92,7 @@ PreviewRenderer::~PreviewRenderer()
Image PreviewRenderer::RenderPage (
const SdPage* pPage,
const sal_Int32 nWidth,
- const OUString& rSubstitutionText,
- const bool bObeyHighContrastMode,
- const bool bDisplayPresentationObjects)
+ const OUString& rSubstitutionText)
{
if (pPage != nullptr)
{
@@ -108,8 +106,7 @@ Image PreviewRenderer::RenderPage (
pPage,
Size(nWidth,nHeight),
rSubstitutionText,
- bObeyHighContrastMode,
- bDisplayPresentationObjects);
+ false/*bObeyHighContrastMode*/);
}
else
return Image();