diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-09 15:24:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-10 09:48:06 +0200 |
commit | 89dd3f80685c66883b6ed4efbf369f5aa2dc292e (patch) | |
tree | 6edf1a741d079c88799df9219270798affd2ffa5 /sd | |
parent | 84482f5193ff0738563b6e91f66fc95fbc145de3 (diff) |
convert SfxObjectCreateMode to scoped enum
and fix some dodgy usage in /sc in the process
Change-Id: Ia2bee267df31aba431fc8cb81195bb83e5b64deb
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc.cxx | 6 | ||||
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/app/sdmod1.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/app/sdxfer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawDocShell.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/GraphicDocShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews5.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/frmview.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/presvish.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 2 |
22 files changed, 43 insertions, 43 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 877eeb89e9c7..f3034577b876 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -452,10 +452,10 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const if( meDocType == DOCUMENT_TYPE_IMPRESS ) mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell( - SFX_CREATE_MODE_EMBEDDED, true, meDocType ) ); + SfxObjectCreateMode::EMBEDDED, true, meDocType ) ); else mpCreatingTransferable->SetDocShell( new ::sd::GraphicDocShell( - SFX_CREATE_MODE_EMBEDDED, true, meDocType ) ); + SfxObjectCreateMode::EMBEDDED, true, meDocType ) ); pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj = mpCreatingTransferable->GetDocShell() ); pNewDocSh->DoInitNew( NULL ); @@ -487,7 +487,7 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const SdDrawDocument* pDoc = const_cast<SdDrawDocument*>(this); pDoc->SetAllocDocSh(false); pDoc->mxAllocedDocShRef = new ::sd::DrawDocShell( - SFX_CREATE_MODE_EMBEDDED, true, meDocType); + SfxObjectCreateMode::EMBEDDED, true, meDocType); pDoc->mxAllocedDocShRef->DoInitNew(NULL); pNewModel = pDoc->mxAllocedDocShRef->GetDoc(); } diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index ee8739610b64..ec5416cc1f58 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -224,10 +224,10 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium) // If that wasn't the case, we could load the model directly. if ( bCreateGraphicShell ) // Draw - mxBookmarkDocShRef = new ::sd::GraphicDocShell(SFX_CREATE_MODE_STANDARD, true); + mxBookmarkDocShRef = new ::sd::GraphicDocShell(SfxObjectCreateMode::STANDARD, true); else // Impress - mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, true); + mxBookmarkDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD, true); bOK = mxBookmarkDocShRef->DoLoad(&rMedium); if( bOK ) diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index b10a3beb8f9a..bb7dd9671561 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -612,7 +612,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) // Set base URI xInfoSet->setPropertyValue( "BaseURI" , makeAny( mrMedium.GetBaseURL() ) ); - if( 0 == nRet && SFX_CREATE_MODE_EMBEDDED == mrDocShell.GetCreateMode() ) + if( 0 == nRet && SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() ) { OUString aName; if ( mrMedium.GetItemSet() ) @@ -904,7 +904,7 @@ bool SdXMLFilter::Export() OUString sTargetStorage( "TargetStorage" ); xInfoSet->setPropertyValue( sTargetStorage, Any( xStorage ) ); - if( SFX_CREATE_MODE_EMBEDDED == mrDocShell.GetCreateMode() ) + if( SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() ) { OUString aName; if ( mrMedium.GetItemSet() ) @@ -979,7 +979,7 @@ bool SdXMLFilter::Export() aServices[i ].mpService = pServiceNames->mpSettings; aServices[i++].mpStream = sXML_settingsStreamName; - if( mrDocShell.GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) + if( mrDocShell.GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) { aServices[i ].mpService = pServiceNames->mpMeta; aServices[i++].mpStream = sXML_metaStreamName; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index a0e2880b7004..65108f1bffee 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -265,7 +265,7 @@ bool SdModule::OutlineToImpress(SfxRequest& rRequest) SfxObjectShellLock xDocShell; ::sd::DrawDocShell* pDocSh; xDocShell = pDocSh = new ::sd::DrawDocShell( - SFX_CREATE_MODE_STANDARD, false); + SfxObjectCreateMode::STANDARD, false); pDocSh->DoInitNew(NULL); SdDrawDocument* pDoc = pDocSh->GetDoc(); @@ -721,7 +721,7 @@ SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, const Reference< SfxObjectShellLock xDocShell; ::sd::DrawDocShell* pNewDocSh; - xDocShell = pNewDocSh = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD,false,eDocType); + xDocShell = pNewDocSh = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD,false,eDocType); pNewDocSh->DoInitNew(NULL); SdDrawDocument* pDoc = pNewDocSh->GetDoc(); if (pDoc) diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 32b0278d8686..0bd42e937b44 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -555,7 +555,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo { maDocShellRef = new ::sd::DrawDocShell( mpSdDrawDocumentIntern, - SFX_CREATE_MODE_EMBEDDED, + SfxObjectCreateMode::EMBEDDED, true, mpSdDrawDocumentIntern->GetDocumentType()); mbOwnDocument = false; diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 8ed91666fbd3..9a41a1235d2c 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -1418,7 +1418,7 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview ) CloseDocShell(); DrawDocShell* pNewDocSh; - xDocShell = pNewDocSh = new DrawDocShell(SFX_CREATE_MODE_STANDARD, false); + xDocShell = pNewDocSh = new DrawDocShell(SfxObjectCreateMode::STANDARD, false); pNewDocSh->DoInitNew(NULL); SdDrawDocument* pDoc = pNewDocSh->GetDoc(); pDoc->CreateFirstPages(); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index f7b479162026..21fa0d9998d6 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -691,7 +691,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) while( pSfxDocShell ) { ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, pSfxDocShell ); - if( pDocShell && !pDocShell->IsInDestruction() && ( pDocShell->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) ) + if( pDocShell && !pDocShell->IsInDestruction() && ( pDocShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) ) { NavDocInfo aInfo ; aInfo.mpDocShell = pDocShell; diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 12c2bcb08ebc..a0358f4c379f 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -990,7 +990,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed) if( pMed ) { // in this mode the document is also owned and controlled by this instance - mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, true); + mxBookmarkDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD, true); if (mxBookmarkDocShRef->DoLoad(pMed)) mpBookmarkDoc = mxBookmarkDocShRef->GetDoc(); else diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 3eb55845f39e..f6531891be76 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -301,7 +301,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) // space. Had to remove the check for empty VisArea below, // since XML load always sets a VisArea before. //TODO/LATER: looks a little bit strange! - if( ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() ) + if( ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() ) { SdPage* pPage = mpDoc->GetSdPage( 0, PK_STANDARD ); @@ -517,7 +517,7 @@ bool DrawDocShell::Save() mpDoc->StopWorkStartupDelay(); //TODO/LATER: why this?! - if( GetCreateMode() == SFX_CREATE_MODE_STANDARD ) + if( GetCreateMode() == SfxObjectCreateMode::STANDARD ) SfxObjectShell::SetVisArea( Rectangle() ); bool bRet = SfxObjectShell::Save(); @@ -550,7 +550,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium ) mpDoc->StopWorkStartupDelay(); //TODO/LATER: why this?! - if( GetCreateMode() == SFX_CREATE_MODE_STANDARD ) + if( GetCreateMode() == SfxObjectCreateMode::STANDARD ) SfxObjectShell::SetVisArea( Rectangle() ); sal_uInt32 nVBWarning = ERRCODE_NONE; diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 5cdda0ff9bc5..8ad53d52e0a0 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -117,7 +117,7 @@ void DrawDocShell::Construct( bool bClipboard ) DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, bool bDataObject, DocumentType eDocumentType) : - SfxObjectShell( eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), + SfxObjectShell( eMode == SfxObjectCreateMode::INTERNAL ? SfxObjectCreateMode::EMBEDDED : eMode), mpDoc(NULL), mpUndoManager(NULL), mpPrinter(NULL), @@ -129,7 +129,7 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, mbOwnPrinter(false), mbNewDocument( true ) { - Construct( eMode == SFX_CREATE_MODE_INTERNAL ); + Construct( eMode == SfxObjectCreateMode::INTERNAL ); } DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, bool bDataObject, DocumentType eDocumentType ) : @@ -151,7 +151,7 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, bool bDataObje DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, bool bDataObject, DocumentType eDocumentType) : - SfxObjectShell(eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), + SfxObjectShell(eMode == SfxObjectCreateMode::INTERNAL ? SfxObjectCreateMode::EMBEDDED : eMode), mpDoc(pDoc), mpUndoManager(NULL), mpPrinter(NULL), @@ -163,7 +163,7 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, mbOwnPrinter(false), mbNewDocument( true ) { - Construct( eMode == SFX_CREATE_MODE_INTERNAL ); + Construct( eMode == SfxObjectCreateMode::INTERNAL ); } DrawDocShell::~DrawDocShell() diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index dc2d510ecb43..791c6083d612 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -59,7 +59,7 @@ private: public: DrawDocShell ( - SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, + SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED, bool bSdDataObj=false, DocumentType=DOCUMENT_TYPE_IMPRESS); @@ -70,7 +70,7 @@ public: DrawDocShell ( SdDrawDocument* pDoc, - SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, + SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED, bool bSdDataObj=false, DocumentType=DOCUMENT_TYPE_IMPRESS); virtual ~DrawDocShell(); diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx index 3e418c5e257b..987e1e99356f 100644 --- a/sd/source/ui/inc/GraphicDocShell.hxx +++ b/sd/source/ui/inc/GraphicDocShell.hxx @@ -47,7 +47,7 @@ public: SFX_DECL_OBJECTFACTORY(); GraphicDocShell ( - SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, + SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED, bool bSdDataObj=false, DocumentType=DOCUMENT_TYPE_DRAW); diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 2be0f0975f40..7498fca7ff3f 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -725,7 +725,7 @@ throw (UnknownPropertyException, PropertyVetoException, if( *pValues >>= aPrinterName ) { bOk = true; - if( !aPrinterName.isEmpty() && pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) + if( !aPrinterName.isEmpty() && pDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) { SfxPrinter *pTempPrinter = pDocSh->GetPrinter( true ); if (pTempPrinter) diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index e2ab4f8bde16..bdf49e90d458 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -651,7 +651,7 @@ void SAL_CALL SdXImpressDocument::setViewData( const uno::Reference < container: throw lang::DisposedException(); SfxBaseModel::setViewData( xData ); - if( mpDocShell && (mpDocShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED) && xData.is() ) + if( mpDocShell && (mpDocShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED) && xData.is() ) { const sal_Int32 nCount = xData->getCount(); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 56b6cadd4560..0b82950cfb3d 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -183,7 +183,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) break; } - if( GetDocSh() && (GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)) + if( GetDocSh() && (GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED)) GetDocSh()->SetModified(); SwitchPage(nSelectedPage); diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 8d9b045e55ca..e3e184be7b29 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -89,7 +89,7 @@ void DrawViewShell::Resize (void) { ViewShell::Resize(); - if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { SetZoomRect( GetDocSh()->GetVisArea(ASPECT_CONTENT) ); } @@ -508,7 +508,7 @@ void DrawViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence { const Rectangle aVisArea( mpFrameView->GetVisArea() ); - if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { GetDocSh()->SetVisArea(aVisArea); } diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 055dcd865ddb..27a6176313f8 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1722,7 +1722,7 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet) rSet.DisableItem( SID_DIAMODE ); } - if (GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED) + if (GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED) { // Outplace-Edit: do not allow switch rSet.ClearItem( SID_OUTLINEMODE ); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index d3421cbd4157..87464ebd77b2 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) Point aVisAreaPos; - if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { aVisAreaPos = pDocSh->GetVisArea(ASPECT_CONTENT).TopLeft(); } @@ -343,7 +343,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) FuPermanent(aReq); mpDrawView->SetFrameDragSingles(true); - if (pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED) + if (pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED) { mbZoomOnPage = false; } @@ -549,7 +549,7 @@ void DrawViewShell::SetupPage (Size &rSize, Point aVisAreaPos; - if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { aVisAreaPos = GetDocSh()->GetVisArea(ASPECT_CONTENT).TopLeft(); } diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index fd009b74814d..44338eb2763d 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -610,7 +610,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : if( pValue->Value >>= nInt16 ) { SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() ); - if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) + if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) SetPageKind( (PageKind)nInt16 ); SetPageKindOnLoad( (PageKind)nInt16 ); @@ -621,7 +621,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : if( pValue->Value >>= nInt16 ) { SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() ); - if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) + if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) SetSelectedPage( (sal_uInt16)nInt16 ); SetSelectedPageOnLoad( (sal_uInt16)nInt16 ); @@ -660,7 +660,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : if( pValue->Value >>= nInt32 ) { SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() ); - if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) + if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) SetViewShEditMode( (EditMode)nInt32, PK_STANDARD ); } } @@ -669,7 +669,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : if( pValue->Value >>= nInt32 ) { SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() ); - if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) + if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) SetViewShEditMode( (EditMode)nInt32, PK_NOTES ); } } @@ -678,7 +678,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : if( pValue->Value >>= nInt32 ) { SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() ); - if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) + if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) ) SetViewShEditMode( (EditMode)nInt32, PK_HANDOUT ); } } diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index 34b0c57ca6b3..ba4305394cc6 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -79,14 +79,14 @@ TYPEINIT1( PresentationViewShell, DrawViewShell ); PresentationViewShell::PresentationViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, FrameView* pFrameView) : DrawViewShell( pFrame, rViewShellBase, pParentWindow, PK_STANDARD, pFrameView) { - if( GetDocSh() && GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + if( GetDocSh() && GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) maOldVisArea = GetDocSh()->GetVisArea( ASPECT_CONTENT ); meShellType = ST_PRESENTATION; } PresentationViewShell::~PresentationViewShell (void) { - if( GetDocSh() && GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !maOldVisArea.IsEmpty() ) + if( GetDocSh() && GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED && !maOldVisArea.IsEmpty() ) GetDocSh()->SetVisArea( maOldVisArea ); } diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 90c9cc07157c..5619c15acf23 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -663,7 +663,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) ) { - DrawDocShellRef xShell = new DrawDocShell(SFX_CREATE_MODE_INTERNAL); + DrawDocShellRef xShell = new DrawDocShell(SfxObjectCreateMode::INTERNAL); xShell->DoInitNew(0); SdDrawDocument* pModel = xShell->GetDoc(); @@ -857,7 +857,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( mrDoc.GetDocSh() && ( mrDoc.GetDocSh()->GetClassName() == aObjDesc.maClassName ) ) { uno::Reference < embed::XStorage > xStore( ::comphelper::OStorageHelper::GetStorageFromInputStream( xStm ) ); - ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SFX_CREATE_MODE_EMBEDDED, true, mrDoc.GetDocumentType() ) ); + ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SfxObjectCreateMode::EMBEDDED, true, mrDoc.GetDocumentType() ) ); // mba: BaseURL doesn't make sense for clipboard functionality SfxMedium *pMedium = new SfxMedium( xStore, OUString() ); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index f6d25df97e1e..ea5e50cd4ee5 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -594,7 +594,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, Point aVisAreaPos; - if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { aVisAreaPos = GetDocSh()->GetVisArea(ASPECT_CONTENT).TopLeft(); } |