summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-02-04 17:59:58 +0100
committerMathias Bauer <mba@openoffice.org>2010-02-04 17:59:58 +0100
commit2bfec91ae18312354921e670aa7f8a7bed60ec17 (patch)
treea84c420aa987c600cd765a5cad4a35bc1be38976 /svx
parentd961a721ab9ded5dfedc00d874f2d8215bc2b2df (diff)
parent1813942ec2be139a3cd7992f9e25671b2280334c (diff)
CWS svxsplit: merge with m71
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx1
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx23
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx16
-rw-r--r--svx/source/svdraw/svdfmtf.cxx4
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx8
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx1
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 711800fc25..64ee4c19b5 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 f9da96d8fa..c49aa16218 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 e07f6b4d37..8e428a6c29 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 6dbb1298a0..80121e5a8f 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 06baabdda1..e18a04e3bb 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 3e2864dc73..6047af2099 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 ce8d42893c..f71e20c889 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 );