summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-02-08 09:18:14 +0100
committersb <sb@openoffice.org>2010-02-08 09:18:14 +0100
commit07b4fe3375e516f4bba9fef195a130b0533170b7 (patch)
tree2d73ab201e756f0a6c4a7ccbbf1585c6b9c4e3cf /svx/source
parent9052c35863c67ed02f7f2129a3262dadfd74d843 (diff)
parent3c550e9f7bdd8c9f1f75f4148f516ddc94290f92 (diff)
sb118: merged in DEV300_m71
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx4
-rw-r--r--svx/source/items/numitem.cxx10
-rw-r--r--svx/source/outliner/outlvw.cxx34
-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
8 files changed, 60 insertions, 40 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 673e95877fcb..2d90db632108 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/items/numitem.cxx b/svx/source/items/numitem.cxx
index 2a607ecf9cab..384ead550c9e 100644
--- a/svx/source/items/numitem.cxx
+++ b/svx/source/items/numitem.cxx
@@ -1177,6 +1177,11 @@ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, USHORT _nWhich ) :
{
}
+SfxPoolItem* SvxNumBulletItem::Create(SvStream &s, USHORT n) const
+{
+ return SfxPoolItem::Create(s, n );
+}
+
/* -----------------27.10.98 10:41-------------------
*
* --------------------------------------------------*/
@@ -1210,11 +1215,6 @@ SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool * ) const
/* -----------------08.12.98 10:43-------------------
*
* --------------------------------------------------*/
-SfxPoolItem* SvxNumBulletItem::Create(SvStream &rStream, USHORT) const
-{
- SvxNumRule aRule(rStream);
- return new SvxNumBulletItem(aRule, Which() );
-}
USHORT SvxNumBulletItem::GetVersion( USHORT /*nFileVersion*/ ) const
{
return NUMITEM_VERSION_03;
diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx
index bd19e20a9a2a..d63b10502321 100644
--- a/svx/source/outliner/outlvw.cxx
+++ b/svx/source/outliner/outlvw.cxx
@@ -357,6 +357,18 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
aDDStartPosRef=pEditView->GetWindow()->PixelToLogic( aDDStartPosPix,pOwner->GetRefMapMode());
return TRUE;
}
+
+ // special case for outliner view in impress, check if double click hits the page icon for toggle
+ if( (nPara == EE_PARA_NOT_FOUND) && (pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW) && (eTarget == MouseText) && (rMEvt.GetClicks() == 2) )
+ {
+ ESelection aSel( pEditView->GetSelection() );
+ nPara = aSel.nStartPara;
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ if( (pPara && pOwner->pParaList->HasChilds(pPara)) && pPara->HasFlag(PARAFLAG_ISPAGE) )
+ {
+ ImpToggleExpand( pPara );
+ }
+ }
return pEditView->MouseButtonDown( rMEvt );
}
@@ -1644,14 +1656,14 @@ USHORT OutlinerView::GetSelectedScriptType() const
return pEditView->GetSelectedScriptType();
}
-String OutlinerView::GetSurroundingText() const
-{
- DBG_CHKTHIS(OutlinerView,0);
- return pEditView->GetSurroundingText();
-}
-
-Selection OutlinerView::GetSurroundingTextSelection() const
-{
- DBG_CHKTHIS(OutlinerView,0);
- return pEditView->GetSurroundingTextSelection();
-}
+String OutlinerView::GetSurroundingText() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetSurroundingText();
+}
+
+Selection OutlinerView::GetSurroundingTextSelection() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetSurroundingTextSelection();
+}
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 ecfff66bf8c2..d8ebb4499646 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 );