diff options
Diffstat (limited to 'sw/source/ui/app/docst.cxx')
-rw-r--r-- | sw/source/ui/app/docst.cxx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 90867fe9fddf..bdb823ae5874 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -268,7 +268,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, sal_False, &pItem )) { - sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); + const sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); String sName; sal_uInt16 nMask = 0; @@ -283,7 +283,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) sal_False, &pItem )) sParent = ((const SfxStringItem*)pItem)->GetValue(); - nRet = Edit( sName, sParent, nFamily, nMask, sal_True, sal_False, 0, rReq.IsAPI() ); + nRet = Edit( sName, sParent, nFamily, nMask, sal_True, 0, 0, rReq.IsAPI() ); } break; @@ -445,7 +445,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) switch(nSlot) { case SID_STYLE_EDIT: - nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, sal_False, pActShell ); + nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, 0, pActShell ); break; case SID_STYLE_DELETE: nRet = Delete(aParam, nFamily); @@ -604,10 +604,15 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl) return m_nRet; } -// Edit -sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask, - sal_Bool bNew, sal_uInt16 nPageId, SwWrtShell* pActShell, - sal_Bool bBasic ) +sal_uInt16 SwDocShell::Edit( + const String &rName, + const String &rParent, + const sal_uInt16 nFamily, + sal_uInt16 nMask, + const sal_Bool bNew, + const sal_uInt16 nSlot, + SwWrtShell* pActShell, + const sal_Bool bBasic ) { OSL_ENSURE(GetWrtShell(), "No Shell, no Styles"); SfxStyleSheetBase *pStyle = 0; @@ -758,7 +763,7 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); SfxAbstractApplyTabDialog* pDlg = pFact->CreateTemplateDialog( - 0, *(xTmp.get()), nFamily, nPageId, + 0, *(xTmp.get()), nFamily, nSlot, pActShell ? pActShell : pWrtShell, bNew); OSL_ENSURE(pDlg, "Dialogdiet fail!"); ApplyStyle aApplyStyleHelper(*this, bNew, pStyle, nRet, xTmp, nFamily, pDlg, mxBasePool, bModified); @@ -1276,9 +1281,12 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrent } -void SwDocShell::FormatPage( const String& rPage, sal_uInt16 nPageId, SwWrtShell* pActShell ) +void SwDocShell::FormatPage( + const String& rPage, + const sal_uInt16 nSlot, + SwWrtShell& rActShell ) { - Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, nPageId, pActShell); + Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, nSlot, &rActShell); } Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily ) |