diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-12 20:06:58 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-12 20:06:58 +0100 |
commit | c61cd1a5a26de1d1f62389988b00229c04e36693 (patch) | |
tree | 9d6de00f4d149cba080fe88f1eff71a67786b5f0 /sd/source/ui/docshell | |
parent | 064f1e4ed53cb16d174534e20a7d02b8c93a4948 (diff) | |
parent | f2aeec8f22f37146c2f9120e8d0ead383049c1fa (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sd/source/ui/docshell')
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/docshell/docshel2.cxx | 34 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/docshell/docshel3.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 98 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 48 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/docshell/grdocsh.cxx | 4 |
5 files changed, 96 insertions, 96 deletions
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index fdc7cae539c7..47340e07ba7c 100644..100755 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -60,7 +60,7 @@ namespace sd { |* \************************************************************************/ -void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect) +void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect) { if (nAspect == ASPECT_THUMBNAIL) { @@ -71,11 +71,11 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect) ClientView* pView = new ClientView(this, pOut, NULL); - pView->SetHlplVisible(FALSE); - pView->SetGridVisible(FALSE); - pView->SetBordVisible(FALSE); - pView->SetPageVisible(FALSE); - pView->SetGlueVisible(FALSE); + pView->SetHlplVisible(sal_False); + pView->SetGridVisible(sal_False); + pView->SetBordVisible(sal_False); + pView->SetPageVisible(sal_False); + pView->SetGlueVisible(sal_False); SdPage* pSelectedPage = NULL; @@ -85,7 +85,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect) FrameView* pFrameView = (FrameView*)pFrameViewList->GetObject(0); if( pFrameView && pFrameView->GetPageKind() == PK_STANDARD ) { - USHORT nSelectedPage = pFrameView->GetSelectedPage(); + sal_uInt16 nSelectedPage = pFrameView->GetSelectedPage(); pSelectedPage = mpDoc->GetSdPage(nSelectedPage, PK_STANDARD); } } @@ -93,9 +93,9 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect) if( NULL == pSelectedPage ) { SdPage* pPage = NULL; - USHORT nPageCnt = (USHORT) mpDoc->GetSdPageCount(PK_STANDARD); + sal_uInt16 nPageCnt = (sal_uInt16) mpDoc->GetSdPageCount(PK_STANDARD); - for (USHORT i = 0; i < nPageCnt; i++) + for (sal_uInt16 i = 0; i < nPageCnt; i++) { pPage = mpDoc->GetSdPage(i, PK_STANDARD); @@ -138,7 +138,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect) } -Rectangle DrawDocShell::GetVisArea(USHORT nAspect) const +Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const { Rectangle aVisArea; @@ -225,7 +225,7 @@ Size DrawDocShell::GetFirstPageSize() |* \************************************************************************/ -Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, USHORT nMaxEdgePixel) +Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixel) { MapMode aMapMode( MAP_100TH_MM ); const Size aSize( pPage->GetSize() ); @@ -235,7 +235,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, USHORT nMaxEdgePixel) aVDev.SetMapMode( aMapMode ); const Size aPixSize( aVDev.LogicToPixel( aSize ) ); - const ULONG nMaxEdgePix = Max( aPixSize.Width(), aPixSize.Height() ); + const sal_uLong nMaxEdgePix = Max( aPixSize.Width(), aPixSize.Height() ); Fraction aFrac( nMaxEdgePixel, nMaxEdgePix ); aMapMode.SetScaleX( aFrac ); @@ -318,12 +318,12 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, USHORT nMaxEdgePixel) /************************************************************************* |* |* Pruefen, ob die Seite vorhanden ist und dann den Anwender zwingen einen -|* noch nicht vorhandenen Namen einzugeben. Wird FALSE zurueckgegeben, +|* noch nicht vorhandenen Namen einzugeben. Wird sal_False zurueckgegeben, |* wurde die Aktion vom Anwender abgebrochen. |* \************************************************************************/ -BOOL DrawDocShell::CheckPageName (::Window* pWin, String& rName ) +sal_Bool DrawDocShell::CheckPageName (::Window* pWin, String& rName ) { const String aStrForDlg( rName ); bool bIsNameValid = IsNewPageNameValid( rName, true ); @@ -353,7 +353,7 @@ BOOL DrawDocShell::CheckPageName (::Window* pWin, String& rName ) } } - return ( bIsNameValid ? TRUE : FALSE ); + return ( bIsNameValid ? sal_True : sal_False ); } bool DrawDocShell::IsNewPageNameValid( String & rInOutPageName, bool bResetStringIfStandardName /* = false */ ) @@ -446,8 +446,8 @@ bool DrawDocShell::IsNewPageNameValid( String & rInOutPageName, bool bResetStrin { if( rInOutPageName.Len() > 0 ) { - BOOL bOutDummy; - USHORT nExistingPageNum = mpDoc->GetPageByName( rInOutPageName, bOutDummy ); + sal_Bool bOutDummy; + sal_uInt16 nExistingPageNum = mpDoc->GetPageByName( rInOutPageName, bOutDummy ); bCanUseNewName = ( nExistingPageNum == SDRPAGE_NOTFOUND ); } else diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 9e3f13ffc878..b587e4f97a48 100644..100755 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -72,9 +72,9 @@ using namespace ::com::sun::star::uno; namespace sd { -#define POOL_BUFFER_SIZE (USHORT)32768 -#define BASIC_BUFFER_SIZE (USHORT)8192 -#define DOCUMENT_BUFFER_SIZE (USHORT)32768 +#define POOL_BUFFER_SIZE (sal_uInt16)32768 +#define BASIC_BUFFER_SIZE (sal_uInt16)8192 +#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768 /************************************************************************* |* @@ -199,7 +199,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) case SID_VERSION: { - const ULONG nOldSwapMode = mpDoc->GetSwapGraphicsMode(); + const sal_uLong nOldSwapMode = mpDoc->GetSwapGraphicsMode(); mpDoc->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_TEMP ); ExecuteSlot( rReq, SfxObjectShell::GetStaticInterface() ); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index cb2514648d13..ec5988eb28e8 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -98,7 +98,7 @@ namespace sd { |* \************************************************************************/ -SfxPrinter* DrawDocShell::GetPrinter(BOOL bCreate) +SfxPrinter* DrawDocShell::GetPrinter(sal_Bool bCreate) { if (bCreate && !mpPrinter) { @@ -112,7 +112,7 @@ SfxPrinter* DrawDocShell::GetPrinter(BOOL bCreate) SdOptionsPrintItem aPrintItem( ATTR_OPTIONS_PRINT, SD_MOD()->GetSdOptions(mpDoc->GetDocumentType())); SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC ); - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; nFlags = (aPrintItem.GetOptionsPrint().IsWarningSize() ? SFX_PRINTER_CHG_SIZE : 0) | (aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SFX_PRINTER_CHG_ORIENTATION : 0); @@ -123,12 +123,12 @@ SfxPrinter* DrawDocShell::GetPrinter(BOOL bCreate) pSet->Put( aFlagItem ); mpPrinter = new SfxPrinter(pSet); - mbOwnPrinter = TRUE; + mbOwnPrinter = sal_True; // Ausgabequalitaet setzen - UINT16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality(); + sal_uInt16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality(); - ULONG nMode = DRAWMODE_DEFAULT; + sal_uLong nMode = DRAWMODE_DEFAULT; if( nQuality == 1 ) nMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT; @@ -166,7 +166,7 @@ void DrawDocShell::SetPrinter(SfxPrinter *pNewPrinter) } mpPrinter = pNewPrinter; - mbOwnPrinter = TRUE; + mbOwnPrinter = sal_True; if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED ) UpdateFontList(); UpdateRefDevice(); @@ -177,17 +177,17 @@ void DrawDocShell::UpdateFontList() delete mpFontList; OutputDevice* pRefDevice = NULL; if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED ) - pRefDevice = GetPrinter(TRUE); + pRefDevice = GetPrinter(sal_True); else pRefDevice = SD_MOD()->GetVirtualRefDevice(); - mpFontList = new FontList( pRefDevice, NULL, FALSE ); + mpFontList = new FontList( pRefDevice, NULL, sal_False ); SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST ); PutItem( aFontListItem ); } Printer* DrawDocShell::GetDocumentPrinter() { - return GetPrinter(FALSE); + return GetPrinter(sal_False); } void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter) @@ -211,7 +211,7 @@ void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter) SetPrinter((SfxPrinter*) pNewPrinter); // Printer gehoert dem Container - mbOwnPrinter = FALSE; + mbOwnPrinter = sal_False; } } @@ -242,12 +242,12 @@ void DrawDocShell::UpdateRefDevice() } mpDoc->SetRefDevice( pRefDevice ); - ::sd::Outliner* pOutl = mpDoc->GetOutliner( FALSE ); + ::sd::Outliner* pOutl = mpDoc->GetOutliner( sal_False ); if( pOutl ) pOutl->SetRefDevice( pRefDevice ); - ::sd::Outliner* pInternalOutl = mpDoc->GetInternalOutliner( FALSE ); + ::sd::Outliner* pInternalOutl = mpDoc->GetInternalOutliner( sal_False ); if( pInternalOutl ) pInternalOutl->SetRefDevice( pRefDevice ); @@ -260,9 +260,9 @@ void DrawDocShell::UpdateRefDevice() |* \************************************************************************/ -BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) +sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; bRet = SfxObjectShell::InitNew( xStorage ); @@ -285,11 +285,11 @@ BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun:: |* \************************************************************************/ -BOOL DrawDocShell::Load( SfxMedium& rMedium ) +sal_Bool DrawDocShell::Load( SfxMedium& rMedium ) { mbNewDocument = sal_False; - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; bool bStartPresentation = false; ErrCode nError = ERRCODE_NONE; @@ -300,7 +300,7 @@ BOOL DrawDocShell::Load( SfxMedium& rMedium ) { if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) { - mpDoc->SetStarDrawPreviewMode( TRUE ); + mpDoc->SetStarDrawPreviewMode( sal_True ); } if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& @@ -367,7 +367,7 @@ BOOL DrawDocShell::Load( SfxMedium& rMedium ) |* \************************************************************************/ -BOOL DrawDocShell::LoadFrom( SfxMedium& rMedium ) +sal_Bool DrawDocShell::LoadFrom( SfxMedium& rMedium ) { mbNewDocument = sal_False; @@ -375,7 +375,7 @@ BOOL DrawDocShell::LoadFrom( SfxMedium& rMedium ) if( mpViewShell ) pWait = new WaitObject( (Window*) mpViewShell->GetActiveWindow() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; mpDoc->NewOrLoadCompleted( NEW_DOC ); mpDoc->CreateFirstPages(); @@ -437,22 +437,22 @@ sal_Bool DrawDocShell::ImportFrom( SfxMedium &rMedium ) |* \************************************************************************/ -BOOL DrawDocShell::ConvertFrom( SfxMedium& rMedium ) +sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) { mbNewDocument = sal_False; const String aFilterName( rMedium.GetFilter()->GetFilterName() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; bool bStartPresentation = false; - SetWaitCursor( TRUE ); + SetWaitCursor( sal_True ); SfxItemSet* pSet = rMedium.GetItemSet(); if( pSet ) { if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() ) { - mpDoc->SetStarDrawPreviewMode( TRUE ); + mpDoc->SetStarDrawPreviewMode( sal_True ); } if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&& @@ -511,7 +511,7 @@ BOOL DrawDocShell::ConvertFrom( SfxMedium& rMedium ) if( pMediumSet ) pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) ); } - SetWaitCursor( FALSE ); + SetWaitCursor( sal_False ); // tell SFX to change viewshell when in preview mode if( IsPreview() || bStartPresentation ) @@ -530,7 +530,7 @@ BOOL DrawDocShell::ConvertFrom( SfxMedium& rMedium ) |* \************************************************************************/ -BOOL DrawDocShell::Save() +sal_Bool DrawDocShell::Save() { mpDoc->StopWorkStartupDelay(); @@ -538,7 +538,7 @@ BOOL DrawDocShell::Save() if( GetCreateMode() == SFX_CREATE_MODE_STANDARD ) SfxObjectShell::SetVisArea( Rectangle() ); - BOOL bRet = SfxObjectShell::Save(); + sal_Bool bRet = SfxObjectShell::Save(); if( bRet ) { @@ -557,7 +557,7 @@ BOOL DrawDocShell::Save() |* \************************************************************************/ -BOOL DrawDocShell::SaveAs( SfxMedium& rMedium ) +sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium ) { mpDoc->StopWorkStartupDelay(); @@ -565,8 +565,8 @@ BOOL DrawDocShell::SaveAs( SfxMedium& rMedium ) if( GetCreateMode() == SFX_CREATE_MODE_STANDARD ) SfxObjectShell::SetVisArea( Rectangle() ); - UINT32 nVBWarning = ERRCODE_NONE; - BOOL bRet = SfxObjectShell::SaveAs( rMedium ); + sal_uInt32 nVBWarning = ERRCODE_NONE; + sal_Bool bRet = SfxObjectShell::SaveAs( rMedium ); if( bRet ) { @@ -587,9 +587,9 @@ BOOL DrawDocShell::SaveAs( SfxMedium& rMedium ) |* \************************************************************************/ -BOOL DrawDocShell::ConvertTo( SfxMedium& rMedium ) +sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( mpDoc->GetPageCount() ) { @@ -629,7 +629,7 @@ BOOL DrawDocShell::ConvertTo( SfxMedium& rMedium ) if( pFilter ) { - const ULONG nOldSwapMode = mpDoc->GetSwapGraphicsMode(); + const sal_uLong nOldSwapMode = mpDoc->GetSwapGraphicsMode(); mpDoc->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_TEMP ); @@ -651,13 +651,13 @@ BOOL DrawDocShell::ConvertTo( SfxMedium& rMedium ) |* \************************************************************************/ -BOOL DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) +sal_Bool DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( SfxObjectShell::SaveCompleted(xStorage) ) { - mpDoc->NbcSetChanged( FALSE ); + mpDoc->NbcSetChanged( sal_False ); if( mpViewShell ) { @@ -676,14 +676,14 @@ BOOL DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com: } } - bRet = TRUE; + bRet = sal_True; SfxViewFrame* pFrame = ( mpViewShell && mpViewShell->GetViewFrame() ) ? mpViewShell->GetViewFrame() : SfxViewFrame::Current(); if( pFrame ) - pFrame->GetBindings().Invalidate( SID_NAVIGATOR_STATE, TRUE, FALSE ); + pFrame->GetBindings().Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False ); } return bRet; } @@ -716,17 +716,17 @@ SfxStyleSheetBasePool* DrawDocShell::GetStyleSheetPool() |* \************************************************************************/ -BOOL DrawDocShell::GotoBookmark(const String& rBookmark) +sal_Bool DrawDocShell::GotoBookmark(const String& rBookmark) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if (mpViewShell && mpViewShell->ISA(DrawViewShell)) { DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(mpViewShell); ViewShellBase& rBase (mpViewShell->GetViewShellBase()); - BOOL bIsMasterPage = sal_False; - USHORT nPageNumber = SDRPAGE_NOTFOUND; + sal_Bool bIsMasterPage = sal_False; + sal_uInt16 nPageNumber = SDRPAGE_NOTFOUND; SdrObject* pObj = NULL; rtl::OUString sBookmark( rBookmark ); @@ -782,7 +782,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark) { // Jump to the bookmarked page. This is done in three steps. - bFound = TRUE; + bFound = sal_True; SdPage* pPage; if (bIsMasterPage) pPage = (SdPage*) mpDoc->GetMasterPage(nPageNumber); @@ -794,7 +794,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark) PageKind eNewPageKind = pPage->GetPageKind(); if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) ) - return FALSE; + return sal_False; if (eNewPageKind != pDrawViewShell->GetPageKind()) { @@ -847,14 +847,14 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark) if (eNewEditMode != pDrawViewShell->GetEditMode()) { // EditMode setzen - pDrawViewShell->ChangeEditMode(eNewEditMode, FALSE); + pDrawViewShell->ChangeEditMode(eNewEditMode, sal_False); } // Make the bookmarked page the current page. This is done // by using the API because this takes care of all the // little things to be done. Especially writing the view // data to the frame view. - USHORT nSdPgNum = (nPageNumber - 1) / 2; + sal_uInt16 nSdPgNum = (nPageNumber - 1) / 2; Reference<drawing::XDrawView> xController (rBase.GetController(), UNO_QUERY); if (xController.is()) { @@ -877,7 +877,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark) pDrawViewShell->GetView()->UnmarkAll(); pDrawViewShell->GetView()->MarkObj( pObj, - pDrawViewShell->GetView()->GetSdrPageView(), FALSE); + pDrawViewShell->GetView()->GetSdrPageView(), sal_False); } } } @@ -886,7 +886,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark) ? pDrawViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings(); - rBindings.Invalidate(SID_NAVIGATOR_STATE, TRUE, FALSE); + rBindings.Invalidate(SID_NAVIGATOR_STATE, sal_True, sal_False); rBindings.Invalidate(SID_NAVIGATOR_PAGENAME); } @@ -900,7 +900,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark) \************************************************************************/ #include <tools/urlobj.hxx> -BOOL DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) +sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) { const SfxFilter* pFilter = rMedium.GetFilter(); @@ -917,7 +917,7 @@ BOOL DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) String aLayoutName; SfxStringItem* pLayoutItem; - if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, FALSE, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET ) + if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, sal_False, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET ) { aLayoutName = pLayoutItem->GetValue(); } diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index feabb89f8f13..754122112f2c 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -96,9 +96,9 @@ SFX_IMPL_INTERFACE(DrawDocShell, SfxObjectShell, SdResId(0)) namespace sd { -#define POOL_BUFFER_SIZE (USHORT)32768 -#define BASIC_BUFFER_SIZE (USHORT)8192 -#define DOCUMENT_BUFFER_SIZE (USHORT)32768 +#define POOL_BUFFER_SIZE (sal_uInt16)32768 +#define BASIC_BUFFER_SIZE (sal_uInt16)8192 +#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768 GraphicFilter* GetGrfFilter(); @@ -124,7 +124,7 @@ SFX_IMPL_OBJECTFACTORY( void DrawDocShell::Construct( bool bClipboard ) { - mbInDestruction = FALSE; + mbInDestruction = sal_False; SetSlotFilter(); // setzt Filter zurueck mbOwnDocument = mpDoc == 0; @@ -151,7 +151,7 @@ void DrawDocShell::Construct( bool bClipboard ) \************************************************************************/ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, - BOOL bDataObject, + sal_Bool bDataObject, DocumentType eDocumentType) : SfxObjectShell( eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), mpDoc(NULL), @@ -162,7 +162,7 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, meDocType(eDocumentType), mpFilterSIDs(0), mbSdDataObj(bDataObject), - mbOwnPrinter(FALSE), + mbOwnPrinter(sal_False), mbNewDocument( sal_True ) { Construct( eMode == SFX_CREATE_MODE_INTERNAL ); @@ -174,7 +174,7 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, |* \************************************************************************/ -DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObject, DocumentType eDocumentType ) : +DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, sal_Bool bDataObject, DocumentType eDocumentType ) : SfxObjectShell( nModelCreationFlags ), mpDoc(NULL), mpUndoManager(NULL), @@ -184,10 +184,10 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObje meDocType(eDocumentType), mpFilterSIDs(0), mbSdDataObj(bDataObject), - mbOwnPrinter(FALSE), + mbOwnPrinter(sal_False), mbNewDocument( sal_True ) { - Construct( FALSE ); + Construct( sal_False ); } /************************************************************************* @@ -197,7 +197,7 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObje \************************************************************************/ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, - BOOL bDataObject, + sal_Bool bDataObject, DocumentType eDocumentType) : SfxObjectShell(eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), mpDoc(pDoc), @@ -208,7 +208,7 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, meDocType(eDocumentType), mpFilterSIDs(0), mbSdDataObj(bDataObject), - mbOwnPrinter(FALSE), + mbOwnPrinter(sal_False), mbNewDocument( sal_True ) { Construct( eMode == SFX_CREATE_MODE_INTERNAL ); @@ -228,7 +228,7 @@ DrawDocShell::~DrawDocShell() // may be usefull in other places as well. Broadcast(SfxSimpleHint(SFX_HINT_DYING)); - mbInDestruction = TRUE; + mbInDestruction = sal_True; SetDocShellFunction(0); @@ -245,7 +245,7 @@ DrawDocShell::~DrawDocShell() delete mpDoc; // damit der Navigator das Verschwinden des Dokuments mitbekommt - SfxBoolItem aItem(SID_NAVIGATOR_INIT, TRUE); + SfxBoolItem aItem(SID_NAVIGATOR_INIT, sal_True); SfxViewFrame* pFrame = mpViewShell ? mpViewShell->GetFrame() : GetFrame(); if( !pFrame ) @@ -266,11 +266,11 @@ void DrawDocShell::GetState(SfxItemSet &rSet) { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - USHORT nSlotId = SfxItemPool::IsWhich(nWhich) + sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich) ? GetPool().GetSlotId(nWhich) : nWhich; @@ -284,7 +284,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) case SID_CLOSEDOC: { - BOOL bDisabled = FALSE; + sal_Bool bDisabled = sal_False; if (bDisabled) { rSet.DisableItem(SID_CLOSEDOC); @@ -298,7 +298,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) case SID_SEARCH_OPTIONS: { - UINT16 nOpt = SEARCH_OPTIONS_SEARCH | + sal_uInt16 nOpt = SEARCH_OPTIONS_SEARCH | SEARCH_OPTIONS_WHOLE_WORDS | SEARCH_OPTIONS_BACKWARDS | SEARCH_OPTIONS_REG_EXP | @@ -347,7 +347,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) } } -void DrawDocShell::InPlaceActivate( BOOL bActive ) +void DrawDocShell::InPlaceActivate( sal_Bool bActive ) { if( !bActive ) { @@ -427,7 +427,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) |* \************************************************************************/ -void DrawDocShell::Activate( BOOL bMDI) +void DrawDocShell::Activate( sal_Bool bMDI) { if (bMDI) { @@ -442,7 +442,7 @@ void DrawDocShell::Activate( BOOL bMDI) |* \************************************************************************/ -void DrawDocShell::Deactivate( BOOL ) +void DrawDocShell::Deactivate( sal_Bool ) { } @@ -452,7 +452,7 @@ void DrawDocShell::Deactivate( BOOL ) |* \************************************************************************/ -SfxUndoManager* DrawDocShell::GetUndoManager() +::svl::IUndoManager* DrawDocShell::GetUndoManager() { return mpUndoManager; } @@ -510,14 +510,14 @@ void DrawDocShell::ApplySlotFilter() const pDispatcher->SetSlotFilter(); if( pDispatcher->GetBindings() ) - pDispatcher->GetBindings()->InvalidateAll( TRUE ); + pDispatcher->GetBindings()->InvalidateAll( sal_True ); } pTestViewShell = SfxViewShell::GetNext( *pTestViewShell ); } } -void DrawDocShell::SetModified( BOOL bSet /* = TRUE */ ) +void DrawDocShell::SetModified( sal_Bool bSet /* = sal_True */ ) { SfxObjectShell::SetModified( bSet ); @@ -584,7 +584,7 @@ void DrawDocShell::ClearUndoBuffer() pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false); } - SfxUndoManager* pUndoManager = GetUndoManager(); + ::svl::IUndoManager* pUndoManager = GetUndoManager(); if(pUndoManager && pUndoManager->GetUndoActionCount()) pUndoManager->Clear(); } diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx index f03570c3ed7d..fceb4b27500d 100644..100755 --- a/sd/source/ui/docshell/grdocsh.cxx +++ b/sd/source/ui/docshell/grdocsh.cxx @@ -63,7 +63,7 @@ SFX_IMPL_INTERFACE(GraphicDocShell, SfxObjectShell, SdResId(0)) SFX_IMPL_OBJECTFACTORY( GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), SFXOBJECTSHELL_STD_NORMAL, "sdraw" ) GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode, - BOOL bDataObject, + sal_Bool bDataObject, DocumentType eDocType) : DrawDocShell(eMode, bDataObject, eDocType) { @@ -71,7 +71,7 @@ GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode, } GraphicDocShell::GraphicDocShell(const sal_uInt64 nModelCreationFlags, - BOOL bDataObject, + sal_Bool bDataObject, DocumentType eDocType) : DrawDocShell(nModelCreationFlags, bDataObject, eDocType) { |