diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-11-10 19:20:12 -0500 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 10:47:26 +0000 |
commit | d7801c39826f2f24f7340e1b25809d3bb65d6099 (patch) | |
tree | 6acf82af5954e72930272fd62ac37c07664cf937 /svx | |
parent | b34eab5996c52269360d166815ef15a250627c48 (diff) |
Namespace cleanup and disambiguation
Change-Id: Ib6d2f8b4e71436c3a7c26bdfc9847152ebaf0739
Reviewed-on: https://gerrit.libreoffice.org/19900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 9 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 79 | ||||
-rw-r--r-- | svx/source/sidebar/SelectionChangeHandler.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/insert/InsertPropertyPanel.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanelBase.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/shadow/ShadowPropertyPanel.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdocirc.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 14 | ||||
-rw-r--r-- | svx/source/svdraw/svdorect.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdtrans.cxx | 24 | ||||
-rw-r--r-- | svx/source/tbxctrls/extrusioncontrols.cxx | 13 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 18 |
16 files changed, 98 insertions, 107 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index cb4ba74454a1..1d00f00b0229 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1142,9 +1142,9 @@ bool EnhancedCustomShape2d::GetHandlePosition( const sal_uInt32 nIndex, Point& r double fY =-dx * sin( a ); rReturnPosition = Point( - Round( fX + aReferencePoint.X() ), + svx::Round( fX + aReferencePoint.X() ), basegfx::fTools::equalZero(fXScale) ? aReferencePoint.Y() : - Round( ( fY * fYScale ) / fXScale + aReferencePoint.Y() ) ); + svx::Round( ( fY * fYScale ) / fXScale + aReferencePoint.Y() ) ); } else { diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index b1d59bf1ae1f..307454051047 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -265,7 +265,6 @@ using namespace ::com::sun::star::form::runtime; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::view; using namespace ::com::sun::star::util; -using namespace ::com::sun::star::frame; using namespace ::com::sun::star::script; using namespace ::svxform; using namespace ::svx; @@ -675,14 +674,14 @@ FmXFormShell::~FmXFormShell() } -Reference< XModel > FmXFormShell::getContextDocument() const +Reference< css::frame::XModel > FmXFormShell::getContextDocument() const { - Reference< XModel > xModel; + Reference< css::frame::XModel > xModel; // determine the type of document we live in try { - Reference< XController > xController; + Reference< css::frame::XController > xController; if ( m_xAttachedFrame.is() ) xController = m_xAttachedFrame->getController(); if ( xController.is() ) @@ -719,7 +718,7 @@ bool FmXFormShell::impl_checkDisposed() const return m_eDocumentType; // determine the type of document we live in - Reference< XModel > xModel = getContextDocument(); + Reference< css::frame::XModel > xModel = getContextDocument(); if ( xModel.is() ) m_eDocumentType = DocumentClassification::classifyDocument( xModel ); else diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 89a608b80a82..9b787da6af25 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -72,7 +72,6 @@ namespace svx using namespace ::com::sun::star; using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::awt; using namespace ::com::sun::star::form; using namespace ::com::sun::star::form::runtime; using namespace ::com::sun::star::lang; @@ -160,16 +159,16 @@ namespace svx 0 }; - typedef ::cppu::WeakImplHelper < XFocusListener + typedef ::cppu::WeakImplHelper < css::awt::XFocusListener > FmFocusListenerAdapter_Base; class FmFocusListenerAdapter : public FmFocusListenerAdapter_Base { private: IFocusObserver* m_pObserver; - Reference< XWindow > m_xWindow; + Reference< css::awt::XWindow > m_xWindow; public: - FmFocusListenerAdapter( const Reference< XControl >& _rxControl, IFocusObserver* _pObserver ); + FmFocusListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IFocusObserver* _pObserver ); // clean up the instance void dispose(); @@ -178,14 +177,14 @@ namespace svx virtual ~FmFocusListenerAdapter(); protected: - virtual void SAL_CALL focusGained( const FocusEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL focusLost( const FocusEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL focusGained( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL focusLost( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) override; virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException, std::exception) override; }; - FmFocusListenerAdapter::FmFocusListenerAdapter( const Reference< XControl >& _rxControl, IFocusObserver* _pObserver ) + FmFocusListenerAdapter::FmFocusListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IFocusObserver* _pObserver ) :m_pObserver( _pObserver ) ,m_xWindow( _rxControl, UNO_QUERY ) { @@ -225,14 +224,14 @@ namespace svx } - void SAL_CALL FmFocusListenerAdapter::focusGained( const FocusEvent& e ) throw (RuntimeException, std::exception) + void SAL_CALL FmFocusListenerAdapter::focusGained( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) { if ( m_pObserver ) m_pObserver->focusGained( e ); } - void SAL_CALL FmFocusListenerAdapter::focusLost( const FocusEvent& e ) throw (RuntimeException, std::exception) + void SAL_CALL FmFocusListenerAdapter::focusLost( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) { if ( m_pObserver ) m_pObserver->focusLost( e ); @@ -246,16 +245,16 @@ namespace svx m_xWindow.clear(); } - typedef ::cppu::WeakImplHelper < XMouseListener + typedef ::cppu::WeakImplHelper < css::awt::XMouseListener > FmMouseListenerAdapter_Base; class FmMouseListenerAdapter : public FmMouseListenerAdapter_Base { private: IContextRequestObserver* m_pObserver; - Reference< XWindow > m_xWindow; + Reference< css::awt::XWindow > m_xWindow; public: - FmMouseListenerAdapter( const Reference< XControl >& _rxControl, IContextRequestObserver* _pObserver ); + FmMouseListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IContextRequestObserver* _pObserver ); // clean up the instance void dispose(); @@ -264,14 +263,14 @@ namespace svx virtual ~FmMouseListenerAdapter(); protected: - virtual void SAL_CALL mousePressed( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL mouseReleased( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL mouseEntered( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL mouseExited( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mousePressed( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mouseReleased( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mouseEntered( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mouseExited( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException, std::exception) override; }; - FmMouseListenerAdapter::FmMouseListenerAdapter( const Reference< XControl >& _rxControl, IContextRequestObserver* _pObserver ) + FmMouseListenerAdapter::FmMouseListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IContextRequestObserver* _pObserver ) :m_pObserver( _pObserver ) ,m_xWindow( _rxControl, UNO_QUERY ) { @@ -311,7 +310,7 @@ namespace svx } - void SAL_CALL FmMouseListenerAdapter::mousePressed( const awt::MouseEvent& _rEvent ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mousePressed( const css::awt::MouseEvent& _rEvent ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; // is this a request for a context menu? @@ -323,19 +322,19 @@ namespace svx } - void SAL_CALL FmMouseListenerAdapter::mouseReleased( const awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mouseReleased( const css::awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) { // not interested in } - void SAL_CALL FmMouseListenerAdapter::mouseEntered( const awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mouseEntered( const css::awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) { // not interested in } - void SAL_CALL FmMouseListenerAdapter::mouseExited( const awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mouseExited( const css::awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) { // not interested in } @@ -455,7 +454,7 @@ namespace svx } - bool lcl_determineReadOnly( const Reference< XControl >& _rxControl ) + bool lcl_determineReadOnly( const Reference< css::awt::XControl >& _rxControl ) { bool bIsReadOnlyModel = true; try @@ -484,12 +483,12 @@ namespace svx } - static vcl::Window* lcl_getWindow( const Reference< XControl >& _rxControl ) + static vcl::Window* lcl_getWindow( const Reference< css::awt::XControl >& _rxControl ) { vcl::Window* pWindow = nullptr; try { - Reference< XWindowPeer > xControlPeer; + Reference< css::awt::XWindowPeer > xControlPeer; if ( _rxControl.is() ) xControlPeer = _rxControl->getPeer(); if ( xControlPeer.is() ) @@ -504,7 +503,7 @@ namespace svx } - bool lcl_isRichText( const Reference< XControl >& _rxControl ) + bool lcl_isRichText( const Reference< css::awt::XControl >& _rxControl ) { if ( !_rxControl.is() ) return false; @@ -758,7 +757,7 @@ namespace svx if ( m_xActiveTextComponent.is() ) { sal_Int32 nTextLen = m_xActiveTextComponent->getText().getLength(); - m_xActiveTextComponent->setSelection( awt::Selection( 0, nTextLen ) ); + m_xActiveTextComponent->setSelection( css::awt::Selection( 0, nTextLen ) ); return true; } } @@ -785,7 +784,7 @@ namespace svx ::svt::OStringTransfer::CopyString( sSelectedText, lcl_getWindow( m_xActiveControl ) ); if ( SID_CUT == _nSlot ) { - awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); + css::awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); m_xActiveTextComponent->insertText( aSelection, OUString() ); } } @@ -794,7 +793,7 @@ namespace svx { OUString sClipboardContent; OSL_VERIFY( ::svt::OStringTransfer::PasteString( sClipboardContent, lcl_getWindow( m_xActiveControl ) ) ); - awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); + css::awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); m_xActiveTextComponent->insertText( aSelection, sClipboardContent ); } break; @@ -1008,7 +1007,7 @@ namespace svx if ( !bDisable && bNeedSelection ) { - awt::Selection aSelection = m_xActiveTextComponent->getSelection(); + css::awt::Selection aSelection = m_xActiveTextComponent->getSelection(); bDisable |= aSelection.Min == aSelection.Max; } @@ -1102,12 +1101,12 @@ namespace svx try { - Sequence< Reference< XControl > > aControls( _rxController->getControls() ); + Sequence< Reference< css::awt::XControl > > aControls( _rxController->getControls() ); m_aControlObservers.resize( 0 ); m_aControlObservers.reserve( aControls.getLength() ); - const Reference< XControl >* pControls = aControls.getConstArray(); - const Reference< XControl >* pControlsEnd = pControls + aControls.getLength(); + const Reference< css::awt::XControl >* pControls = aControls.getConstArray(); + const Reference< css::awt::XControl >* pControlsEnd = pControls + aControls.getLength(); for ( ; pControls != pControlsEnd; ++pControls ) { m_aControlObservers.push_back( FocusListenerAdapter( new FmFocusListenerAdapter( *pControls, this ) ) ); @@ -1186,7 +1185,7 @@ namespace svx } - void FmTextControlShell::controlActivated( const Reference< XControl >& _rxControl ) + void FmTextControlShell::controlActivated( const Reference< css::awt::XControl >& _rxControl ) { // ensure that all knittings with the previously active control are lost if ( m_xActiveControl.is() ) @@ -1195,14 +1194,14 @@ namespace svx #if OSL_DEBUG_LEVEL > 0 { - Sequence< Reference< XControl > > aActiveControls; + Sequence< Reference< css::awt::XControl > > aActiveControls; if ( m_xActiveController.is() ) aActiveControls = m_xActiveController->getControls(); bool bFoundThisControl = false; - const Reference< XControl >* pControls = aActiveControls.getConstArray(); - const Reference< XControl >* pControlsEnd = pControls + aActiveControls.getLength(); + const Reference< css::awt::XControl >* pControls = aActiveControls.getConstArray(); + const Reference< css::awt::XControl >* pControlsEnd = pControls + aActiveControls.getLength(); for ( ; ( pControls != pControlsEnd ) && !bFoundThisControl; ++pControls ) { if ( *pControls == _rxControl ) @@ -1262,7 +1261,7 @@ namespace svx } - void FmTextControlShell::fillFeatureDispatchers(const Reference< XControl >& _rxControl, SfxSlotId* _pZeroTerminatedSlots, + void FmTextControlShell::fillFeatureDispatchers(const Reference< css::awt::XControl >& _rxControl, SfxSlotId* _pZeroTerminatedSlots, ControlFeatures& _rDispatchers) { Reference< XDispatchProvider > xProvider( _rxControl, UNO_QUERY ); @@ -1325,7 +1324,7 @@ namespace svx void FmTextControlShell::focusGained( const css::awt::FocusEvent& _rEvent ) { - Reference< XControl > xControl( _rEvent.Source, UNO_QUERY ); + Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY ); #if OSL_DEBUG_LEVEL > 0 OString sTrace( "FmTextControlShell::focusGained: 0x" ); @@ -1341,7 +1340,7 @@ namespace svx void FmTextControlShell::focusLost( const css::awt::FocusEvent& _rEvent ) { - Reference< XControl > xControl( _rEvent.Source, UNO_QUERY ); + Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY ); #if OSL_DEBUG_LEVEL > 0 OString sTrace( "FmTextControlShell::focusLost: 0x" ); @@ -1359,7 +1358,7 @@ namespace svx } - void FmTextControlShell::contextMenuRequested( const awt::MouseEvent& /*_rEvent*/ ) + void FmTextControlShell::contextMenuRequested( const css::awt::MouseEvent& /*_rEvent*/ ) { m_rBindings.GetDispatcher()->ExecutePopup( SVX_RES( RID_FM_TEXTATTRIBUTE_MENU ) ); } diff --git a/svx/source/sidebar/SelectionChangeHandler.cxx b/svx/source/sidebar/SelectionChangeHandler.cxx index 0a4b5aafe2b4..2c852ac21001 100644 --- a/svx/source/sidebar/SelectionChangeHandler.cxx +++ b/svx/source/sidebar/SelectionChangeHandler.cxx @@ -34,7 +34,7 @@ namespace svx { namespace sidebar { SelectionChangeHandler::SelectionChangeHandler ( const std::function<rtl::OUString()>& rSelectionChangeCallback, - const Reference<frame::XController>& rxController, + const Reference<css::frame::XController>& rxController, const EnumContext::Context eDefaultContext) : SelectionChangeHandlerInterfaceBase(m_aMutex), maSelectionChangeCallback(rSelectionChangeCallback), diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx index c0e4649aa067..b27c520cf294 100644 --- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx +++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx @@ -131,7 +131,7 @@ IMPL_LINK_TYPED(InsertPropertyPanel, WindowEventListener, VclWindowEvent&, rEven return; } - Reference<frame::XSubToolbarController> xController (pSidebarToolBox->GetControllerForItemId(nItemId), UNO_QUERY); + Reference<css::frame::XSubToolbarController> xController (pSidebarToolBox->GetControllerForItemId(nItemId), UNO_QUERY); if ( ! xController.is() ) return; diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 77f67e9602d4..ebf7bf41fd1a 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -59,7 +59,7 @@ namespace svx { namespace sidebar { LinePropertyPanel::LinePropertyPanel( vcl::Window* pParent, - const uno::Reference<frame::XFrame>& rxFrame, + const uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) : LinePropertyPanelBase(pParent, rxFrame), maStyleControl(SID_ATTR_LINE_STYLE, *pBindings, *this), @@ -105,7 +105,7 @@ void LinePropertyPanel::Initialize() VclPtr<vcl::Window> LinePropertyPanel::Create ( vcl::Window* pParent, - const uno::Reference<frame::XFrame>& rxFrame, + const uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) { if (pParent == nullptr) diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 2c6958e84aa2..9890d6211c2f 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -166,7 +166,7 @@ namespace svx { namespace sidebar { LinePropertyPanelBase::LinePropertyPanelBase( vcl::Window* pParent, - const uno::Reference<frame::XFrame>& rxFrame) + const uno::Reference<css::frame::XFrame>& rxFrame) : PanelLayout(pParent, "LinePropertyPanel", "svx/ui/sidebarline.ui", rxFrame), mpStyleItem(), mpDashItem(), diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index 812229bf2acf..abaac42e8878 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -70,7 +70,7 @@ namespace svx { namespace sidebar { ShadowPropertyPanel::ShadowPropertyPanel( vcl::Window* pParent, - const uno::Reference<frame::XFrame>& rxFrame, + const uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) : PanelLayout(pParent, "ShadowPropertyPanel", "svx/ui/sidebarshadow.ui", rxFrame), maShadowController(SID_ATTR_FILL_SHADOW, *pBindings, *this), @@ -358,7 +358,7 @@ void ShadowPropertyPanel::NotifyItemUpdate( VclPtr<vcl::Window> ShadowPropertyPanel::Create ( vcl::Window* pParent, - const uno::Reference<frame::XFrame>& rxFrame, + const uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) { if(pParent == nullptr) diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 863f8d48fd60..961e084b125d 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -578,7 +578,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa aCtr1 -= aCtr0; if(bRotOk) - pO->Rotate(aCtr0, Round(nAngle/nPi180), nSin, nCos); + pO->Rotate(aCtr0, svx::Round(nAngle/nPi180), nSin, nCos); pO->Move(Size(aCtr1.X(),aCtr1.Y())); } @@ -1572,7 +1572,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) double nNew=tan((double)nNewShearAngle*nPi180); nNew-=nOld; nNew=atan(nNew)/nPi180; - nShearAngle=Round(nNew); + nShearAngle=svx::Round(nNew); } else { nShearAngle=nNewShearAngle-nOldShearAngle; } diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index b0a8c62341df..eee1101c59c6 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -60,7 +60,7 @@ Point GetAnglePnt(const Rectangle& rR, long nAngle) long nMaxRad=((nWdt>nHgt ? nWdt : nHgt)+1) /2; double a; a=nAngle*nPi180; - Point aRetval(Round(cos(a)*nMaxRad),-Round(sin(a)*nMaxRad)); + Point aRetval(svx::Round(cos(a)*nMaxRad),-svx::Round(sin(a)*nMaxRad)); if (nWdt==0) aRetval.X()=0; if (nHgt==0) aRetval.Y()=0; if (nWdt!=nHgt) { @@ -883,13 +883,13 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) double a; // starting point a=nStartAngle*nPi180; - aTmpPt1=Point(Round(cos(a)*nMaxRad),-Round(sin(a)*nMaxRad)); + aTmpPt1=Point(svx::Round(cos(a)*nMaxRad),-svx::Round(sin(a)*nMaxRad)); if (nWdt==0) aTmpPt1.X()=0; if (nHgt==0) aTmpPt1.Y()=0; aTmpPt1+=aCenter; // finishing point a=nEndAngle*nPi180; - aTmpPt2=Point(Round(cos(a)*nMaxRad),-Round(sin(a)*nMaxRad)); + aTmpPt2=Point(svx::Round(cos(a)*nMaxRad),-svx::Round(sin(a)*nMaxRad)); if (nWdt==0) aTmpPt2.X()=0; if (nHgt==0) aTmpPt2.Y()=0; aTmpPt2+=aCenter; @@ -1001,7 +1001,7 @@ void SdrCircObj::TakeUnrotatedSnapRect(Rectangle& rRect) const } } if (aGeo.nShearAngle!=0) { - long nDst=Round((rRect.Bottom()-rRect.Top())*aGeo.nTan); + long nDst=svx::Round((rRect.Bottom()-rRect.Top())*aGeo.nTan); if (aGeo.nShearAngle>0) { Point aRef(rRect.TopLeft()); rRect.Left()-=nDst; diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 5f65f17e8d33..3dc86c494113 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -486,14 +486,14 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& long nOverhang=rRec.nHelplineOverhang; long nHelplineDist=rRec.nHelplineDist; - long dx= Round(nLineDist*nHlpCos); - long dy=-Round(nLineDist*nHlpSin); - long dxh1a= Round((nHelplineDist-rRec.nHelpline1Len)*nHlpCos); - long dyh1a=-Round((nHelplineDist-rRec.nHelpline1Len)*nHlpSin); - long dxh1b= Round((nHelplineDist-rRec.nHelpline2Len)*nHlpCos); - long dyh1b=-Round((nHelplineDist-rRec.nHelpline2Len)*nHlpSin); - long dxh2= Round((nLineDist+nOverhang)*nHlpCos); - long dyh2=-Round((nLineDist+nOverhang)*nHlpSin); + long dx= svx::Round(nLineDist*nHlpCos); + long dy=-svx::Round(nLineDist*nHlpSin); + long dxh1a= svx::Round((nHelplineDist-rRec.nHelpline1Len)*nHlpCos); + long dyh1a=-svx::Round((nHelplineDist-rRec.nHelpline1Len)*nHlpSin); + long dxh1b= svx::Round((nHelplineDist-rRec.nHelpline2Len)*nHlpCos); + long dyh1b=-svx::Round((nHelplineDist-rRec.nHelpline2Len)*nHlpSin); + long dxh2= svx::Round((nLineDist+nOverhang)*nHlpCos); + long dyh2=-svx::Round((nLineDist+nOverhang)*nHlpSin); // extension line 1 rPol.aHelpline1.aP1=Point(aP1.X()+dxh1a,aP1.Y()+dyh1a); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 73a57eee16c2..42a0edba9ca1 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -330,18 +330,18 @@ bool ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi if (bRet) { double cs=cos(nTmpAngle*nPi180); double nR=(double)GetLen(Point(dx,dy))/cs/2; - nRad=std::abs(Round(nR)); + nRad=std::abs(svx::Round(nR)); } if (dAngle<18000) { nCircStAngle=NormAngle360(nTangAngle-9000); nCircRelAngle=NormAngle360(2*dAngle); - aCircCenter.X()+=Round(nRad*cos((nTangAngle+9000)*nPi180)); - aCircCenter.Y()-=Round(nRad*sin((nTangAngle+9000)*nPi180)); + aCircCenter.X()+=svx::Round(nRad*cos((nTangAngle+9000)*nPi180)); + aCircCenter.Y()-=svx::Round(nRad*sin((nTangAngle+9000)*nPi180)); } else { nCircStAngle=NormAngle360(nTangAngle+9000); nCircRelAngle=-NormAngle360(36000-2*dAngle); - aCircCenter.X()+=Round(nRad*cos((nTangAngle-9000)*nPi180)); - aCircCenter.Y()-=Round(nRad*sin((nTangAngle-9000)*nPi180)); + aCircCenter.X()+=svx::Round(nRad*cos((nTangAngle-9000)*nPi180)); + aCircCenter.Y()-=svx::Round(nRad*sin((nTangAngle-9000)*nPi180)); } bAngleSnap=pView!=nullptr && pView->IsAngleSnapEnabled(); if (bAngleSnap) { @@ -465,8 +465,8 @@ bool ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point double sn=sin(a); double cs=cos(a); double nGKathLen=nHypLen*sn; - y+=Round(nGKathLen*sn); - x+=Round(nGKathLen*cs); + y+=svx::Round(nGKathLen*sn); + x+=svx::Round(nGKathLen*cs); } aRectP2.X()+=x; aRectP2.Y()+=y; diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 009164499f4e..56a491229705 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -206,7 +206,7 @@ void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const rRect = maRect; if (aGeo.nShearAngle!=0) { - long nDst=Round((maRect.Bottom()-maRect.Top())*aGeo.nTan); + long nDst=svx::Round((maRect.Bottom()-maRect.Top())*aGeo.nTan); if (aGeo.nShearAngle>0) { Point aRef(rRect.TopLeft()); diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index a942fda7b82a..c25d34ceed05 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -43,8 +43,8 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, con long nWdt = rRect.Right() - rRect.Left(); if (nWdt == 0) rRect.Right()++; } - rRect.Left() = rRef.X() + Round( (rRect.Left() - rRef.X()) * double(xFact) ); - rRect.Right() = rRef.X() + Round( (rRect.Right() - rRef.X()) * double(xFact) ); + rRect.Left() = rRef.X() + svx::Round( (rRect.Left() - rRef.X()) * double(xFact) ); + rRect.Right() = rRef.X() + svx::Round( (rRect.Right() - rRef.X()) * double(xFact) ); if (!yFact.IsValid()) { SAL_WARN( "svx.svdraw", "invalid fraction yFract, using Fraction(1,1)" ); @@ -52,8 +52,8 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, con long nHgt = rRect.Bottom() - rRect.Top(); if (nHgt == 0) rRect.Bottom()++; } - rRect.Top() = rRef.Y() + Round( (rRect.Top() - rRef.Y()) * double(yFact) ); - rRect.Bottom() = rRef.Y() + Round( (rRect.Bottom() - rRef.Y()) * double(yFact) ); + rRect.Top() = rRef.Y() + svx::Round( (rRect.Top() - rRef.Y()) * double(yFact) ); + rRect.Bottom() = rRef.Y() + svx::Round( (rRect.Bottom() - rRef.Y()) * double(yFact) ); if (!bNoJustify) rRect.Justify(); } @@ -175,7 +175,7 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent // move into the direction of the center, as a basic position for the rotation pC1->Y()-=y0; // resize, account for the distance from the center - pC1->Y()=Round(((double)pC1->Y()) /rRad.X()*(cx-pC1->X())); + pC1->Y()=svx::Round(((double)pC1->Y()) /rRad.X()*(cx-pC1->X())); pC1->Y()+=cy; } else { // move into the direction of the center, as a basic position for the rotation @@ -183,7 +183,7 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent // resize, account for the distance from the center long nPntRad=cy-pC1->Y(); double nFact=(double)nPntRad/(double)rRad.Y(); - pC1->X()=Round((double)pC1->X()*nFact); + pC1->X()=svx::Round((double)pC1->X()*nFact); pC1->X()+=cx; } RotatePoint(*pC1,rCenter,sn,cs); @@ -193,7 +193,7 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent // move into the direction of the center, as a basic position for the rotation pC2->Y()-=y0; // resize, account for the distance from the center - pC2->Y()=Round(((double)pC2->Y()) /rRad.X()*(rCenter.X()-pC2->X())); + pC2->Y()=svx::Round(((double)pC2->Y()) /rRad.X()*(rCenter.X()-pC2->X())); pC2->Y()+=cy; } else { // move into the direction of the center, as a basic position for the rotation @@ -201,7 +201,7 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent // resize, account for the distance from the center long nPntRad=rCenter.Y()-pC2->Y(); double nFact=(double)nPntRad/(double)rRad.Y(); - pC2->X()=Round((double)pC2->X()*nFact); + pC2->X()=svx::Round((double)pC2->X()*nFact); pC2->X()+=cx; } RotatePoint(*pC2,rCenter,sn,cs); @@ -280,7 +280,7 @@ double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCen long dy=rPnt.Y()-y0; double a=((double)(y0-nTop))/nHgt; a*=dy; - rPnt.Y()=y0+Round(a); + rPnt.Y()=y0+svx::Round(a); } return 0.0; } @@ -392,7 +392,7 @@ long GetAngle(const Point& rPnt) if (rPnt.Y()>0) a=-9000; else a=9000; } else { - a=Round((atan2((double)-rPnt.Y(),(double)rPnt.X())/nPi180)); + a=svx::Round((atan2((double)-rPnt.Y(),(double)rPnt.X())/nPi180)); } return a; } @@ -429,7 +429,7 @@ long GetLen(const Point& rPnt) x*=x; y*=y; x+=y; - x=Round(sqrt((double)x)); + x=svx::Round(sqrt((double)x)); return x; } else { double nx=x; @@ -441,7 +441,7 @@ long GetLen(const Point& rPnt) if (nx>0x7FFFFFFF) { return 0x7FFFFFFF; // we can't go any further, for fear of an overrun! } else { - return Round(nx); + return svx::Round(nx); } } } diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index cdfb086f0de0..0d68e606dba5 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -44,11 +44,6 @@ #include "colorwindow.hxx" #include "extrusiondepthdialog.hxx" - - -//using ::svtools::ToolbarMenu; - -using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; @@ -242,7 +237,7 @@ ExtrusionDirectionControl::ExtrusionDirectionControl( const Reference< XComponentContext >& rxContext ) : svt::PopupWindowController( rxContext, - Reference< frame::XFrame >(), + Reference< css::frame::XFrame >(), OUString( ".uno:ExtrusionDirectionFloater" ) ) { @@ -486,7 +481,7 @@ ExtrusionDepthController::ExtrusionDepthController( const Reference< XComponentContext >& rxContext ) : svt::PopupWindowController( rxContext, - Reference< frame::XFrame >(), + Reference< css::frame::XFrame >(), OUString( ".uno:ExtrusionDepthFloater" ) ) { @@ -759,7 +754,7 @@ void ExtrusionLightingWindow::SelectHdl(void* pControl) ExtrusionLightingControl::ExtrusionLightingControl( const Reference< XComponentContext >& rxContext ) : svt::PopupWindowController( rxContext, - Reference< frame::XFrame >(), + Reference< css::frame::XFrame >(), OUString( ".uno:ExtrusionDirectionFloater" ) ) { @@ -903,7 +898,7 @@ ExtrusionSurfaceControl::ExtrusionSurfaceControl( ) : svt::PopupWindowController( rxContext, - Reference< frame::XFrame >(), + Reference< css::frame::XFrame >(), OUString( ".uno:ExtrusionSurfaceFloater" ) ) { diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index c0d7cb18205f..23ebb5aee81f 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -57,11 +57,9 @@ using ::svtools::ToolbarMenu; -using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::frame; namespace svx { @@ -251,9 +249,9 @@ IMPL_LINK_NOARG_TYPED(FontWorkGalleryDialog, DoubleClickFavoriteHdl, ValueSet*, class FontworkAlignmentWindow : public ToolbarMenu { public: - FontworkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ); + FontworkAlignmentWindow( svt::ToolboxController& rController, const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow ); - virtual void statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException ) override; + virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( RuntimeException ) override; private: svt::ToolboxController& mrController; @@ -272,7 +270,7 @@ private: }; FontworkAlignmentWindow::FontworkAlignmentWindow(svt::ToolboxController& rController, - const Reference< XFrame >& rFrame, vcl::Window* pParentWindow) + const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow) : ToolbarMenu(rFrame, pParentWindow, WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK) , mrController(rController) , maImgAlgin1(SVX_RES(RID_SVXIMG_FONTWORK_ALIGN_LEFT)) @@ -305,7 +303,7 @@ void FontworkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled ) } } -void FontworkAlignmentWindow::statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException ) +void FontworkAlignmentWindow::statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( RuntimeException ) { if( Event.FeatureURL.Main.equals( msFontworkAlignment ) ) { @@ -362,7 +360,7 @@ public: FontworkAlignmentControl::FontworkAlignmentControl( const Reference< XComponentContext >& rxContext ) -: svt::PopupWindowController( rxContext, Reference< frame::XFrame >(), OUString( ".uno:FontworkAlignment" ) ) +: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), OUString( ".uno:FontworkAlignment" ) ) { } @@ -426,7 +424,7 @@ Sequence< OUString > SAL_CALL FontworkAlignmentControl::getSupportedServiceNames class FontworkCharacterSpacingWindow : public ToolbarMenu { public: - FontworkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ); + FontworkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow ); virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException ) override; private: @@ -443,7 +441,7 @@ private: }; FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::ToolboxController& rController, - const Reference< XFrame >& rFrame, vcl::Window* pParentWindow) + const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow) : ToolbarMenu(rFrame, pParentWindow, WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK) , mrController(rController) , msFontworkCharacterSpacing(".uno:FontworkCharacterSpacing") @@ -598,7 +596,7 @@ public: FontworkCharacterSpacingControl::FontworkCharacterSpacingControl( const Reference< XComponentContext >& rxContext ) -: svt::PopupWindowController( rxContext, Reference< frame::XFrame >(), OUString( ".uno:FontworkCharacterSpacingFloater" ) ) +: svt::PopupWindowController( rxContext, Reference< css::frame::XFrame >(), OUString( ".uno:FontworkCharacterSpacingFloater" ) ) { } |