improve variable scope
Change-Id: I1207c570c4bceac73b3197e11bcefcf73837d1b3
This commit is contained in:
@@ -1756,21 +1756,12 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
|
|||||||
void DrawViewShell::SetPageProperties (SfxRequest& rReq)
|
void DrawViewShell::SetPageProperties (SfxRequest& rReq)
|
||||||
{
|
{
|
||||||
SdPage *pPage = getCurrentPage();
|
SdPage *pPage = getCurrentPage();
|
||||||
|
if (!pPage)
|
||||||
|
return;
|
||||||
sal_uInt16 nSlotId = rReq.GetSlot();
|
sal_uInt16 nSlotId = rReq.GetSlot();
|
||||||
const SfxItemSet *pArgs = rReq.GetArgs();
|
const SfxItemSet *pArgs = rReq.GetArgs();
|
||||||
|
if (!pArgs)
|
||||||
if ( pPage && pArgs )
|
return;
|
||||||
{
|
|
||||||
Size aSize = pPage->GetSize();
|
|
||||||
PageKind ePageKind = GetPageKind();
|
|
||||||
const SfxPoolItem* pPoolItem = nullptr;
|
|
||||||
Size aNewSize(aSize);
|
|
||||||
sal_Int32 nLeft = -1, nRight = -1, nUpper = -1, nLower = -1;
|
|
||||||
bool bScaleAll = true;
|
|
||||||
Orientation eOrientation = pPage->GetOrientation();
|
|
||||||
SdPage* pMasterPage = pPage->IsMasterPage() ? pPage : &static_cast<SdPage&>(pPage->TRG_GetMasterPage());
|
|
||||||
bool bFullSize = pMasterPage->IsBackgroundFullSize();
|
|
||||||
sal_uInt16 nPaperBin = pPage->GetPaperBin();
|
|
||||||
|
|
||||||
if ( ( nSlotId >= SID_ATTR_PAGE_COLOR ) && ( nSlotId <= SID_ATTR_PAGE_FILLSTYLE ) )
|
if ( ( nSlotId >= SID_ATTR_PAGE_COLOR ) && ( nSlotId <= SID_ATTR_PAGE_FILLSTYLE ) )
|
||||||
{
|
{
|
||||||
@@ -1843,6 +1834,16 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
PageKind ePageKind = GetPageKind();
|
||||||
|
const SfxPoolItem* pPoolItem = nullptr;
|
||||||
|
Size aNewSize(pPage->GetSize());
|
||||||
|
sal_Int32 nLeft = -1, nRight = -1, nUpper = -1, nLower = -1;
|
||||||
|
bool bScaleAll = true;
|
||||||
|
Orientation eOrientation = pPage->GetOrientation();
|
||||||
|
SdPage* pMasterPage = pPage->IsMasterPage() ? pPage : &static_cast<SdPage&>(pPage->TRG_GetMasterPage());
|
||||||
|
bool bFullSize = pMasterPage->IsBackgroundFullSize();
|
||||||
|
sal_uInt16 nPaperBin = pPage->GetPaperBin();
|
||||||
|
|
||||||
switch (nSlotId)
|
switch (nSlotId)
|
||||||
{
|
{
|
||||||
case SID_ATTR_PAGE_LRSPACE:
|
case SID_ATTR_PAGE_LRSPACE:
|
||||||
@@ -1879,10 +1880,8 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DrawViewShell::GetState (SfxItemSet& rSet)
|
void DrawViewShell::GetState (SfxItemSet& rSet)
|
||||||
{
|
{
|
||||||
// Iterate over all requested items in the set.
|
// Iterate over all requested items in the set.
|
||||||
|
Reference in New Issue
Block a user