diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-02-04 17:59:58 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-02-04 17:59:58 +0100 |
commit | 888dedef71375dbd02a66e8606d7b55300cf76b0 (patch) | |
tree | 1a83d1f0d971576a461d17f6f6baf41219379d2a /svx | |
parent | 3eab2443ad2d4ebb53af8ee6a27987564c631690 (diff) | |
parent | 3c550e9f7bdd8c9f1f75f4148f516ddc94290f92 (diff) |
CWS svxsplit: merge with m71
Diffstat (limited to 'svx')
7 files changed, 32 insertions, 25 deletions
diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx index 109f86fe458b..d5f20cc0d571 100644 --- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx @@ -66,7 +66,6 @@ namespace sdr { namespace contact { public: ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); - /// determines whether an XControl already exists, and is currently visible bool isControlVisible() const; diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 5e71eeff9840..8f363a5f72d6 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -56,6 +56,7 @@ #include "unopolyhelper.hxx" #include <uno/mapping.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <com/sun/star/document/XActionLockable.hpp> // --------------------------- // - EnhancedCustomShapeEngine - @@ -360,7 +361,8 @@ com::sun::star::awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds { com::sun::star::awt::Rectangle aTextRect; SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) ); - if ( pSdrObjCustomShape && pSdrObjCustomShape->GetModel() && !pSdrObjCustomShape->GetModel()->isLocked() ) + ::com::sun::star::uno::Reference< ::com::sun::star::document::XActionLockable > xLockable( mxShape, ::com::sun::star::uno::UNO_QUERY ); + if ( pSdrObjCustomShape && pSdrObjCustomShape->GetModel() && xLockable.is() && !xLockable->isActionLocked() ) { if ( pSdrObjCustomShape ) { diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 352b9198e97b..63e3f92c4754 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -68,11 +68,10 @@ namespace sdr // no need to correct if no extra text range if(aTextRange != aObjectRange) { - const double fExtraTextRotation(GetCustomShapeObj().GetExtraTextRotation()); const GeoStat& rGeoStat(GetCustomShapeObj().GetGeoStat()); // only correct when rotation and/or shear is used - if(rGeoStat.nShearWink || rGeoStat.nDrehWink || !basegfx::fTools::equalZero(fExtraTextRotation)) + if(rGeoStat.nShearWink || rGeoStat.nDrehWink ) { // text range needs to be corrected by // aObjectRange.getCenter() - aRotObjectRange.getCenter() since it's @@ -96,11 +95,6 @@ namespace sdr aRotMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); } - if(!basegfx::fTools::equalZero(fExtraTextRotation)) - { - aRotMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180); - } - aRotMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY()); aRotObjectRange.transform(aRotMatrix); @@ -189,6 +183,16 @@ namespace sdr aTextRange.getMinY() - aObjectRange.getMinimum().getY()); } + if(!basegfx::fTools::equalZero(fExtraTextRotation)) + { + basegfx::B2DVector aTranslation( + ( aTextRange.getWidth() / 2 ) + ( aTextRange.getMinX() - aObjectRange.getMinimum().getX() ), + ( aTextRange.getHeight() / 2 ) + ( aTextRange.getMinY() - aObjectRange.getMinimum().getY() ) ); + aTextBoxMatrix.translate( -aTranslation.getX(), -aTranslation.getY() ); + aTextBoxMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180); + aTextBoxMatrix.translate( aTranslation.getX(), aTranslation.getY() ); + } + if(rGeoStat.nShearWink) { aTextBoxMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000)); @@ -199,11 +203,6 @@ namespace sdr aTextBoxMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); } - if(!basegfx::fTools::equalZero(fExtraTextRotation)) - { - aTextBoxMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180); - } - // give text it's target position aTextBoxMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY()); } diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 5f7bf41386e0..81d19df1e2fa 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -238,6 +238,8 @@ namespace sdr { namespace contact { getGraphics() const { return m_xControlView->getGraphics(); } inline void draw( const Point& _rTopLeft ) const { m_xControlView->draw( _rTopLeft.X(), _rTopLeft.Y() ); } + void invalidate() const; + public: inline const Reference< XControl >& getControl() const { return m_xControl; } }; @@ -298,6 +300,15 @@ namespace sdr { namespace contact { } //-------------------------------------------------------------------- + void ControlHolder::invalidate() const + { + Window* pWindow = VCLUnoHelper::GetWindow( m_xControl->getPeer() ); + OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" ); + if ( pWindow ) + pWindow->Invalidate(); + } + + //-------------------------------------------------------------------- ::basegfx::B2DVector ControlHolder::getZoom() const { // no check whether we're valid, this is the responsibility of the caller @@ -1666,6 +1677,8 @@ namespace sdr { namespace contact { double fRotate, fShearX; _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX ); #endif + const bool bHadControl = m_pVOCImpl->getExistentControl().is(); + // force control here to make it a VCL ChildWindow. Will be fetched // and used below by getExistentControl() m_pVOCImpl->ensureControl( &_rViewInformation.getObjectToViewTransformation() ); @@ -1676,6 +1689,9 @@ namespace sdr { namespace contact { Reference< XControlModel > xControlModel( rViewContactOfUnoControl.GetSdrUnoObj().GetUnoControlModel() ); const ControlHolder& rControl( m_pVOCImpl->getExistentControl() ); + if ( !bHadControl && rControl.is() && rControl.isVisible() ) + rControl.invalidate(); + // check if we already have an XControl. if ( !xControlModel.is() || !rControl.is() ) // use the default mechanism. This will create a ControlPrimitive2D without diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 508667b5c628..fef83bac8c80 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -746,8 +746,8 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const XubString& rS if (!aFnt.IsTransparent()) { SfxItemSet aAttr(*pFillAttr->GetPool(),XATTR_FILL_FIRST,XATTR_FILL_LAST); - pFillAttr->Put(XFillStyleItem(XFILL_SOLID)); - pFillAttr->Put(XFillColorItem(String(), aFnt.GetFillColor())); + aAttr.Put(XFillStyleItem(XFILL_SOLID)); + aAttr.Put(XFillColorItem(String(), aFnt.GetFillColor())); pText->SetMergedItemSet(aAttr); } sal_uInt32 nWink = aFnt.GetOrientation(); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 45a38fd86361..6011ff35dcfe 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -446,14 +446,6 @@ DictionaryEntry::DictionaryEntry( const rtl::OUString& rTerm, const rtl::OUStrin m_nConversionPropertyType = 1; } -DictionaryEntry::DictionaryEntry() - : m_aTerm() - , m_aMapping() - , m_nConversionPropertyType( linguistic2::ConversionPropertyType::OTHER ) - , m_bNewEntry( sal_True ) -{ -} - DictionaryEntry::~DictionaryEntry() { } diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx index b9784ef0e8ff..54184a7998a5 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx @@ -61,7 +61,6 @@ namespace textconversiondlgs struct DictionaryEntry { - DictionaryEntry(); DictionaryEntry( const rtl::OUString& rTerm, const rtl::OUString& rMapping , sal_Int16 nConversionPropertyType //linguistic2::ConversionPropertyType , sal_Bool bNewEntry = sal_False ); |