diff options
Diffstat (limited to 'sd')
43 files changed, 85 insertions, 85 deletions
diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx index 190967268035..9a5edf2fe692 100644 --- a/sd/inc/pres.hxx +++ b/sd/inc/pres.hxx @@ -114,10 +114,10 @@ enum EditMode EM_MASTERPAGE }; -enum DocumentType +enum class DocumentType { - DOCUMENT_TYPE_IMPRESS, - DOCUMENT_TYPE_DRAW + Impress, + Draw }; enum NavigatorDragType diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 92e3da5e9b2d..9c6789ada794 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -272,7 +272,7 @@ VclAbstractDialog* SdDialogsTest::createDialogByID(sal_uInt32 nID) // supports the 'Screenshot interface' pRetval = getSdAbstractDialogFactory()->CreateSdPublishingDlg( Application::GetDefDialogParent(), - DOCUMENT_TYPE_IMPRESS); + DocumentType::Impress); break; } case 1: @@ -450,7 +450,7 @@ VclAbstractDialog* SdDialogsTest::createDialogByID(sal_uInt32 nID) aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_FULLSCREEN, rPresentationSettings.mbFullScreen)); aDlgSet.Put(SfxUInt32Item(ATTR_PRESENT_PAUSE_TIMEOUT, rPresentationSettings.mnPauseTimeout)); aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_SHOW_PAUSELOGO, rPresentationSettings.mbShowPauseLogo)); - //SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + //SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); aDlgSet.Put(SfxInt32Item(ATTR_PRESENT_DISPLAY, 0 /*pOptions->GetDisplay()*/)); pRetval = getSdAbstractDialogFactory()->CreateSdStartPresentationDlg( Application::GetDefDialogParent(), diff --git a/sd/qa/unit/uimpress.cxx b/sd/qa/unit/uimpress.cxx index 2ad4f2f35fa1..e0f40ad44a9d 100644 --- a/sd/qa/unit/uimpress.cxx +++ b/sd/qa/unit/uimpress.cxx @@ -68,7 +68,7 @@ Test::Test() void Test::setUp() { - m_pDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, nullptr); + m_pDoc = new SdDrawDocument(DocumentType::Impress, nullptr); } void Test::tearDown() diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index cac25968e4b0..febad3709aee 100644 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -1429,7 +1429,7 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage) void EffectMigration::DocumentLoaded(SdDrawDocument & rDoc) { - if (DOCUMENT_TYPE_DRAW == rDoc.GetDocumentType()) + if (DocumentType::Draw == rDoc.GetDocumentType()) return; // no animations in Draw for (sal_uInt16 n = 0; n < rDoc.GetSdPageCount(PK_STANDARD); ++n) { diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 4a061d0b133b..7011846c1ee6 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -195,7 +195,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) pOptions->GetScale( nX, nY ); // Allow UI scale only for draw documents. - if( eType == DOCUMENT_TYPE_DRAW ) + if( eType == DocumentType::Draw ) SetUIUnit( (FieldUnit)pOptions->GetMetric(), Fraction( nX, nY ) ); // user-defined else SetUIUnit( (FieldUnit)pOptions->GetMetric(), Fraction( 1, 1 ) ); // default @@ -287,7 +287,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) nCntrl &= ~EEControlBits::ONLINESPELLING; nCntrl &= ~ EEControlBits::ULSPACESUMMATION; - if ( meDocType != DOCUMENT_TYPE_IMPRESS ) + if ( meDocType != DocumentType::Impress ) SetSummationOfParagraphs( false ); else { @@ -476,7 +476,7 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const SfxObjectShell* pObj = nullptr; ::sd::DrawDocShell* pNewDocSh = nullptr; - if( meDocType == DOCUMENT_TYPE_IMPRESS ) + if( meDocType == DocumentType::Impress ) mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell( SfxObjectCreateMode::EMBEDDED, true, meDocType ) ); else diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 6171e19de48d..112a9e83ad08 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -546,7 +546,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) pPage->SetSize( pRefPage->GetSize() ); pPage->SetBorder( pRefPage->GetLftBorder(), pRefPage->GetUppBorder(), pRefPage->GetRgtBorder(), pRefPage->GetLwrBorder() ); } - else if (meDocType == DOCUMENT_TYPE_DRAW) + else if (meDocType == DocumentType::Draw) { // Draw: always use default size with margins pPage->SetSize(aDefSize); @@ -647,7 +647,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) if( bClipboard ) pNotesMPage->SetLayoutName( pPage->GetLayoutName() ); - if( !pRefPage && (meDocType != DOCUMENT_TYPE_DRAW) ) + if( !pRefPage && (meDocType != DocumentType::Draw) ) pPage->SetAutoLayout( AUTOLAYOUT_TITLE, true, true ); mpWorkStartupTimer = new Timer("DrawWorkStartupTimer"); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 4d1d1b3173bc..c70a4cf05813 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -816,8 +816,8 @@ bool SdDrawDocument::InsertBookmarkAsPage( sal_uInt16 nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount + nSdPageStart - 1; const bool bRemoveEmptyPresObj = - (pBookmarkDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) && - (GetDocumentType() == DOCUMENT_TYPE_DRAW); + (pBookmarkDoc->GetDocumentType() == DocumentType::Impress) && + (GetDocumentType() == DocumentType::Draw); if( bReplace ) { @@ -1789,8 +1789,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, pNotesMaster->SetOrientation( rOldNotesMaster.GetOrientation() ); pNotesMaster->SetAutoLayout(pNotesMaster->GetAutoLayout()); - if( (pSourceDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) && - (GetDocumentType() == DOCUMENT_TYPE_DRAW) ) + if( (pSourceDoc->GetDocumentType() == DocumentType::Impress) && + (GetDocumentType() == DocumentType::Draw) ) { pMaster->RemoveEmptyPresentationObjects(); pNotesMaster->RemoveEmptyPresentationObjects(); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 801016472376..fa77599320b5 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -777,7 +777,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate ) pMasterPage->EnsureMasterPageDefaultBackground(); } - if (GetModel() && static_cast<SdDrawDocument*>(GetModel())->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) + if (GetModel() && static_cast<SdDrawDocument*>(GetModel())->GetDocumentType() == DocumentType::Impress) { if( mePageKind == PK_HANDOUT && bInit ) { diff --git a/sd/source/filter/html/HtmlOptionsDialog.cxx b/sd/source/filter/html/HtmlOptionsDialog.cxx index 6e01b9c37c68..a8a67be5a98f 100644 --- a/sd/source/filter/html/HtmlOptionsDialog.cxx +++ b/sd/source/filter/html/HtmlOptionsDialog.cxx @@ -100,7 +100,7 @@ public: }; SdHtmlOptionsDialog::SdHtmlOptionsDialog() : - meDocType ( DOCUMENT_TYPE_DRAW ) + meDocType ( DocumentType::Draw ) { } @@ -223,12 +223,12 @@ void SdHtmlOptionsDialog::setSourceDocument( const Reference< XComponent >& xDoc { if ( xServiceInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) ) { - meDocType = DOCUMENT_TYPE_IMPRESS; + meDocType = DocumentType::Impress; return; } else if ( xServiceInfo->supportsService( "com.sun.star.drawing.DrawingDocument" ) ) { - meDocType = DOCUMENT_TYPE_DRAW; + meDocType = DocumentType::Draw; return; } } diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 5596fdd4853b..7e215af14021 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -405,7 +405,7 @@ HtmlExport::~HtmlExport() // get common export parameters from item set void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams ) { - mbImpress = mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS; + mbImpress = mpDoc->GetDocumentType() == DocumentType::Impress; sal_Int32 nArgs = rParams.getLength(); const PropertyValue* pParams = rParams.getConstArray(); @@ -813,7 +813,7 @@ void HtmlExport::SetDocColors( SdPage* pPage ) SfxStyleSheet* pSheet = nullptr; - if( mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ) + if( mpDoc->GetDocumentType() == DocumentType::Impress ) { // default text color from the outline template of the first page pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_OUTLINE); diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 74d691031dba..c279412baf79 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -364,7 +364,7 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType) get(pNextPageButton, "nextPageButton"); get(pFinishButton, "finishButton"); - m_bImpress = eDocType == DOCUMENT_TYPE_IMPRESS; + m_bImpress = eDocType == DocumentType::Impress; Size aSize(LogicToPixel(Size(60, 50), MapUnit::MapAppFont)); get(pPage2_Standard_FB, "standardFBImage"); diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index 558d443a2055..bb5dca960d7f 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -46,7 +46,7 @@ SdFilter::SdFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell ) , mrMedium( rMedium ) , mrDocShell( rDocShell ) , mrDocument( *rDocShell.GetDoc() ) -, mbIsDraw( rDocShell.GetDocumentType() == DOCUMENT_TYPE_DRAW ) +, mbIsDraw( rDocShell.GetDocumentType() == DocumentType::Draw ) { } diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index bff0e125a8e4..716dd5f70421 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -63,7 +63,7 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase ( const uno::Reference<frame::XController>& rxController, const uno::Reference<XAccessible>& rxParent) : AccessibleContextBase (rxParent, - pViewShell->GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ? + pViewShell->GetDoc()->GetDocumentType() == DocumentType::Impress ? AccessibleRole::DOCUMENT_PRESENTATION : AccessibleRole::DOCUMENT), mpWindow (pSdWindow), diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 2f4cab1b2648..b5dbe2d2bb0f 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -745,7 +745,7 @@ void CustomAnimationPane::updateControls() mpPBMoveUp->Enable(mxView.is() && bEnableUp); mpPBMoveDown->Enable(mxView.is() && bEnableDown); - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); mpCBAutoPreview->Check( pOptions->IsPreviewChangedEffects() ); updateMotionPathTags(); @@ -2165,7 +2165,7 @@ void CustomAnimationPane::implControlHdl(Control* pControl ) onPreview( true ); else if( pControl == mpCBAutoPreview ) { - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); pOptions->SetPreviewChangedEffects( mpCBAutoPreview->IsChecked() ); } } diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 9689c54b1834..8ee6ae07d63a 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -688,7 +688,7 @@ void SlideTransitionPane::updateControls() mpMF_ADVANCE_AUTO_AFTER->SetValue( aEffect.mfTime * 100.0); } - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); mpCB_AUTO_PREVIEW->Check( pOptions->IsPreviewTransitions() ); mbUpdatingControls = false; @@ -1154,7 +1154,7 @@ IMPL_LINK_NOARG(SlideTransitionPane, LoopSoundBoxChecked, Button*, void) IMPL_LINK_NOARG(SlideTransitionPane, AutoPreviewClicked, Button*, void) { - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); pOptions->SetPreviewTransitions( mpCB_AUTO_PREVIEW->IsChecked() ); } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index b76825ad78dc..fa323202b056 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -688,7 +688,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) while( pPage ); // The question text depends on the search direction. - bool bImpress = mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS; + bool bImpress = mpDoc->GetDocumentType() == DocumentType::Impress; sal_uInt16 nStringId; if(bForeward) nStringId = bImpress ? STR_ANNOTATION_WRAP_FORWARD : STR_ANNOTATION_WRAP_FORWARD_DRAW; @@ -1105,7 +1105,7 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward ) if( nPageNum >= mpDoc->GetSdPageCount(PK_STANDARD)-1 ) { // we reached end of draw pages, start with master pages (skip handout master for draw) - return mpDoc->GetMasterSdPage( (mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) ? 0 : 1, PK_STANDARD ); + return mpDoc->GetMasterSdPage( (mpDoc->GetDocumentType() == DocumentType::Impress) ? 0 : 1, PK_STANDARD ); } nPageNum++; } @@ -1130,7 +1130,7 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward ) } else { - if( nPageNum == (mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ? 0 : 1) ) + if( nPageNum == (mpDoc->GetDocumentType() == DocumentType::Impress ? 0 : 1) ) { // we reached beginning of master pages, start with end if pages return mpDoc->GetSdPage( mpDoc->GetSdPageCount(PK_STANDARD)-1, PK_STANDARD ); diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 2d6b184b7a64..f38a67ee5406 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -131,14 +131,14 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType) { SdOptions* pOptions = nullptr; - if (eDocType == DOCUMENT_TYPE_DRAW) + if (eDocType == DocumentType::Draw) { if (!pDrawOptions) pDrawOptions = new SdOptions( SDCFG_DRAW ); pOptions = pDrawOptions; } - else if (eDocType == DOCUMENT_TYPE_IMPRESS) + else if (eDocType == DocumentType::Impress) { if (!pImpressOptions) pImpressOptions = new SdOptions( SDCFG_IMPRESS ); @@ -190,7 +190,7 @@ tools::SvRef<SotStorageStream> SdModule::GetOptionStream( const OUString& rOptio OUString aStmName; - if( DOCUMENT_TYPE_DRAW == eType ) + if( DocumentType::Draw == eType ) aStmName = "Draw_"; else aStmName = "Impress_"; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index a838c8bbf785..3d0dbb846061 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -406,7 +406,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) { ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); - if( pViewShell && (pDocShell->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) ) + if( pViewShell && (pDocShell->GetDocumentType() == DocumentType::Impress) ) { // add our event listener as soon as possible Application::AddEventListener( LINK( this, SdModule, EventListenerHdl ) ); @@ -436,7 +436,7 @@ IMPL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent&, rSimpleEvent, voi ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); // #i97925# start the presentation if and only if an Impress document is focused - if( pViewShell && (pDocShell->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) ) + if( pViewShell && (pDocShell->GetDocumentType() == DocumentType::Impress) ) pViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION ); } break; @@ -488,7 +488,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) if ( pFrmItem ) xTargetFrame = pFrmItem->GetFrame(); - SdOptions* pOpt = GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOpt = GetSdOptions(DocumentType::Impress); bool bStartWithTemplate = pOpt->IsStartWithTemplate(); bool bNewDocDirect = rReq.GetSlot() == SID_NEWSD; @@ -537,7 +537,7 @@ SfxFrame* SdModule::CreateEmptyDocument( const Reference< XFrame >& i_rFrame ) SfxObjectShellLock xDocShell; ::sd::DrawDocShell* pNewDocSh; - xDocShell = pNewDocSh = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD,false,DOCUMENT_TYPE_IMPRESS); + xDocShell = pNewDocSh = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD,false,DocumentType::Impress); pNewDocSh->DoInitNew(); SdDrawDocument* pDoc = pNewDocSh->GetDoc(); if (pDoc) diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index fc4f5e76eb21..ff7a727b5994 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -271,8 +271,8 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void) } else { - DocumentType eDocType = pDoc ? pDoc->GetDocumentType() : DOCUMENT_TYPE_IMPRESS; - aRepresentation = ( ( eDocType == DOCUMENT_TYPE_IMPRESS ) + DocumentType eDocType = pDoc ? pDoc->GetDocumentType() : DocumentType::Impress; + aRepresentation = ( ( eDocType == DocumentType::Impress ) ? SdResId(STR_FIELD_PLACEHOLDER_SLIDENAME).toString() : SdResId(STR_FIELD_PLACEHOLDER_PAGENAME).toString() ); } @@ -414,9 +414,9 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot ) SdDrawDocument* pDoc = nullptr; // Here we set the DocType of the option dialog (not document!) - DocumentType eDocType = DOCUMENT_TYPE_IMPRESS; + DocumentType eDocType = DocumentType::Impress; if( nSlot == SID_SD_GRAPHIC_OPTIONS ) - eDocType = DOCUMENT_TYPE_DRAW; + eDocType = DocumentType::Draw; if (pDocSh) { @@ -540,9 +540,9 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet ) ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); SdDrawDocument* pDoc = nullptr; // Here we set the DocType of the option dialog (not document!) - DocumentType eDocType = DOCUMENT_TYPE_IMPRESS; + DocumentType eDocType = DocumentType::Impress; if( nSlot == SID_SD_GRAPHIC_OPTIONS ) - eDocType = DOCUMENT_TYPE_DRAW; + eDocType = DocumentType::Draw; ::sd::ViewShell* pViewShell = nullptr; diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index a92573d7739b..f84bf489ccc4 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -610,7 +610,7 @@ bool SdTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* { css::uno::Reference<css::io::XOutputStream> xDocOut( new utl::OOutputStreamWrapper( *rxOStm ) ); - if( SvxDrawingLayerExport( pDoc, xDocOut, xComponent, (pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) ? "com.sun.star.comp.Impress.XMLClipboardExporter" : "com.sun.star.comp.DrawingLayer.XMLExporter" ) ) + if( SvxDrawingLayerExport( pDoc, xDocOut, xComponent, (pDoc->GetDocumentType() == DocumentType::Impress) ? "com.sun.star.comp.Impress.XMLClipboardExporter" : "com.sun.star.comp.DrawingLayer.XMLExporter" ) ) rxOStm->Commit(); } diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 84ad06b0d307..57e34169b980 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -164,7 +164,7 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW, m_pCtlDisplay->Show(); // create new document with page - pMyDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, nullptr); + pMyDoc = new SdDrawDocument(DocumentType::Impress, nullptr); SdPage* pPage = pMyDoc->AllocSdPage(false); pMyDoc->InsertPage(pPage); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index b6467f2dcd7e..be2b4f56b9de 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -768,7 +768,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark) // or the handout view. PageKind eNewPageKind = pPage->GetPageKind(); - if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) ) + if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DocumentType::Draw) ) return false; if (eNewPageKind != pDrawViewShell->GetPageKind()) @@ -1023,7 +1023,7 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName, { if (nFileFormat == SOFFICE_FILEFORMAT_60) { - if ( meDocType == DOCUMENT_TYPE_DRAW ) + if ( meDocType == DocumentType::Draw ) { *pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60); *pFormat = SotClipboardFormatId::STARDRAW_60; @@ -1038,7 +1038,7 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName, } else if (nFileFormat == SOFFICE_FILEFORMAT_8) { - if ( meDocType == DOCUMENT_TYPE_DRAW ) + if ( meDocType == DocumentType::Draw ) { *pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60); *pFormat = bTemplate ? SotClipboardFormatId::STARDRAW_8_TEMPLATE : SotClipboardFormatId::STARDRAW_8; @@ -1052,7 +1052,7 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName, } } - *pShortTypeName = OUString(SdResId( (meDocType == DOCUMENT_TYPE_DRAW) ? + *pShortTypeName = OUString(SdResId( (meDocType == DocumentType::Draw) ? STR_GRAPHIC_DOCUMENT : STR_IMPRESS_DOCUMENT )); } diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index 770355a79f9b..c6d40c0ca0b4 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -318,7 +318,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj, { SdPage* pPage = static_cast<SdPage*>(mpView->GetSdrPageView()->GetPage()); if ( pPage->IsMasterPage() && pPage->GetPageKind() == PK_STANDARD && - mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ) + mpDoc->GetDocumentType() == DocumentType::Impress ) { /********************************************** * Objects was created on the slide master page diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 68a6f320218c..f605a5bfa25f 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -482,7 +482,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) case SID_INSERT_OBJECT : { aServerLst.FillInsertObjects(); - if (mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) + if (mpDoc->GetDocumentType() == DocumentType::Draw) { aServerLst.Remove( GraphicDocShell::Factory().GetClassId() ); } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 4deb00e9ac14..23cca70afc76 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -147,7 +147,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) aFileDialog.SetTitle( SD_RESSTR(STR_DLG_INSERT_PAGES_FROM_FILE) ); - if( mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ) + if( mpDoc->GetDocumentType() == DocumentType::Impress ) { aOwnCont = "simpress"; aOtherCont = "sdraw"; @@ -170,7 +170,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) lcl_AddFilter( aFilterVector, pFilter ); // get template filter - if( mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ) + if( mpDoc->GetDocumentType() == DocumentType::Impress ) pFilter = DrawDocShell::Factory().GetTemplateFilter(); else pFilter = GraphicDocShell::Factory().GetTemplateFilter(); diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 5b669d32646c..fd80f93c3b9e 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -263,7 +263,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) aNewAttr.Put( aULSpaceItem ); // Applikation - bool bScale = mpDoc->GetDocumentType() != DOCUMENT_TYPE_DRAW; + bool bScale = mpDoc->GetDocumentType() != DocumentType::Draw; aNewAttr.Put( SfxBoolItem( SID_ATTR_PAGE_EXT1, bScale ) ); bool bFullSize = mpPage->IsMasterPage() ? diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index 8cf501bcb826..cc4a6a347dee 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -104,7 +104,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) aDlgSet.Put( SfxUInt32Item( ATTR_PRESENT_PAUSE_TIMEOUT, rPresentationSettings.mnPauseTimeout ) ); aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_SHOW_PAUSELOGO, rPresentationSettings.mbShowPauseLogo ) ); - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); aDlgSet.Put( SfxInt32Item( ATTR_PRESENT_DISPLAY, pOptions->GetDisplay() ) ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index a7a657239064..95dbd29d475d 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -241,7 +241,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) (pStyleSheet->GetFamily() == SD_STYLE_FAMILY_GRAPHICS && pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS) || // allow if old was presentation and we are a drawing document - (pOldStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE && mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) ) + (pOldStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE && mpDoc->GetDocumentType() == DocumentType::Draw) ) { mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet)); mpDoc->SetChanged(); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 6ae69e7843b4..097f7727be4d 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -476,7 +476,7 @@ bool FuText::MouseMove(const MouseEvent& rMEvt) void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj) { - if(mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) + if(mpDoc->GetDocumentType() == DocumentType::Impress) { if( nSlotId == SID_ATTR_CHAR ) { @@ -556,7 +556,7 @@ void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj) void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj) { // Normal Textobject - if (mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) + if (mpDoc->GetDocumentType() == DocumentType::Impress) { if( nSlotId == SID_ATTR_CHAR ) { diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 64cf882c0fdd..89d9991d9227 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -60,18 +60,18 @@ public: DrawDocShell ( SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED, bool bSdDataObj=false, - DocumentType=DOCUMENT_TYPE_IMPRESS); + DocumentType=DocumentType::Impress); DrawDocShell ( SfxModelFlags nModelCreationFlags, bool bSdDataObj=false, - DocumentType=DOCUMENT_TYPE_IMPRESS); + DocumentType=DocumentType::Impress); DrawDocShell ( SdDrawDocument* pDoc, SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED, bool bSdDataObj=false, - DocumentType=DOCUMENT_TYPE_IMPRESS); + DocumentType=DocumentType::Impress); virtual ~DrawDocShell() override; void UpdateRefDevice(); diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx index 24080fb607e6..a131774cf652 100644 --- a/sd/source/ui/inc/GraphicDocShell.hxx +++ b/sd/source/ui/inc/GraphicDocShell.hxx @@ -48,12 +48,12 @@ public: GraphicDocShell ( SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED, bool bSdDataObj=false, - DocumentType=DOCUMENT_TYPE_DRAW); + DocumentType=DocumentType::Draw); GraphicDocShell ( SfxModelFlags nModelCreationFlags, bool bSdDataObj=false, - DocumentType=DOCUMENT_TYPE_DRAW); + DocumentType=DocumentType::Draw); virtual ~GraphicDocShell() override; }; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 700129f491a3..540902bdaa3b 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -491,7 +491,7 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const { bIllegalArgument = false; - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); pOptions->SetDisplay( nDisplay ); FullScreenWorkWindow *pWin = dynamic_cast<FullScreenWorkWindow *>(GetWorkWindow()); @@ -570,7 +570,7 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(U return Any( rPresSettings.mbShowPauseLogo ); case ATTR_PRESENT_DISPLAY: { - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); return Any(pOptions->GetDisplay()); } @@ -1152,7 +1152,7 @@ sal_Int32 SlideShow::GetDisplay() { sal_Int32 nDisplay = 0; - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); if( pOptions ) nDisplay = pOptions->GetDisplay(); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index ebcb61eee36e..8d1b4980db8f 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -530,7 +530,7 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation, mbUsePen = maPresSettings.mbMouseAsPen; - SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); + SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); if( pOptions ) { mnUserPaintColor = pOptions->GetPresentationPenColor(); @@ -543,7 +543,7 @@ SlideshowImpl::~SlideshowImpl() SdModule *pModule = SD_MOD(); //rhbz#806663 SlideshowImpl can outlive SdModule SdOptions* pOptions = pModule ? - pModule->GetSdOptions(DOCUMENT_TYPE_IMPRESS) : nullptr; + pModule->GetSdOptions(DocumentType::Impress) : nullptr; if( pOptions ) { pOptions->SetPresentationPenColor(mnUserPaintColor); diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 948cdd173f00..aa87c82a5090 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -227,7 +227,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) } case SID_TABLEDESIGN: { - if( GetDoc() && (GetDoc()->GetDocumentType() == DOCUMENT_TYPE_DRAW) ) + if( GetDoc() && (GetDoc()->GetDocumentType() == DocumentType::Draw) ) { // in draw open a modal dialog since we have no tool pane yet showTableDesignDialog( GetActiveWindow(), GetViewShellBase() ); diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 125684283896..e1a4b9fc18c6 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -784,7 +784,7 @@ throw (UnknownPropertyException, PropertyVetoException, { bOk = true; bChanged = true; - if ( pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ) + if ( pDoc->GetDocumentType() == DocumentType::Impress ) { EEControlBits nSum = bIsSummationOfParagraphs ? EEControlBits::ULSPACESUMMATION : EEControlBits::NONE; EEControlBits nCntrl; diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx index 87375a3f4683..02aa54000b95 100644 --- a/sd/source/ui/unoidl/unodoc.cxx +++ b/sd/source/ui/unoidl/unodoc.cxx @@ -56,7 +56,7 @@ uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( SfxObjectShell* pShell = new ::sd::GraphicDocShell( - _nCreationFlags, false, DOCUMENT_TYPE_DRAW ); + _nCreationFlags, false, DocumentType::Draw ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } @@ -85,7 +85,7 @@ uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance SfxObjectShell* pShell = new ::sd::DrawDocShell( - _nCreationFlags, false, DOCUMENT_TYPE_IMPRESS ); + _nCreationFlags, false, DocumentType::Impress ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index f4037ce1dbb1..601cec71bfec 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -211,7 +211,7 @@ SdXImpressDocument::SdXImpressDocument (::sd::DrawDocShell* pShell, bool bClipBo mpDocShell( pShell ), mpDoc( pShell ? pShell->GetDoc() : nullptr ), mbDisposed(false), - mbImpressDoc( pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ), + mbImpressDoc( pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocumentType() == DocumentType::Impress ), mbClipBoard( bClipBoard ), mpPropSet( ImplGetDrawModelPropertySet() ) { @@ -230,7 +230,7 @@ SdXImpressDocument::SdXImpressDocument( SdDrawDocument* pDoc, bool bClipBoard ) mpDocShell( nullptr ), mpDoc( pDoc ), mbDisposed(false), - mbImpressDoc( pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ), + mbImpressDoc( pDoc && pDoc->GetDocumentType() == DocumentType::Impress ), mbClipBoard( bClipBoard ), mpPropSet( ImplGetDrawModelPropertySet() ) { @@ -3297,7 +3297,7 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames() return aSeq; } - if( pDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW ) + if( pDoc->GetDocumentType() == DocumentType::Draw ) { const sal_uInt16 nMaxPages = pDoc->GetSdPageCount( PK_STANDARD ); const sal_uInt16 nMaxMasterPages = pDoc->GetMasterSdPageCount( PK_STANDARD ); @@ -3376,7 +3376,7 @@ SdPage* SdDocLinkTargets::FindPage( const OUString& rName ) const throw(std::exc sal_uInt16 nPage; SdPage* pPage; - const bool bDraw = pDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW; + const bool bDraw = pDoc->GetDocumentType() == DocumentType::Draw; // standard pages for( nPage = 0; nPage < nMaxPages; nPage++ ) diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 359906e911f3..ffe12df25b60 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -165,7 +165,7 @@ namespace { bool IsPrinterPreferred(DocumentType eDocType) const { - bool bIsDraw = eDocType == DOCUMENT_TYPE_DRAW; + bool bIsDraw = eDocType == DocumentType::Draw; return IsTilePage() || IsPageSize() || IsBooklet() || (!bIsDraw && !IsNotes()); } @@ -1163,7 +1163,7 @@ public: , mpPrintView() , mbHasOrientationWarningBeenShown(false) { - DialogCreator aCreator( mrBase, mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS, GetCurrentPageIndex() ); + DialogCreator aCreator( mrBase, mrBase.GetDocShell()->GetDocumentType() == DocumentType::Impress, GetCurrentPageIndex() ); m_aUIProperties = aCreator.GetDialogControls(); maSlidesPerPage = aCreator.GetSlidesPerPage(); diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 53c7f98a817a..930925c3b5f6 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1220,7 +1220,7 @@ bool Outliner::ShowWrapArroundDialog() return false; // The question text depends on the search direction. - bool bImpress = mpDrawDocument && mpDrawDocument->GetDocumentType() == DOCUMENT_TYPE_IMPRESS; + bool bImpress = mpDrawDocument && mpDrawDocument->GetDocumentType() == DocumentType::Impress; sal_uInt16 nStringId; if (mbDirectionIsForward) diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index c170ee5e97df..f3da2e75ce24 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -464,7 +464,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sd bool bStandardPaint = true; SdDrawDocument* pDoc = mpDocShell->GetDoc(); - if( pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) + if( pDoc && pDoc->GetDocumentType() == DocumentType::Impress) { rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( pDoc ) ); if(xSlideshow.is() && xSlideshow->isRunning()) diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 1d7c6d895142..3ce557923a26 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -277,7 +277,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) // Use configuration of FrameView ReadFrameViewData(mpFrameView); - if( eDocType == DOCUMENT_TYPE_DRAW ) + if( eDocType == DocumentType::Draw ) { SetHelpId( SD_IF_SDGRAPHICVIEWSHELL ); GetActiveWindow()->SetHelpId( HID_SDGRAPHICVIEWSHELL ); diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index b148ccffbbbb..52cfe4f277f7 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -529,7 +529,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr if (nLength) { SdDrawDocument* pDrawDocument = dynamic_cast<SdDrawDocument*>(GetModel()); - const bool bImpress = pDrawDocument && pDrawDocument->GetDocumentType() == DOCUMENT_TYPE_IMPRESS; + const bool bImpress = pDrawDocument && pDrawDocument->GetDocumentType() == DocumentType::Impress; bool bBool = false; sal_Int32 nInt32 = 0; diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index e15d320cc6f2..29512e501254 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -1521,7 +1521,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, bool View::PasteRTFTable( const ::tools::SvRef<SotStorageStream>& xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions ) { - std::unique_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh )); + std::unique_ptr<SdDrawDocument> pModel(new SdDrawDocument( DocumentType::Impress, mpDocSh )); pModel->NewOrLoadCompleted(NEW_DOC); pModel->GetItemPool().SetDefaultMetric(MapUnit::Map100thMM); pModel->InsertPage(pModel->AllocPage(false)); |