diff options
Diffstat (limited to 'sw/source/ui/misc/glshell.cxx')
-rw-r--r-- | sw/source/ui/misc/glshell.cxx | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 4d93f8d7542f..ce41c2906e45 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -49,18 +49,13 @@ #include <view.hxx> #include <glshell.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <glosdoc.hxx> #include <shellio.hxx> #include <initui.hxx> // fuer ::GetGlossaries() -#ifndef _CMDID_H #include <cmdid.h> -#endif -#ifndef _SWERROR_H #include <swerror.h> -#endif -#ifndef _MISC_HRC #include <misc.hrc> -#endif #define SwWebGlosDocShell @@ -105,7 +100,7 @@ void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq ) void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) { - if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, FALSE )) + if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, sal_False )) { if( !rSh.GetDoc()->IsModified() ) rSet.DisableItem( SID_SAVEDOC ); @@ -115,7 +110,7 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) } -BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName, +sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName, const String& rShortNm, const String& rLongNm ) { const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); @@ -128,7 +123,7 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName, pGlosHdl = rSh.GetView().GetGlosHdl(); pGlosHdl->GetMacros( rShortNm, aStart, aEnd, pBlock ); - USHORT nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm, + sal_uInt16 nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm, pCfg->IsSaveRelFile(), pBlock->IsOnlyTextBlock( rShortNm ) ); @@ -193,7 +188,7 @@ void SwGlosDocShell::GetState( SfxItemSet& rSet ) --------------------------------------------------------------------*/ -BOOL SwGlosDocShell::Save() +sal_Bool SwGlosDocShell::Save() { // In case of an API object which holds this document, it is possible that the WrtShell is already // dead. For instance, if the doc is modified via this API object, and then, upon office shutdown, @@ -204,8 +199,8 @@ BOOL SwGlosDocShell::Save() return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( FALSE ); - return FALSE; + SetModified( sal_False ); + return sal_False; } } @@ -256,15 +251,15 @@ void SwWebGlosDocShell::GetState( SfxItemSet& rSet ) --------------------------------------------------------------------*/ -BOOL SwWebGlosDocShell::Save() +sal_Bool SwWebGlosDocShell::Save() { // same comment as in SwGlosDocShell::Save - see there if ( GetWrtShell() ) return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( FALSE ); - return FALSE; + SetModified( sal_False ); + return sal_False; } } @@ -274,7 +269,7 @@ BOOL SwWebGlosDocShell::Save() SV_IMPL_REF ( SwDocShell ) -SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, BOOL bShow ) +SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, sal_Bool bShow ) { SwDocShellRef xDocSh; @@ -283,7 +278,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS { // erfrage welche View registriert ist. Im WebWriter gibts es keine // normale View - USHORT nViewId = 0 != &SwView::Factory() ? 2 : 6; + sal_uInt16 nViewId = 0 != &SwView::Factory() ? 2 : 6; String sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName )); if( 6 == nViewId ) @@ -311,8 +306,9 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS aDocTitle += ' '; aDocTitle += sLongName; - BOOL bDoesUndo = xDocSh->GetDoc()->DoesUndo(); - xDocSh->GetDoc()->DoUndo( FALSE ); + bool const bDoesUndo = + xDocSh->GetDoc()->GetIDocumentUndoRedo().DoesUndo(); + xDocSh->GetDoc()->GetIDocumentUndoRedo().DoUndo( false ); xDocSh->GetWrtShell()->InsertGlossary( *pGroup, rShortName ); if( !xDocSh->GetDoc()->getPrinter( false ) ) @@ -340,7 +336,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS catch( uno::Exception& ) {} - xDocSh->GetDoc()->DoUndo( bDoesUndo ); + xDocSh->GetDoc()->GetIDocumentUndoRedo().DoUndo( bDoesUndo ); xDocSh->GetDoc()->ResetModified(); if ( bShow ) pFrame->GetFrame().Appear(); |