diff options
Diffstat (limited to 'sw')
26 files changed, 50 insertions, 59 deletions
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 79bb65dd85f4..4b5af6012089 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -525,7 +525,7 @@ public: After RESTRAINTEND the object is created and selected. BreakCreate interrupts the process. In this case no object is selected. */ bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos ); - bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &); + bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, SdrInventor eObjInventor, const Point &); void MoveCreate ( const Point &rPos ); bool EndCreate ( SdrCreateCmd eSdrCreateCmd ); void BreakCreate(); diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 536e75c63872..d3eec4ad5783 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -531,7 +531,7 @@ public: bool IsBezierEditMode(); bool AreOnlyFormsSelected() const; bool HasDrwObj(SdrObject *pSdrObj) const; - bool HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const; + bool HasOnlyObj(SdrObject *pSdrObj, SdrInventor eObjInventor) const; bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=nullptr, vcl::Window* pWin=nullptr, bool bIsNewObj=false, bool bSetSelectionToStart=false ); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 44b7e79696e1..58517a7f9cbc 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -128,7 +128,7 @@ SdrObject* SwDoc::CloneSdrObj( const SdrObject& rObj, bool bMoveWithinDoc, } SdrObject *pObj = rObj.Clone(); - if( bMoveWithinDoc && FmFormInventor == pObj->GetObjInventor() ) + if( bMoveWithinDoc && SdrInventor::FmForm == pObj->GetObjInventor() ) { // We need to preserve the Name for Controls uno::Reference< awt::XControlModel > xModel = static_cast<SdrUnoObj*>(pObj)->GetUnoControlModel(); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index c60b09022062..ded98a2114a3 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -160,7 +160,7 @@ SwContact* GetUserCall( const SdrObject* pObj ) bool IsMarqueeTextObj( const SdrObject& rObj ) { SdrTextAniKind eTKind; - return SdrInventor == rObj.GetObjInventor() && + return SdrInventor::Default == rObj.GetObjInventor() && OBJ_TEXT == rObj.GetObjIdentifier() && ( SDRTEXTANI_SCROLL == ( eTKind = static_cast<const SdrTextObj&>(rObj).GetTextAniKind()) || SDRTEXTANI_ALTERNATE == eTKind || SDRTEXTANI_SLIDE == eTKind ); @@ -550,7 +550,7 @@ void SwFlyDrawContact::GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchore bool CheckControlLayer( const SdrObject *pObj ) { - if ( FmFormInventor == pObj->GetObjInventor() ) + if ( SdrInventor::FmForm == pObj->GetObjInventor() ) return true; if ( dynamic_cast<const SdrObjGroup*>( pObj) != nullptr ) { diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index fd85ace26495..59aa2a6cd375 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -130,9 +130,9 @@ SwFlyDrawObj::~SwFlyDrawObj() // SwFlyDrawObj - Factory-Methods -sal_uInt32 SwFlyDrawObj::GetObjInventor() const +SdrInventor SwFlyDrawObj::GetObjInventor() const { - return SWGInventor; + return SdrInventor::Swg; } sal_uInt16 SwFlyDrawObj::GetObjIdentifier() const diff --git a/sw/source/core/draw/dobjfac.cxx b/sw/source/core/draw/dobjfac.cxx index e092f6d26917..e3587646202d 100644 --- a/sw/source/core/draw/dobjfac.cxx +++ b/sw/source/core/draw/dobjfac.cxx @@ -26,7 +26,7 @@ SwObjectFactory aSwObjectFactory; IMPL_STATIC_LINK( SwObjectFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) { - if ( aParams.nInventor == SWGInventor ) + if ( aParams.nInventor == SdrInventor::Swg ) { // No switch, there's only one at the moment OSL_ENSURE( aParams.nObjIdentifier == SwFlyDrawObjIdentifier, diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 51fd93275954..e39fc6ae0de4 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1619,7 +1619,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) pInvestigatedObj = &rObj; } - if( FmFormInventor == pInvestigatedObj->GetObjInventor() ) + if( SdrInventor::FmForm == pInvestigatedObj->GetObjInventor() ) { eType = OBJCNT_CONTROL; uno::Reference< awt::XControlModel > xModel = diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 3bda5e2b1344..840fc938219a 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1663,7 +1663,7 @@ bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const return bRet; } -bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, +bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, SdrInventor eObjInventor, const Point &rPos ) { bool bRet = false; @@ -1755,7 +1755,7 @@ bool SwFEShell::ImpEndCreate() // alien identifier should end up on defaults // duplications possible!! - sal_uInt16 nIdent = SdrInventor == rSdrObj.GetObjInventor() + sal_uInt16 nIdent = SdrInventor::Default == rSdrObj.GetObjInventor() ? rSdrObj.GetObjIdentifier() : 0xFFFF; @@ -2688,7 +2688,7 @@ void SwFEShell::CheckUnboundObjects() // Alien identifier should roll into the default, // Duplications are possible!! sal_uInt16 nIdent = - Imp()->GetDrawView()->GetCurrentObjInventor() == SdrInventor ? + Imp()->GetDrawView()->GetCurrentObjInventor() == SdrInventor::Default ? Imp()->GetDrawView()->GetCurrentObjIdentifier() : 0xFFFF; SwFormatAnchor aAnch; @@ -2893,7 +2893,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const SdrView* pDrawView = GetDrawView(); SdrModel* pDrawModel = pDrawView->GetModel(); SdrObject* pObj = SdrObjFactory::MakeNewObject( - SdrInventor, eSdrObjectKind, + SdrInventor::Default, eSdrObjectKind, nullptr, pDrawModel); if(pObj) diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index acfdcb898df4..3d097c07e998 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -27,10 +27,6 @@ class SwFlyFrame; class SwFrameFormat; class SdrObjMacroHitRec; -const sal_uInt32 SWGInventor = sal_uInt32('S')*0x00000001 + - sal_uInt32('W')*0x00000100 + - sal_uInt32('G')*0x00010000; - const sal_uInt16 SwFlyDrawObjIdentifier = 0x0001; // DrawObjects for Flys @@ -50,8 +46,8 @@ public: virtual ~SwFlyDrawObj() override; // for instantiation of this class while loading (via factory) - virtual sal_uInt32 GetObjInventor() const override; - virtual sal_uInt16 GetObjIdentifier() const override; + virtual SdrInventor GetObjInventor() const override; + virtual sal_uInt16 GetObjIdentifier() const override; }; // virtual objects for Flys diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index af0bfe21cc7a..6d39a48129ea 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -301,7 +301,7 @@ uno::Reference< drawing::XShape > SwFmDrawPage::CreateShape( SdrObject *pObj ) c throw (uno::RuntimeException, std::exception) { uno::Reference< drawing::XShape > xRet; - if(dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr || pObj->GetObjInventor() == SWGInventor) + if(dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr || pObj->GetObjInventor() == SdrInventor::Swg) { SwFlyDrawContact* pFlyContact = static_cast<SwFlyDrawContact*>(pObj->GetUserCall()); if(pFlyContact) @@ -667,7 +667,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) SdrObject* pObj = pSvxShape->GetSdrObject(); // #108784# - set layer of new drawing object to corresponding // invisible layer. - if(FmFormInventor != pObj->GetObjInventor()) + if(SdrInventor::FmForm != pObj->GetObjInventor()) pObj->SetLayer( bOpaque ? pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() : pDoc->getIDocumentDrawModelAccess().GetInvisibleHellId() ); else pObj->SetLayer(pDoc->getIDocumentDrawModelAccess().GetInvisibleControlsId()); @@ -1109,7 +1109,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a // set layer of new drawing // object to corresponding invisible layer. bool bIsVisible = pDoc->getIDocumentDrawModelAccess().IsVisibleLayerId( pObj->GetLayer() ); - if(FmFormInventor != pObj->GetObjInventor()) + if(SdrInventor::FmForm != pObj->GetObjInventor()) { pObj->SetLayer( *o3tl::doAccess<bool>(aValue) ? ( bIsVisible ? pDoc->getIDocumentDrawModelAccess().GetHeavenId() : pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() ) @@ -1784,7 +1784,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates( if(pObject) { bGroupMember = pObject->GetUpGroup() != nullptr; - bFormControl = pObject->GetObjInventor() == FmFormInventor; + bFormControl = pObject->GetObjInventor() == SdrInventor::FmForm; } const OUString* pNames = aPropertyNames.getConstArray(); beans::PropertyState* pRet = aRet.getArray(); @@ -2802,7 +2802,7 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru SwDoc* pDoc = pFormat->GetDoc(); // set layer of new drawing // object to corresponding invisible layer. - if( FmFormInventor != pObj->GetObjInventor()) + if( SdrInventor::FmForm != pObj->GetObjInventor()) { pObj->SetLayer( pSwShape->pImpl->GetOpaque() ? pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 61b69da31619..7a25f7a44fa7 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -358,7 +358,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) // #i52858# - method name changed SwDrawModel* pModel = m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel(); SdrPage* pPg = pModel->GetPage( 0 ); - m_pMarquee = SdrObjFactory::MakeNewObject( SdrInventor, + m_pMarquee = SdrObjFactory::MakeNewObject( SdrInventor::Default, OBJ_TEXT, pPg, pModel ); if( !m_pMarquee ) return; diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 0dceef8cc4de..532efa47ea09 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -685,7 +685,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha // Schauen, ob es ein SdrObject dafuer gibt const SdrObject *pObj = pFrameFormat ? pFrameFormat->FindSdrObject() : nullptr; OSL_ENSURE( pObj, "SdrObject nicht gefunden" ); - OSL_ENSURE( pObj && FmFormInventor == pObj->GetObjInventor(), "falscher Inventor" ); + OSL_ENSURE( pObj && SdrInventor::FmForm == pObj->GetObjInventor(), "falscher Inventor" ); const SdrView* pDrawView = pVSh ? pVSh->GetDrawView() : nullptr; diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 6250b987b451..f0de3f6e2dcc 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -628,7 +628,7 @@ const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrameFormat& rFormat // Schauen, ob es ein SdrObject dafuer gibt const SdrObject *pObj = rFormat.FindSdrObject(); - if( !pObj || FmFormInventor != pObj->GetObjInventor() ) + if( !pObj || SdrInventor::FmForm != pObj->GetObjInventor() ) return nullptr; const SdrUnoObj& rFormObj = dynamic_cast<const SdrUnoObj&>(*pObj); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2aea2cc1ee54..7830a3260126 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4580,7 +4580,7 @@ void DocxAttributeOutput::WritePostponedMath(const SwOLENode* pPostponedMath) void DocxAttributeOutput::WritePostponedFormControl(const SdrObject* pObject) { - if (!pObject || pObject->GetObjInventor() != FmFormInventor) + if (!pObject || pObject->GetObjInventor() != SdrInventor::FmForm) return; SdrUnoObj *pFormObj = const_cast<SdrUnoObj*>(dynamic_cast< const SdrUnoObj*>(pObject)); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index fc362a9474d1..699ad22fde26 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1957,7 +1957,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_FIELD); m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST); - if (pObject && pObject->GetObjInventor() == FmFormInventor) + if (pObject && pObject->GetObjInventor() == SdrInventor::FmForm) { if (const SdrUnoObj* pFormObj = dynamic_cast< const SdrUnoObj*>(pObject)) { diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 1d47d51daa83..4c1ef187430d 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -247,7 +247,7 @@ namespace ww8 default: if (const SdrObject* pObj = rFormat.FindRealSdrObject()) { - if (pObj->GetObjInventor() == FmFormInventor) + if (pObj->GetObjInventor() == SdrInventor::FmForm) meWriterType = eFormControl; else meWriterType = eDrawing; @@ -372,7 +372,7 @@ namespace sw void SetLayer::SetObjectLayer(SdrObject &rObject, Layer eLayer) const { - if (FmFormInventor == rObject.GetObjInventor()) + if (SdrInventor::FmForm == rObject.GetObjInventor()) rObject.SetLayer(mnFormLayer); else { diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 24c2583314d0..9fc44252d0d6 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -366,7 +366,7 @@ namespace bool WW8Export::MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat) { const SdrObject *pObject = rFrameFormat.FindRealSdrObject(); - if (!pObject || pObject->GetObjInventor() != FmFormInventor) + if (!pObject || pObject->GetObjInventor() != SdrInventor::FmForm) return false; const SdrUnoObj *pFormObj = dynamic_cast< const SdrUnoObj* >(pObject); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 3c0a4a32df3f..0b139cf3ac2d 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -2041,7 +2041,7 @@ bool WW8_WrPlcSubDoc::WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, { // is it an writer or sdr - textbox? const SdrObject& rObj = *static_cast<SdrObject const *>(aContent[ i ]); - if (rObj.GetObjInventor() == FmFormInventor) + if (rObj.GetObjInventor() == SdrInventor::FmForm) { sal_uInt8 nOldTyp = rWrt.m_nTextTyp; rWrt.m_nTextTyp = nTTyp; diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 35059e45b998..09e6dfd3f893 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2626,20 +2626,16 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) for (sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObject->GetUserData( i ); - if( pData && pData->GetInventor() == SW_DRAWLAYER + if( pData && pData->GetInventor() == SdrInventor::ScOrSwDraw && pData->GetId() == SW_UD_IMAPDATA) { SwMacroInfo* macInf = dynamic_cast<SwMacroInfo*>(pData); - if( macInf )// && macInf->GetShapeId() == pF->nSpId) + if( macInf && macInf->GetShapeId() == pF->nSpId ) { - sal_Int32 nShapeId = macInf->GetShapeId(); - if ( nShapeId == pF->nSpId ) - { - lnName = macInf->GetHlink(); - aObjName = macInf->GetName(); - aTarFrame = macInf->GetTarFrame(); - break; - } + lnName = macInf->GetHlink(); + aObjName = macInf->GetName(); + aTarFrame = macInf->GetTarFrame(); + break; } } } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 045cf7353279..10094cf44931 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -165,7 +165,7 @@ SwMacroInfo* GetMacroInfo( SdrObject* pObj, bool bCreate ) // static for( sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObj->GetUserData( i ); - if( pData && pData->GetInventor() == SW_DRAWLAYER + if( pData && pData->GetInventor() == SdrInventor::ScOrSwDraw && pData->GetId() == SW_UD_IMAPDATA) { return dynamic_cast<SwMacroInfo*>(pData); @@ -6503,7 +6503,7 @@ namespace sw } SwMacroInfo::SwMacroInfo() - : SdrObjUserData( SW_DRAWLAYER, SW_UD_IMAPDATA ) + : SdrObjUserData( SdrInventor::ScOrSwDraw, SW_UD_IMAPDATA ) , mnShapeId(-1) { } diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 7d9dd965277d..dd7e397796c1 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -27,8 +27,6 @@ #include <fltshell.hxx> #include <svx/svdobj.hxx> -#define SW_DRAWLAYER 0x30334353 -#define SW_UD_IMAPDATA 2 #include <vector> #include <stack> @@ -54,6 +52,7 @@ #include <editeng/lrspitem.hxx> #include <oox/ole/olehelper.hxx> +#define SW_UD_IMAPDATA 2 class SwDoc; class SwPaM; diff --git a/sw/source/uibase/ribbar/conform.cxx b/sw/source/uibase/ribbar/conform.cxx index 4c46d3c106c5..7b4d9a87007f 100644 --- a/sw/source/uibase/ribbar/conform.cxx +++ b/sw/source/uibase/ribbar/conform.cxx @@ -68,7 +68,7 @@ bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) m_pWin->SetPointer(Pointer(PointerStyle::DrawRect)); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); + bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), SdrInventor::FmForm, m_aStartPos); if (bReturn) m_pWin->SetDrawAction(true); @@ -102,7 +102,7 @@ void ConstFormControl::CreateDefaultObject() SdrView *pSdrView = m_pSh->GetDrawView(); pSdrView->SetDesignMode(); - m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); + m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), SdrInventor::FmForm, aStartPos); m_pSh->MoveCreate(aEndPos); m_pSh->EndCreate(SdrCreateCmd::ForceEnd); } diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx index e93f75913aa8..634f37a7aef1 100644 --- a/sw/source/uibase/shells/drformsh.cxx +++ b/sw/source/uibase/shells/drformsh.cxx @@ -89,7 +89,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) if (rMarkList.GetMark(0)) { SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj() ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { if(bConvertToText) { @@ -177,7 +177,7 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet) if (rMarkList.GetMark(0)) { SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj() ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel(); diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx index bbb3f43b14b8..5dc92e64013b 100644 --- a/sw/source/uibase/shells/textdrw.cxx +++ b/sw/source/uibase/shells/textdrw.cxx @@ -60,7 +60,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, rSh.StartAction(); rSh.StartUndo( UNDO_UI_INSERT_URLBTN ); - if (rSh.BeginCreate(OBJ_FM_BUTTON, FmFormInventor, aStartPos)) + if (rSh.BeginCreate(OBJ_FM_BUTTON, SdrInventor::FmForm, aStartPos)) { pSdrView->SetOrtho(false); Size aSz(GetView().GetEditWin().PixelToLogic(Size(140, 20))); diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index e10de8e71927..9f0d1a58c015 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -601,8 +601,8 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin, bool SwView::IsTextTool() const { - sal_uInt16 nId; - sal_uInt32 nInvent; + sal_uInt16 nId; + SdrInventor nInvent; SdrView *pSdrView = GetWrtShell().GetDrawView(); OSL_ENSURE( pSdrView, "IsTextTool without DrawView?" ); @@ -610,7 +610,7 @@ bool SwView::IsTextTool() const pSdrView->SetCreateMode(false); pSdrView->TakeCurrentObj(nId,nInvent); - return (nInvent==SdrInventor); + return nInvent == SdrInventor::Default; } SdrView* SwView::GetDrawView() const @@ -664,7 +664,7 @@ bool SwView::AreOnlyFormsSelected() const // Except controls, are still normal draw objects selected? SdrObject *pSdrObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); - if (!HasOnlyObj(pSdrObj, FmFormInventor)) + if (!HasOnlyObj(pSdrObj, SdrInventor::FmForm)) { bForm = false; break; @@ -690,13 +690,13 @@ bool SwView::HasDrwObj(SdrObject *pSdrObj) const if ((bRet = HasDrwObj(pList->GetObj(i)))) break; } - else if (SdrInventor == pSdrObj->GetObjInventor() || pSdrObj->Is3DObj()) + else if (SdrInventor::Default == pSdrObj->GetObjInventor() || pSdrObj->Is3DObj()) return true; return bRet; } -bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const +bool SwView::HasOnlyObj(SdrObject *pSdrObj, SdrInventor eObjInventor) const { bool bRet = false; diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 9b5cb4e176b0..c154df4cd7b5 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -179,7 +179,7 @@ bool SwWrtShell::GetURLFromButton( OUString& rURL, OUString& rDescr ) const if (rMarkList.GetMark(0)) { SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj() ); - if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor()) { uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel(); |