summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviewsb.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/drviewsb.cxx')
-rw-r--r--sd/source/ui/view/drviewsb.cxx86
1 files changed, 43 insertions, 43 deletions
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index b8fa08362400..6e8509e8c166 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -160,62 +160,62 @@ void DrawViewShell::ModifyLayer (
return;
}
- if( pLayer )
+ if( !pLayer )
+ return;
+
+ const sal_uInt16 nPageCount = GetLayerTabControl()->GetPageCount();
+ sal_uInt16 nCurPage = 0;
+ sal_uInt16 nPos;
+ for( nPos = 0; nPos < nPageCount; nPos++ )
{
- const sal_uInt16 nPageCount = GetLayerTabControl()->GetPageCount();
- sal_uInt16 nCurPage = 0;
- sal_uInt16 nPos;
- for( nPos = 0; nPos < nPageCount; nPos++ )
+ sal_uInt16 nId = GetLayerTabControl()->GetPageId( nPos );
+ if (GetLayerTabControl()->GetLayerName(nId) == pLayer->GetName())
{
- sal_uInt16 nId = GetLayerTabControl()->GetPageId( nPos );
- if (GetLayerTabControl()->GetLayerName(nId) == pLayer->GetName())
- {
- nCurPage = nId;
- break;
- }
+ nCurPage = nId;
+ break;
}
+ }
- pLayer->SetName( rLayerName );
- pLayer->SetTitle( rLayerTitle );
- pLayer->SetDescription( rLayerDesc );
- mpDrawView->SetLayerVisible( rLayerName, bIsVisible );
- mpDrawView->SetLayerLocked( rLayerName, bIsLocked);
- mpDrawView->SetLayerPrintable(rLayerName, bIsPrintable);
+ pLayer->SetName( rLayerName );
+ pLayer->SetTitle( rLayerTitle );
+ pLayer->SetDescription( rLayerDesc );
+ mpDrawView->SetLayerVisible( rLayerName, bIsVisible );
+ mpDrawView->SetLayerLocked( rLayerName, bIsLocked);
+ mpDrawView->SetLayerPrintable(rLayerName, bIsPrintable);
- GetDoc()->SetChanged();
+ GetDoc()->SetChanged();
- GetLayerTabControl()->SetPageText(nCurPage, rLayerName);
+ GetLayerTabControl()->SetPageText(nCurPage, rLayerName);
- // Set page bits for modified tab name display
+ // Set page bits for modified tab name display
- TabBarPageBits nBits = TabBarPageBits::NONE;
+ TabBarPageBits nBits = TabBarPageBits::NONE;
- if (!bIsVisible)
- {
- nBits = TabBarPageBits::Blue;
- }
- if (bIsLocked)
- {
- nBits |= TabBarPageBits::Italic;
- }
- if (!bIsPrintable)
- {
- nBits |= TabBarPageBits::Underline;
- }
+ if (!bIsVisible)
+ {
+ nBits = TabBarPageBits::Blue;
+ }
+ if (bIsLocked)
+ {
+ nBits |= TabBarPageBits::Italic;
+ }
+ if (!bIsPrintable)
+ {
+ nBits |= TabBarPageBits::Underline;
+ }
- // Save the bits
+ // Save the bits
- GetLayerTabControl()->SetPageBits(nCurPage, nBits);
+ GetLayerTabControl()->SetPageBits(nCurPage, nBits);
- GetViewFrame()->GetDispatcher()->Execute(
- SID_SWITCHLAYER,
- SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
+ GetViewFrame()->GetDispatcher()->Execute(
+ SID_SWITCHLAYER,
+ SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
- // Call Invalidate at the form shell.
- FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell != nullptr)
- pFormShell->Invalidate();
- }
+ // Call Invalidate at the form shell.
+ FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
+ if (pFormShell != nullptr)
+ pFormShell->Invalidate();
}
} // end of namespace sd