diff options
Diffstat (limited to 'sw/source/ui/app/docst.cxx')
-rw-r--r-- | sw/source/ui/app/docst.cxx | 161 |
1 files changed, 84 insertions, 77 deletions
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index d06ab31b7478..2e38cde62c52 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -52,7 +53,8 @@ #include <fchrfmt.hxx> #include <svtools/htmlcfg.hxx> #include <SwStyleNameMapper.hxx> -#include <undobj.hxx> +#include <SwRewriter.hxx> +#include <numrule.hxx> #include <swundo.hxx> #include "view.hxx" @@ -62,7 +64,8 @@ #include "cmdid.h" #include "globals.hrc" #include "viewopt.hxx" -#include "doc.hxx" +#include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include "swstyle.h" #include "frmfmt.hxx" #include "charfmt.hxx" @@ -95,8 +98,8 @@ using namespace ::com::sun::star; void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); - USHORT nActualFamily = USHRT_MAX; + sal_uInt16 nWhich = aIter.FirstWhich(); + sal_uInt16 nActualFamily = USHRT_MAX; SwWrtShell* pShell = pSh ? pSh : GetWrtShell(); if(!pShell) @@ -113,7 +116,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) SfxViewFrame* pFrame = pShell->GetView().GetViewFrame(); const ISfxTemplateCommon* pCommon = SFX_APP()->GetCurrentTemplateCommon(pFrame->GetBindings()); if( pCommon ) - nActualFamily = static_cast< USHORT >(pCommon->GetActualFamily()); + nActualFamily = static_cast< sal_uInt16 >(pCommon->GetActualFamily()); } while (nWhich) @@ -163,12 +166,12 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) SfxTemplateItem aItem(nWhich, aName); - USHORT nMask = 0; + sal_uInt16 nMask = 0; if( pDoc->get(IDocumentSettingAccess::HTML_MODE) ) nMask = SWSTYLEBIT_HTML; else { - const int nSelection = pShell->GetFrmType(0,TRUE); + const int nSelection = pShell->GetFrmType(0,sal_True); if(pShell->GetCurTOX()) nMask = SWSTYLEBIT_IDX ; else if(nSelection & FRMTYPE_HEADER || @@ -210,7 +213,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) rSet.DisableItem( nWhich ); else { - USHORT n = pShell->GetCurPageDesc( FALSE ); + sal_uInt16 n = pShell->GetCurPageDesc( sal_False ); if( n < pShell->GetPageDescCnt() ) aName = pShell->GetPageDesc( n ).GetName(); @@ -271,42 +274,42 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); - USHORT nRet = 0xffff; + sal_uInt16 nSlot = rReq.GetSlot(); + sal_uInt16 nRet = 0xffff; const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; SwWrtShell* pActShell = 0; - BOOL bSetReturn = TRUE; + sal_Bool bSetReturn = sal_True; switch (nSlot) { case SID_STYLE_NEW: if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, - FALSE, &pItem )) + sal_False, &pItem )) { - USHORT nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); String sName; - USHORT nMask = 0; + sal_uInt16 nMask = 0; if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW, - FALSE, &pItem )) + sal_False, &pItem )) sName = ((const SfxStringItem*)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK, - FALSE, &pItem )) + sal_False, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); String sParent; if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, - FALSE, &pItem )) + sal_False, &pItem )) sParent = ((const SfxStringItem*)pItem)->GetValue(); - nRet = Edit( sName, sParent, nFamily, nMask, TRUE, FALSE, 0, rReq.IsAPI() ); + nRet = Edit( sName, sParent, nFamily, nMask, sal_True, sal_False, 0, rReq.IsAPI() ); } break; case SID_STYLE_APPLY: if( !pArgs ) { - GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, FALSE); + GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, sal_False); break; } else @@ -345,8 +348,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) case SID_STYLE_NEW_BY_EXAMPLE: { String aParam; - USHORT nFamily = SFX_STYLE_FAMILY_PARA; - USHORT nMask = 0; + sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA; + sal_uInt16 nMask = 0; if( !pArgs ) { @@ -386,14 +389,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) ASSERT( pArgs->Count(), "SfxBug ItemSet ist leer"); SwWrtShell* pShell = GetWrtShell(); - if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )) + if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )) aParam = ((const SfxStringItem*)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY, - FALSE, &pItem )) + sal_False, &pItem )) nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, FALSE, &pItem )) + if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, sal_False, &pItem )) { String aFamily = ((const SfxStringItem*)pItem)->GetValue(); if(aFamily.CompareToAscii("CharacterStyles") == COMPARE_EQUAL) @@ -413,10 +416,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) } if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK, - FALSE, &pItem )) + sal_False, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL, - FALSE, &pItem )) + sal_False, &pItem )) pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue(); if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE ) @@ -445,7 +448,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) } break; case SFX_STYLE_FAMILY_PSEUDO: - if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, FALSE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, sal_False, &pItem)) { aParam = ((const SfxStringItem*)pItem)->GetValue(); } @@ -459,7 +462,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) switch(nSlot) { case SID_STYLE_EDIT: - nRet = Edit(aParam, aEmptyStr, nFamily, nMask, FALSE, FALSE, pActShell ); + nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, sal_False, pActShell ); break; case SID_STYLE_DELETE: nRet = Delete(aParam, nFamily); @@ -497,7 +500,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) if(bSetReturn) { - if(rReq.IsAPI()) // Basic bekommt nur TRUE oder FALSE + if(rReq.IsAPI()) // Basic bekommt nur sal_True oder sal_False rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet !=0)); else rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet)); @@ -510,15 +513,15 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) --------------------------------------------------------------------*/ -USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFamily, USHORT nMask, - BOOL bNew, BOOL bColumn, SwWrtShell* pActShell, - BOOL bBasic ) +sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask, + sal_Bool bNew, sal_Bool bColumn, SwWrtShell* pActShell, + sal_Bool bBasic ) { ASSERT(GetWrtShell(), "Keine Shell, keine Styles"); SfxStyleSheetBase *pStyle = 0; - USHORT nRet = nMask; - BOOL bModified = pDoc->IsModified(); + sal_uInt16 nRet = nMask; + sal_Bool bModified = pDoc->IsModified(); if( bNew ) { @@ -540,7 +543,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwTxtFmtColl* pColl = pWrtShell->FindTxtFmtCollByName( rParent ); if(!pColl) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(USHRT_MAX != nId) pColl = pWrtShell->GetTxtCollFromPool( nId ); } @@ -577,7 +580,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwCharFmt* pCFmt = pWrtShell->FindCharFmtByName( rParent ); if(!pCFmt) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); if(USHRT_MAX != nId) pCFmt = pWrtShell->GetCharFmtFromPool( nId ); } @@ -601,7 +604,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwFrmFmt* pFFmt = pWrtShell->GetDoc()->FindFrmFmtByName( rParent ); if(!pFFmt) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); if(USHRT_MAX != nId) pFFmt = pWrtShell->GetFrmFmtFromPool( nId ); } @@ -619,7 +622,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam } if(!pStyle) - return FALSE; + return sal_False; // Dialoge zusammenstoepseln // @@ -652,7 +655,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SfxItemSet& rSet = xTmp->GetItemSet(); const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, - TRUE, &pTmpBrush ) ) + sal_True, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_BACKGROUND ); @@ -662,7 +665,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam if (!bBasic) { // vor dem Dialog wird der HtmlMode an der DocShell versenkt - USHORT nHtmlMode = ::GetHtmlMode(this); + sal_uInt16 nHtmlMode = ::GetHtmlMode(this); // In HTML mode, we do not always have a printer. In order to show // the correct page size in the Format - Page dialog, we have to @@ -674,7 +677,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam PutItem(SfxUInt16Item(SID_HTML_MODE, nHtmlMode)); FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode)); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE, @@ -709,7 +712,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { if(SFX_STYLE_FAMILY_PAGE == nFamily) { - static const USHORT aInval[] = { + static const sal_uInt16 aInval[] = { SID_IMAGE_ORIENTATION, SID_ATTR_CHAR_FONT, FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0}; @@ -720,7 +723,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, - FALSE, &pTmpBrush ) ) + sal_False, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -733,7 +736,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam if( SFX_STYLE_FAMILY_PAGE == nFamily && SvtLanguageOptions().IsCTLFontEnabled() ) { const SfxPoolItem *pItem = NULL; - if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ) , TRUE, &pItem ) == SFX_ITEM_SET ) + if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ) , sal_True, &pItem ) == SFX_ITEM_SET ) SwChartHelper::DoUpdateAllCharts( pDoc ); } } @@ -751,7 +754,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam pDoc->SetModified(); if( !bModified ) // Bug 57028 - pDoc->SetUndoNoResetModified(); + { + pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified(); + } GetWrtShell()->EndAllAction(); } @@ -761,8 +766,8 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { // #116530# //pBasePool->Erase( &aTmp ); - GetWrtShell()->Undo(UNDO_EMPTY, 1); - pDoc->ClearRedo(); + GetWrtShell()->Undo(1); + pDoc->GetIDocumentUndoRedo().ClearRedo(); } if( !bModified ) @@ -796,7 +801,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, - FALSE, &pTmpBrush ) ) + sal_False, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -814,7 +819,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam pDoc->SetModified(); if( !bModified ) // Bug 57028 - pDoc->SetUndoNoResetModified(); + { + pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified(); + } GetWrtShell()->EndAllAction(); } @@ -826,7 +833,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam --------------------------------------------------------------------*/ -USHORT SwDocShell::Delete(const String &rName, USHORT nFamily) +sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily) { SfxStyleSheetBase *pStyle = mxBasePool->Find(rName, (SfxStyleFamily)nFamily); @@ -838,9 +845,9 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily) mxBasePool->Remove(pStyle); GetWrtShell()->EndAllAction(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*-------------------------------------------------------------------- @@ -848,15 +855,15 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily) --------------------------------------------------------------------*/ -USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily, - SwWrtShell* pShell, USHORT nMode ) +sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily, + SwWrtShell* pShell, sal_uInt16 nMode ) { SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily); ASSERT(pStyle, "Wo ist der StyleSheet"); if(!pStyle) - return FALSE; + return sal_False; SwWrtShell *pSh = pShell ? pShell : GetWrtShell(); @@ -919,15 +926,15 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily, -USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily) +sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily) { ASSERT(GetWrtShell(), "Keine Shell, keine Styles"); SwEditWin& rEdtWin = pView->GetEditWin(); SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); - BOOL bWaterCan = !(pApply && pApply->eType != 0); + sal_Bool bWaterCan = !(pApply && pApply->eType != 0); if( !rName.Len() ) - bWaterCan = FALSE; + bWaterCan = sal_False; SwApplyTemplate aTemplate; aTemplate.eType = nFamily; @@ -975,7 +982,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily) --------------------------------------------------------------------*/ -USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell) +sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell) { SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell(); ASSERT(GetWrtShell(), "Keine Shell, keine Styles"); @@ -1003,7 +1010,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* // Vorlage auch anwenden, um harte Attributierung // zu entfernen GetWrtShell()->SetTxtFmtColl( pColl ); - GetWrtShell()->EndUndo(UNDO_INSFMTATTR, NULL); + GetWrtShell()->EndUndo(); GetWrtShell()->EndAllAction(); } break; @@ -1026,7 +1033,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* // Vorlage auch anwenden, um harte Attributierung // zu entfernen - pCurrWrtShell->SetFrmFmt( pFrm, TRUE ); + pCurrWrtShell->SetFrmFmt( pFrm, sal_True ); pCurrWrtShell->EndAllAction(); } } @@ -1069,8 +1076,8 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* --------------------------------------------------------------------*/ -USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, - USHORT nMask, SwWrtShell* pShell ) +sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily, + sal_uInt16 nMask, SwWrtShell* pShell ) { SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell(); SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find( @@ -1102,7 +1109,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl()); // setze die Maske noch an der Collection: - USHORT nId = pColl->GetPoolFmtId() & 0x87ff; + sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff; switch( nMask & 0x0fff ) { case SWSTYLEBIT_TEXT: @@ -1148,12 +1155,12 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, /* #61359# jetzt auch wieder alle Orientierungen const SfxPoolItem* pItem; if( SFX_ITEM_SET == aSet.GetItemState( RES_VERT_ORIENT, - FALSE, &pItem ) && + sal_False, &pItem ) && text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient()) aSet.ClearItem( RES_VERT_ORIENT ); if( SFX_ITEM_SET == aSet.GetItemState( RES_HORI_ORIENT, - FALSE, &pItem ) && + sal_False, &pItem ) && text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient()) aSet.ClearItem( RES_HORI_ORIENT ); */ @@ -1184,13 +1191,13 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, case SFX_STYLE_FAMILY_PAGE: { pCurrWrtShell->StartAllAction(); - USHORT nPgDsc = pCurrWrtShell->GetCurPageDesc(); + sal_uInt16 nPgDsc = pCurrWrtShell->GetCurPageDesc(); SwPageDesc& rSrc = (SwPageDesc&)pCurrWrtShell->GetPageDesc( nPgDsc ); SwPageDesc& rDest = *(SwPageDesc*)pStyle->GetPageDesc(); - USHORT nPoolId = rDest.GetPoolFmtId(); - USHORT nHId = rDest.GetPoolHelpId(); - BYTE nHFId = rDest.GetPoolHlpFileId(); + sal_uInt16 nPoolId = rDest.GetPoolFmtId(); + sal_uInt16 nHId = rDest.GetPoolHelpId(); + sal_uInt8 nHFId = rDest.GetPoolHlpFileId(); pCurrWrtShell->GetDoc()->CopyPageDesc( rSrc, rDest ); @@ -1200,7 +1207,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, rDest.SetPoolHlpFileId( nHFId ); // werden Kopf-/Fusszeilen angelegt, so gibt es kein Undo mehr! - pCurrWrtShell->GetDoc()->DelAllUndoObj(); + pCurrWrtShell->GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj(); pCurrWrtShell->EndAllAction(); } @@ -1230,7 +1237,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, void SwDocShell::LoadStyles( SfxObjectShell& rSource ) { - _LoadStyles(rSource, FALSE); + _LoadStyles(rSource, sal_False); } /* -----------------16.05.2003 15:45----------------- bPreserveCurrentDocument determines whether SetFixFields() is called @@ -1239,7 +1246,7 @@ void SwDocShell::LoadStyles( SfxObjectShell& rSource ) Calls of ::LoadStyles() normally use files especially loaded for the purpose of importing styles. --------------------------------------------------*/ -void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument ) +void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument ) { /* [Beschreibung] @@ -1268,13 +1275,13 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu } else { - BOOL bModified = pDoc->IsModified(); + sal_Bool bModified = pDoc->IsModified(); pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc ); if( !bModified && pDoc->IsModified() && !pView ) { // die View wird spaeter angelegt, ueberschreibt aber das // Modify-Flag. Per Undo ist sowieso nichts mehr zu machen - pDoc->SetUndoNoResetModified(); + pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified(); } } } @@ -1283,9 +1290,9 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu } -void SwDocShell::FormatPage( const String& rPage, BOOL bColumn, SwWrtShell* pActShell ) +void SwDocShell::FormatPage( const String& rPage, sal_Bool bColumn, SwWrtShell* pActShell ) { - Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, FALSE, bColumn, pActShell); + Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, bColumn, pActShell); } Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode ) |