summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svdfppt.hxx1
-rw-r--r--svx/inc/svx/unotext.hxx10
-rwxr-xr-xsvx/source/accessibility/AccessibleShape.cxx6
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx30
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx42
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.hxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx9
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeGeometry.cxx85
-rw-r--r--svx/source/msfilter/msashape.cxx20
-rw-r--r--svx/source/msfilter/msdffimp.cxx19
-rw-r--r--svx/source/svdraw/svdfppt.cxx40
-rw-r--r--svx/source/table/accessiblecell.cxx6
-rw-r--r--svx/source/table/cell.cxx23
-rw-r--r--svx/source/table/cell.hxx1
-rw-r--r--svx/source/table/celleditsource.cxx15
-rw-r--r--svx/source/table/tablertfexporter.cxx7
-rw-r--r--svx/source/unodraw/unoshtxt.cxx25
-rw-r--r--svx/source/unoedit/unotext.cxx88
-rw-r--r--svx/source/unoedit/unotext2.cxx12
19 files changed, 298 insertions, 143 deletions
diff --git a/svx/inc/svx/svdfppt.hxx b/svx/inc/svx/svdfppt.hxx
index b69b7b9740..0d9a69a188 100644
--- a/svx/inc/svx/svdfppt.hxx
+++ b/svx/inc/svx/svdfppt.hxx
@@ -1049,7 +1049,6 @@ class SVX_DLLPUBLIC PPTParagraphObj : public PPTParaPropSet, public PPTNumberFor
~PPTParagraphObj();
UINT32 GetTextSize();
- sal_uInt16 GetLevel( sal_uInt32 nMappedInstance );
PPTPortionObj* First();
PPTPortionObj* Next();
diff --git a/svx/inc/svx/unotext.hxx b/svx/inc/svx/unotext.hxx
index c876211eaa..563f977329 100644
--- a/svx/inc/svx/unotext.hxx
+++ b/svx/inc/svx/unotext.hxx
@@ -45,6 +45,7 @@
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/text/XTextAppend.hpp>
#include <com/sun/star/text/XTextCopy.hpp>
#include <cppuhelper/weak.hxx>
@@ -254,6 +255,7 @@ namespace accessibility
class SVX_DLLPUBLIC SvxUnoTextRangeBase : public ::com::sun::star::text::XTextRange,
public ::com::sun::star::beans::XPropertySet,
public ::com::sun::star::beans::XMultiPropertySet,
+ public ::com::sun::star::beans::XMultiPropertyStates,
public ::com::sun::star::beans::XPropertyState,
public ::com::sun::star::lang::XServiceInfo,
public ::com::sun::star::text::XTextRangeCompare,
@@ -281,7 +283,7 @@ protected:
virtual sal_Bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertyMap* pMap, ::com::sun::star::beans::PropertyState& rState);
virtual void SAL_CALL _setPropertyToDefault( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
-
+ virtual void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertyMap* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException );
void SetEditSource( SvxEditSource* _pEditSource ) throw();
virtual void getPropertyValue( const SfxItemPropertyMap* pMap, com::sun::star::uno::Any& rAny, const SfxItemSet& rSet ) throw(::com::sun::star::beans::UnknownPropertyException );
@@ -343,6 +345,12 @@ public:
virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::beans::XMultiPropertyStates
+ //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
// XTextRangeCompare
virtual ::sal_Int16 SAL_CALL compareRegionStarts( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::sal_Int16 SAL_CALL compareRegionEnds( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 067e6bf3ab..14ec72bfb3 100755
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -48,6 +48,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/text/XText.hpp>
+#include <svx/outlobj.hxx>
#include <rtl/ref.hxx>
#include <svx/unoedsrc.hxx>
#include <svx/unoshtxt.hxx>
@@ -183,6 +184,8 @@ void AccessibleShape::Init (void)
if( pTextObj )
pOutlinerParaObject = pTextObj->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
+ bool bOwnParaObj = pOutlinerParaObject != NULL;
+
if( !pOutlinerParaObject && pSdrObject )
pOutlinerParaObject = pSdrObject->GetOutlinerParaObject();
@@ -200,6 +203,9 @@ void AccessibleShape::Init (void)
mpText = new AccessibleTextHelper( pEditSource );
}
+ if( bOwnParaObj )
+ delete pOutlinerParaObject;
+
mpText->SetEventSource(this);
}
}
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index bcd2a4de09..8141b548fd 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -776,33 +776,11 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
break;
case mso_sptCurvedDownArrow : nFlags |= DFF_CUSTOMSHAPE_EXCH; break;
case mso_sptRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptRibbon :
- {
- if ( ( seqAdjustmentValues.getLength() > 1 ) && ( seqAdjustmentValues[ 1 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) )
- {
- double fValue;
- seqAdjustmentValues[ 1 ].Value >>= fValue;
- fValue = 21600 - fValue;
- seqAdjustmentValues[ 1 ].Value <<= fValue;
- }
- nFlags |= DFF_CUSTOMSHAPE_FLIP_V;
- nColorData = 0x30dd0000;
- }
- break;
+ case mso_sptRibbon : nColorData = 0x30dd0000; break;
+
case mso_sptEllipseRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptEllipseRibbon : // !!!!!!!!!!
- {
- if ( ( seqAdjustmentValues.getLength() > 1 ) && ( seqAdjustmentValues[ 1 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) )
- {
- double fValue;
- seqAdjustmentValues[ 1 ].Value >>= fValue;
- fValue = 21600 - fValue;
- seqAdjustmentValues[ 1 ].Value <<= fValue;
- }
- nFlags |= DFF_CUSTOMSHAPE_FLIP_V;
- nColorData = 0x30dd0000;
- }
- break;
+ case mso_sptEllipseRibbon : nColorData = 0x30dd0000; break;
+
case mso_sptVerticalScroll : nColorData = 0x30dd0000; break;
case mso_sptHorizontalScroll : nColorData = 0x30dd0000; break;
default:
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index f2b603281d..ed94bcf075 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -534,9 +534,9 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
if ( fZRotate != 0.0 )
aNewTransform.rotate( 0.0, 0.0, fZRotate );
if ( bIsMirroredX )
- aNewTransform.scale( -1.0, 0.0, 0.0 );
+ aNewTransform.scale( -1.0, 1, 1 );
if ( bIsMirroredY )
- aNewTransform.scale( 0.0, -1.0, 0.0 );
+ aNewTransform.scale( 1, -1.0, 1 );
if( fYRotate != 0.0 )
aNewTransform.rotate( 0.0, -fYRotate, 0.0 );
if( fXRotate != 0.0 )
@@ -663,9 +663,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
pScene->GetProperties().SetObjectItem( Svx3DMaterialSpecularItem( aSpecularCol ) );
pScene->GetProperties().SetObjectItem( Svx3DMaterialSpecularIntensityItem( (sal_uInt16)nIntensity ) );
-// SJ: not setting model, so we save a lot of broadcasting and the model is not modified any longer
-// pScene->SetModel( pModel );
- pRet->SetSnapRect( CalculateNewSnapRect( pCustomShape, aBoundRect2d, pMap ) );
+ pScene->SetLogicRect( CalculateNewSnapRect( pCustomShape, aSnapRect, aBoundRect2d, pMap ) );
// removing placeholder objects
std::vector< E3dCompoundObject* >::iterator aObjectListIter( aPlaceholderObjectList.begin() );
@@ -681,10 +679,10 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
return pRet;
}
-Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap )
+Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap )
{
SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
- const Point aCenter( pCustomShape->GetSnapRect().Center() );
+ const Point aCenter( rSnapRect.Center() );
double fExtrusionBackward, fExtrusionForward;
GetExtrusionDepth( rGeometryItem, pMap, fExtrusionBackward, fExtrusionForward );
sal_uInt32 i;
@@ -717,35 +715,31 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS
double fXRotate, fYRotate;
GetRotateAngle( rGeometryItem, fXRotate, fYRotate );
- double fZRotate = -(360.0-(double)pCustomShape->GetRotateAngle()/100.0) * F_PI180;
- // double fRotationAngle = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAngle, 0 ) ); // * F_PI180;
+ double fZRotate = - ((SdrObjCustomShape*)pCustomShape)->GetObjectRotation() * F_PI180;
// rotating bound volume
basegfx::B3DHomMatrix aMatrix;
aMatrix.translate(-aRotationCenter.DirectionX, -aRotationCenter.DirectionY, -aRotationCenter.DirectionZ);
- aMatrix.rotate(fXRotate, fYRotate, fZRotate);
+ if ( fZRotate != 0.0 )
+ aMatrix.rotate( 0.0, 0.0, fZRotate );
+ if ( ((SdrObjCustomShape*)pCustomShape)->IsMirroredX() )
+ aMatrix.scale( -1.0, 1, 1 );
+ if ( ((SdrObjCustomShape*)pCustomShape)->IsMirroredY() )
+ aMatrix.scale( 1, -1.0, 1 );
+ if( fYRotate != 0.0 )
+ aMatrix.rotate( 0.0, fYRotate, 0.0 );
+ if( fXRotate != 0.0 )
+ aMatrix.rotate( -fXRotate, 0.0, 0.0 );
aMatrix.translate(aRotationCenter.DirectionX, aRotationCenter.DirectionY, aRotationCenter.DirectionZ);
aBoundVolume.transform(aMatrix);
-// for( i = 0L; i < 8L; i++ )
-// {
-// basegfx::B3DPoint aPoint(aBoundVolume.getB3DPoint(i));
-// aPoint.setX(aPoint.getX() - aRotationCenter.DirectionX);
-// aPoint.setY(aPoint.getY() - aRotationCenter.DirectionY);
-// aPoint.setZ(aPoint.getZ() - aRotationCenter.DirectionZ);
-// Rotate( rPoint, fXRotate, fYRotate, fZRotate );
-// aPoint.setX(aPoint.getX() + aRotationCenter.DirectionX);
-// aPoint.setY(aPoint.getY() + aRotationCenter.DirectionY);
-// aPoint.setZ(aPoint.getZ() + aRotationCenter.DirectionZ);
-// aBoundVolume.setB3DPoint(i, aPoint);
-// }
-
- Transformation2D aTransformation2D( pCustomShape, rBoundRect, pMap );
+ Transformation2D aTransformation2D( pCustomShape, rSnapRect, pMap );
if ( aTransformation2D.IsParallel() )
aBoundVolume = aTransformation2D.ApplySkewSettings( aBoundVolume );
Polygon aTransformed( 8 );
for ( i = 0L; i < 8L; i++ )
aTransformed[ (sal_uInt16)i ] = aTransformation2D.Transform2D( aBoundVolume.getB3DPoint( i ) );
+
return aTransformed.GetBoundRect();
}
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx
index dc6a6d77c0..f7f4acd85a 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx
@@ -70,7 +70,7 @@ class EnhancedCustomShape3d
friend class Transformation2D;
protected :
- static Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap );
+ static Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap );
public :
static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 42979df0c8..6c4e61cf49 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -188,8 +188,13 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
// get the text bounds and set at text object
Rectangle aTextBounds = pCustoObj->GetSnapRect();
- if( pCustoObj->GetTextBounds( aTextBounds ) )
- pTextObj->SetSnapRect( aTextBounds );
+ SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) );
+ if ( pSdrObjCustomShape )
+ {
+ EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape );
+ aTextBounds = aCustomShape2d.GetTextRect();
+ }
+ pTextObj->SetSnapRect( aTextBounds );
// if rotated, copy GeoStat, too.
const GeoStat& rSourceGeo = pCustoObj->GetGeoStat();
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index b46bb01a0b..c39ae74bdd 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -4179,6 +4179,87 @@ static const mso_CustomShape msoRibbon2 =
(SvxMSDffHandle*)mso_sptRibbon2Handle, sizeof( mso_sptRibbon2Handle ) / sizeof( SvxMSDffHandle )
};
+static const SvxMSDffVertPair mso_sptRibbonVert[] =
+{
+ { 0, 0 }, { 3 MSO_I, 0 },
+ { 4 MSO_I, 11 MSO_I }, { 4 MSO_I, 10 MSO_I }, { 5 MSO_I, 10 MSO_I }, { 5 MSO_I, 11 MSO_I },
+ { 6 MSO_I, 0 }, { 21600, 0 }, { 18 MSO_I, 14 MSO_I }, { 21600, 15 MSO_I }, { 9 MSO_I, 15 MSO_I }, { 9 MSO_I, 16 MSO_I }, { 8 MSO_I, 21600 }, { 1 MSO_I, 21600 },
+ { 0 MSO_I, 16 MSO_I }, { 0 MSO_I, 15 MSO_I }, { 0, 15 MSO_I }, { 2700, 14 MSO_I },
+
+ { 4 MSO_I, 11 MSO_I },
+ { 3 MSO_I, 12 MSO_I }, { 1 MSO_I, 12 MSO_I },
+ { 0 MSO_I, 13 MSO_I }, { 1 MSO_I, 10 MSO_I }, { 4 MSO_I, 10 MSO_I },
+ { 5 MSO_I, 11 MSO_I },
+ { 6 MSO_I, 12 MSO_I }, { 8 MSO_I, 12 MSO_I },
+ { 9 MSO_I, 13 MSO_I }, { 8 MSO_I, 10 MSO_I }, { 5 MSO_I, 10 MSO_I },
+ { 0 MSO_I, 13 MSO_I },
+ { 0 MSO_I, 15 MSO_I },
+ { 9 MSO_I, 13 MSO_I },
+ { 9 MSO_I, 15 MSO_I }
+};
+static const sal_uInt16 mso_sptRibbonSegm[] =
+{
+ 0x4000, 0x0001, 0xa701, 0x0003, 0xa801, 0x0005, 0xa801, 0x0001, 0xa701, 0x0003, 0x6000, 0x8000,
+ 0x4000, 0xaa00, 0xa801, 0x0001, 0xa702, 0x0001, 0x8000,
+ 0x4000, 0xaa00, 0xa801, 0x0001, 0xa702, 0x0001, 0x8000,
+ 0x4000, 0xaa00, 0x0001, 0x8000,
+ 0x4000, 0xaa00, 0x0001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptRibbonCalc[] =
+{
+ { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, // 00
+ { 0x2000, { 0x400, 675, 0 } }, // 01
+ { 0x2000, { 0x401, 675, 0 } }, // 02
+ { 0x2000, { 0x402, 675, 0 } }, // 03
+ { 0x2000, { 0x403, 675, 0 } }, // 04
+ { 0x8000, { 21600, 0, 0x404 } }, // 05
+ { 0x8000, { 21600, 0, 0x403 } }, // 06
+ { 0x8000, { 21600, 0, 0x402 } }, // 07
+ { 0x8000, { 21600, 0, 0x401 } }, // 08
+ { 0x8000, { 21600, 0, 0x400 } }, // 09
+ { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } }, // 10
+ { 0x2001, { 0x40a, 1, 4 } }, // 11
+ { 0x2001, { 0x40b, 2, 1 } }, // 12
+ { 0x2001, { 0x40b, 3, 1 } }, // 13
+ { 0x8000, { 10800, 0, 0x40c } }, // 14
+ { 0x8000, { 21600, 0, 0x40a } }, // 15
+ { 0x8000, { 21600, 0, 0x40b } }, // 16
+ { 0x0001, { 21600, 1, 2 } }, // 17
+ { 0x0000, { 21600, 0, 2700 } }, // 18
+ { 0x2000, { 0x411, 0, 2700 } } // 19
+};
+static const sal_Int32 mso_sptRibbonDefault[] =
+{
+ 2, 5400, 2700
+};
+static const SvxMSDffTextRectangles mso_sptRibbonTextRect[] =
+{
+ { { 0 MSO_I, 10 MSO_I }, { 9 MSO_I, 21600 } }
+};
+static const SvxMSDffVertPair mso_sptRibbonGluePoints[] =
+{
+ { 17 MSO_I, 10 MSO_I }, { 2700, 14 MSO_I }, { 17 MSO_I, 21600 }, { 18 MSO_I, 14 MSO_I }
+};
+static const SvxMSDffHandle mso_sptRibbonHandle[] =
+{
+ { MSDFF_HANDLE_FLAGS_RANGE,
+ 0x100, 0, 10800, 10800, 2700, 8100, 0x80000000, 0x7fffffff },
+ { MSDFF_HANDLE_FLAGS_RANGE,
+ 10800, 0x101, 10800, 10800, 0x80000000, 0x7fffffff, 0, 7200 }
+};
+static const mso_CustomShape msoRibbon =
+{
+ (SvxMSDffVertPair*)mso_sptRibbonVert, sizeof( mso_sptRibbonVert ) / sizeof( SvxMSDffVertPair ),
+ (sal_uInt16*)mso_sptRibbonSegm, sizeof( mso_sptRibbonSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptRibbonCalc, sizeof( mso_sptRibbonCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptRibbonDefault,
+ (SvxMSDffTextRectangles*)mso_sptRibbonTextRect, sizeof( mso_sptRibbonTextRect ) / sizeof( SvxMSDffTextRectangles ),
+ 21600, 21600,
+ 0x80000000, 0x80000000,
+ (SvxMSDffVertPair*)mso_sptRibbonGluePoints, sizeof( mso_sptRibbonGluePoints ) / sizeof( SvxMSDffVertPair ),
+ (SvxMSDffHandle*)mso_sptRibbonHandle, sizeof( mso_sptRibbonHandle ) / sizeof( SvxMSDffHandle )
+};
+
static const SvxMSDffVertPair mso_sptVerticalScrollVert[] = // adjustment1 : 0 - 5400
{
{ 1 MSO_I, 21600 }, { 0, 11 MSO_I }, { 1 MSO_I, 12 MSO_I }, { 0 MSO_I, 12 MSO_I },
@@ -7717,9 +7798,9 @@ const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType )
case mso_sptSeal24 : pCustomShape = &msoSeal24; break;
case mso_sptSeal32 : pCustomShape = &msoSeal32; break;
case mso_sptRibbon2 : pCustomShape = &msoRibbon2; break;
- case mso_sptRibbon : pCustomShape = &msoRibbon2; break;
+ case mso_sptRibbon : pCustomShape = &msoRibbon; break;
case mso_sptEllipseRibbon2 : pCustomShape = &msoRibbon2; break; // SJ: TODO
- case mso_sptEllipseRibbon : pCustomShape = &msoRibbon2; break; // SJ: TODO
+ case mso_sptEllipseRibbon : pCustomShape = &msoRibbon; break; // SJ: TODO
case mso_sptVerticalScroll : pCustomShape = &msoVerticalScroll; break;
case mso_sptHorizontalScroll : pCustomShape = &msoHorizontalScroll; break;
case mso_sptFlowChartProcess : pCustomShape = &msoFlowChartProcess; break;
diff --git a/svx/source/msfilter/msashape.cxx b/svx/source/msfilter/msashape.cxx
index e44ee070bc..8a9d37ccd6 100644
--- a/svx/source/msfilter/msashape.cxx
+++ b/svx/source/msfilter/msashape.cxx
@@ -5263,23 +5263,11 @@ SvxMSDffCustomShape::SvxMSDffCustomShape( const DffPropertyReader& rPropReader,
break;
case mso_sptCurvedDownArrow : nFlags |= DFF_CUSTOMSHAPE_EXCH; break;
case mso_sptRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptRibbon :
- {
- if ( nHandlesSet & 2 )
- nHandles[ 1 ] = 21600 - nHandles[ 1 ];
- nFlags |= DFF_CUSTOMSHAPE_FLIP_V;
- nColorData = 0x30dd0000;
- }
- break;
+ case mso_sptRibbon : nColorData = 0x30dd0000; break;
+
case mso_sptEllipseRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptEllipseRibbon : // !!!!!!!!!!
- {
- if ( nHandlesSet & 2 )
- nHandles[ 1 ] = 21600 - nHandles[ 1 ];
- nFlags |= DFF_CUSTOMSHAPE_FLIP_V;
- nColorData = 0x30dd0000;
- }
- break;
+ case mso_sptEllipseRibbon : nColorData = 0x30dd0000; break;
+
case mso_sptVerticalScroll : nColorData = 0x30dd0000; break;
case mso_sptHorizontalScroll : nColorData = 0x30dd0000; break;
default: break;
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 3829c7fb5d..fe00bcebb9 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -1339,7 +1339,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_LineEnd eLineEnd,
const MSO_LineEndWidth eLineWidth, const MSO_LineEndLength eLineLenght,
sal_Int32& rnArrowWidth, sal_Bool& rbArrowCenter,
- String& rsArrowName )
+ String& rsArrowName, sal_Bool bScaleArrow )
{
basegfx::B2DPolygon aRetval;
double fLineWidth = nLineWidth < 70 ? 70.0 : nLineWidth;
@@ -1359,6 +1359,13 @@ static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_L
case mso_lineNarrowArrow : fWidthMul = 2.0; break;
case mso_lineWideArrow : fWidthMul = 5.0; nLineNumber += 6; break;
}
+
+ if ( bScaleArrow ) // #i33630 arrows imported from Word are too big
+ {
+ fWidthMul /= 1.75;
+ fLenghtMul/= 1.75;
+ }
+
rbArrowCenter = sal_False;
switch ( eLineEnd )
{
@@ -1550,6 +1557,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
if ( nLineFlags & 0x10 )
{
+ sal_Bool bScaleArrows = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP;
///////////////
// LineStart //
///////////////
@@ -1562,7 +1570,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
sal_Int32 nArrowWidth;
sal_Bool bArrowCenter;
String aArrowName;
- basegfx::B2DPolygon aPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLenght, nArrowWidth, bArrowCenter, aArrowName ));
+ basegfx::B2DPolygon aPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLenght, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows ));
rSet.Put( XLineStartWidthItem( nArrowWidth ) );
rSet.Put( XLineStartItem( aArrowName, basegfx::B2DPolyPolygon(aPoly) ) );
@@ -1580,7 +1588,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
sal_Int32 nArrowWidth;
sal_Bool bArrowCenter;
String aArrowName;
- basegfx::B2DPolygon aPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLenght, nArrowWidth, bArrowCenter, aArrowName ));
+ basegfx::B2DPolygon aPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLenght, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows ));
rSet.Put( XLineEndWidthItem( nArrowWidth ) );
rSet.Put( XLineEndItem( aArrowName, basegfx::B2DPolyPolygon(aPoly) ) );
@@ -1634,9 +1642,9 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
case mso_fillPicture : // Center a picture in the shape
eXFill = XFILL_BITMAP;
break;
+ case mso_fillShadeShape : // Shade from shape outline to end point
case mso_fillShade : // Shade from start to end points
case mso_fillShadeCenter : // Shade from bounding rectangle to end point
- case mso_fillShadeShape : // Shade from shape outline to end point
case mso_fillShadeScale : // Similar to mso_fillShade, but the fillAngle
case mso_fillShadeTitle : // special type - shade to title --- for PP
eXFill = XFILL_GRADIENT;
@@ -1714,6 +1722,9 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
aCol1 = aCol2;
aCol2 = aZwi;
}
+ if ( ( eShapeType == mso_sptEllipse ) && ( eMSO_FillType == mso_fillShadeShape ) )
+ eGrad = XGRAD_ELLIPTICAL;
+
XGradient aGrad( aCol2, aCol1, eGrad, nAngle, nFocusX, nFocusY );
aGrad.SetStartIntens( 100 );
aGrad.SetEndIntens( 100 );
diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx
index c42fb8c990..5216c4a5de 100644
--- a/svx/source/svdraw/svdfppt.cxx
+++ b/svx/source/svdraw/svdfppt.cxx
@@ -2500,7 +2500,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
UINT32 nIsBullet2 = 0; //, nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : pTextObj->GetInstance();
pPara->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance );
if ( !nIsBullet2 )
- rOutliner.SetDepth( rOutliner.GetParagraph( nParaIndex ), -1 );
+ aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, FALSE ) );
if ( oStartNumbering )
{
@@ -3817,17 +3817,22 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_TextOfs, nTextOfs, nDestinationInstance );
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOfs, nBulletOfs, nDestinationInstance );
- UINT32 nFontHeight = 24;
- PPTPortionObj* pPtr = pParaObj->First();
- if ( pPtr )
- pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
- nHardCount += ImplGetExtNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth,
- pParaObj->mnInstance, nDestinationInstance, rStartNumbering, nFontHeight, pParaObj );
+ if ( nIsBullet )
+ {
+ rNumberFormat.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
- if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP )
- pParaObj->UpdateBulletRelSize( nBulletHeight );
- if ( nHardCount )
- ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth );
+ UINT32 nFontHeight = 24;
+ PPTPortionObj* pPtr = pParaObj->First();
+ if ( pPtr )
+ pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
+ nHardCount += ImplGetExtNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth,
+ pParaObj->mnInstance, nDestinationInstance, rStartNumbering, nFontHeight, pParaObj );
+
+ if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP )
+ pParaObj->UpdateBulletRelSize( nBulletHeight );
+ if ( nHardCount )
+ ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth );
+ }
if ( nHardCount )
{
@@ -3841,6 +3846,7 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
case SVX_NUM_CHARS_UPPER_LETTER_N :
case SVX_NUM_CHARS_LOWER_LETTER_N :
{
+ PPTPortionObj* pPtr = pParaObj->First();
if ( pPtr )
{
sal_uInt32 nFont;
@@ -6133,10 +6139,18 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
SvxNumBulletItem* pNumBulletItem = mrStyleSheet.mpNumBulletItem[ nInstance ];
if ( pNumBulletItem )
{
- SvxNumberFormat aNumberFormat( SVX_NUM_CHAR_SPECIAL );
- aNumberFormat.SetBulletChar( ' ' );
+ SvxNumberFormat aNumberFormat( SVX_NUM_NUMBER_NONE );
if ( GetNumberFormat( rManager, aNumberFormat, this, nDestinationInstance, rStartNumbering ) )
{
+ if ( aNumberFormat.GetNumberingType() == SVX_NUM_NUMBER_NONE )
+ {
+ aNumberFormat.SetLSpace( 0 );
+ aNumberFormat.SetAbsLSpace( 0 );
+ aNumberFormat.SetFirstLineOffset( 0 );
+ aNumberFormat.SetCharTextDistance( 0 );
+ aNumberFormat.SetFirstLineIndent( 0 );
+ aNumberFormat.SetIndentAt( 0 );
+ }
SvxNumBulletItem aNewNumBulletItem( *pNumBulletItem );
SvxNumRule* pRule = aNewNumBulletItem.GetNumRule();
if ( pRule )
diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx
index 17d1d2dee5..a77e80a417 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -42,6 +42,7 @@
#include <unotools/accessiblestatesethelper.hxx>
+#include <svx/outlobj.hxx>
#include <svx/unoshtxt.hxx>
#include <svx/svdotext.hxx>
@@ -85,6 +86,8 @@ void AccessibleCell::Init (void)
{
OutlinerParaObject* pOutlinerParaObject = mxCell->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
+ bool bOwnParaObject = pOutlinerParaObject != 0;
+
if( !pOutlinerParaObject )
pOutlinerParaObject = mxCell->GetOutlinerParaObject();
@@ -96,6 +99,9 @@ void AccessibleCell::Init (void)
mpText = new AccessibleTextHelper( pEditSource );
mpText->SetEventSource(this);
}
+
+ if( bOwnParaObject)
+ delete pOutlinerParaObject;
}
}
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 5571f2cedd..7f2f2d35f1 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -199,6 +199,8 @@ namespace sdr
{
OutlinerParaObject* pParaObj = mxCell->GetEditOutlinerParaObject();
+ bool bOwnParaObj = pParaObj != 0;
+
if( pParaObj == 0 )
pParaObj = mxCell->GetOutlinerParaObject();
@@ -242,6 +244,9 @@ namespace sdr
mxCell->SetOutlinerParaObject(pTemp);
}
+
+ if( bOwnParaObj )
+ delete pParaObj;
}
}
@@ -446,10 +451,18 @@ void Cell::notifyModified()
bool Cell::IsTextEditActive()
{
+ bool isActive = false;
SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() );
if(rTableObj.getActiveCell().get() == this )
- return rTableObj.GetEditOutlinerParaObject() != 0;
- return false;
+ {
+ OutlinerParaObject* pParaObj = rTableObj.GetEditOutlinerParaObject();
+ if( pParaObj != 0 )
+ {
+ isActive = true;
+ delete pParaObj;
+ }
+ }
+ return isActive;
}
// -----------------------------------------------------------------------------
@@ -724,9 +737,6 @@ Any SAL_CALL Cell::queryInterface( const Type & rType ) throw(RuntimeException)
if( rType == XLayoutConstrains::static_type() )
return Any( Reference< XLayoutConstrains >( this ) );
- if( rType == XMultiPropertyStates::static_type() )
- return Any( Reference< XMultiPropertyStates >( this ) );
-
Any aRet( SvxUnoTextBase::queryAggregation( rType ) );
if( aRet.hasValue() )
return aRet;
@@ -757,10 +767,9 @@ Sequence< Type > SAL_CALL Cell::getTypes( ) throw (RuntimeException)
Sequence< Type > aTypes( SvxUnoTextBase::getTypes() );
sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 3);
+ aTypes.realloc(nLen + 2);
aTypes[nLen++] = XMergeableCell::static_type();
aTypes[nLen++] = XLayoutConstrains::static_type();
- aTypes[nLen++] = XMultiPropertyStates::static_type();
return aTypes;
}
diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx
index 35aa44b1af..3500230dfa 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/table/cell.hxx
@@ -61,7 +61,6 @@ class Cell : public SdrText,
public SvxUnoTextBase,
public ::com::sun::star::table::XMergeableCell,
public ::com::sun::star::awt::XLayoutConstrains,
- public ::com::sun::star::beans::XMultiPropertyStates,
public ::cppu::OWeakObject
{
friend class CellUndo;
diff --git a/svx/source/table/celleditsource.cxx b/svx/source/table/celleditsource.cxx
index deae438142..3be461adce 100644
--- a/svx/source/table/celleditsource.cxx
+++ b/svx/source/table/celleditsource.cxx
@@ -551,19 +551,19 @@ SvxTextForwarder* CellEditSourceImpl::GetBackgroundTextForwarder()
{
mpTextForwarder->flushCache();
- OutlinerParaObject* mpOutlinerParaObject = NULL;
+ OutlinerParaObject* pOutlinerParaObject = NULL;
bool bTextEditActive = false;
- mpOutlinerParaObject = mxCell->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
+ pOutlinerParaObject = mxCell->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
- if( mpOutlinerParaObject )
+ if( pOutlinerParaObject )
bTextEditActive = true; // text edit active
else
- mpOutlinerParaObject = mxCell->GetOutlinerParaObject();
+ pOutlinerParaObject = mxCell->GetOutlinerParaObject();
- if( mpOutlinerParaObject )
+ if( pOutlinerParaObject )
{
- mpOutliner->SetText( *mpOutlinerParaObject );
+ mpOutliner->SetText( *pOutlinerParaObject );
}
else
{
@@ -598,6 +598,9 @@ SvxTextForwarder* CellEditSourceImpl::GetBackgroundTextForwarder()
}
}
+ if( bTextEditActive )
+ delete pOutlinerParaObject;
+
mbDataValid = true;
}
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index f419f08aad..53c557d972 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -51,6 +51,7 @@
#include "svx/svdotable.hxx"
#include "svx/svdoutl.hxx"
#include "svx/editeng.hxx"
+#include "svx/outlobj.hxx"
//#include <tablertfexporter.hxx>
@@ -214,7 +215,8 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow )
String aContent;
OutlinerParaObject* pParaObj = xCell->GetEditOutlinerParaObject();
-
+ bool bOwnParaObj = pParaObj != 0;
+
if( pParaObj == 0 )
pParaObj = xCell->GetOutlinerParaObject();
@@ -227,6 +229,9 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow )
aContent = rOutliner.GetEditEngine().GetText( LINEEND_LF );
rOutliner.Clear();
+
+ if( bOwnParaObj )
+ delete pParaObj;
}
bool bResetPar, bResetAttr;
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 75ba1ec5fa..465e911dda 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -619,31 +619,31 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
{
mpTextForwarder->flushCache();
- OutlinerParaObject* mpOutlinerParaObject = NULL;
- BOOL bTextEditActive = FALSE;
+ OutlinerParaObject* pOutlinerParaObject = NULL;
+ bool bTextEditActive = false;
SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
if( pTextObj && pTextObj->getActiveText() == mpText )
- mpOutlinerParaObject = pTextObj->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
+ pOutlinerParaObject = pTextObj->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
- if( mpOutlinerParaObject )
- bTextEditActive = TRUE; // text edit active
+ if( pOutlinerParaObject )
+ bTextEditActive = true; // text edit active
else
- mpOutlinerParaObject = mpText->GetOutlinerParaObject();
+ pOutlinerParaObject = mpText->GetOutlinerParaObject();
- if( mpOutlinerParaObject && ( bTextEditActive || !mpObject->IsEmptyPresObj() || mpObject->GetPage()->IsMasterPage() ) )
+ if( pOutlinerParaObject && ( bTextEditActive || !mpObject->IsEmptyPresObj() || mpObject->GetPage()->IsMasterPage() ) )
{
- mpOutliner->SetText( *mpOutlinerParaObject );
+ mpOutliner->SetText( *pOutlinerParaObject );
// #91254# put text to object and set EmptyPresObj to FALSE
- if( mpText && bTextEditActive && mpOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() )
+ if( mpText && bTextEditActive && pOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() )
{
mpObject->SetEmptyPresObj( FALSE );
- static_cast< SdrTextObj* >( mpObject)->NbcSetOutlinerParaObjectForText( mpOutlinerParaObject, mpText );
+ static_cast< SdrTextObj* >( mpObject)->NbcSetOutlinerParaObjectForText( pOutlinerParaObject, mpText );
}
}
else
{
- sal_Bool bVertical = mpOutlinerParaObject ? mpOutlinerParaObject->IsVertical() : sal_False;
+ sal_Bool bVertical = pOutlinerParaObject ? pOutlinerParaObject->IsVertical() : sal_False;
// set objects style sheet on empty outliner
SfxStyleSheetPool* pPool = (SfxStyleSheetPool*)mpObject->GetModel()->GetStyleSheetPool();
@@ -675,6 +675,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
}
mbDataValid = TRUE;
+
+ if( bTextEditActive )
+ delete pOutlinerParaObject;
}
if( bCreated && mpOutliner && HasView() )
diff --git a/svx/source/unoedit/unotext.cxx b/svx/source/unoedit/unotext.cxx
index aed1e631b2..5cee42f54a 100644
--- a/svx/source/unoedit/unotext.cxx
+++ b/svx/source/unoedit/unotext.cxx
@@ -235,6 +235,7 @@ SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) th
: text::XTextRange()
, beans::XPropertySet()
, beans::XMultiPropertySet()
+, beans::XMultiPropertyStates()
, beans::XPropertyState()
, lang::XServiceInfo()
, text::XTextRangeCompare()
@@ -1247,19 +1248,27 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(const OUString& PropertyName, sa
{
OGuard aGuard( Application::GetSolarMutex() );
- do
- {
- SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
-
- if( NULL == pForwarder )
- break;
-
- CheckSelection( maSelection, mpEditSource->GetTextForwarder() );
+ SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
- if( NULL == pMap )
- break;
+ if( pMap )
+ {
+ CheckSelection( maSelection, mpEditSource->GetTextForwarder() );
+ _setPropertyToDefault( pForwarder, pMap, nPara );
+ return;
+ }
+ }
+
+ throw beans::UnknownPropertyException();
+}
+void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, const SfxItemPropertyMap* pMap, sal_Int32 nPara )
+ throw( beans::UnknownPropertyException, uno::RuntimeException )
+{
+ do
+ {
SfxItemSet aSet( *pForwarder->GetPool(), TRUE );
if( pMap->nWID == WID_FONTDESC )
@@ -1295,8 +1304,6 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(const OUString& PropertyName, sa
return;
}
while(0);
-
- throw beans::UnknownPropertyException();
}
uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aPropertyName )
@@ -1345,6 +1352,45 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
throw beans::UnknownPropertyException();
}
+// beans::XMultiPropertyStates
+void SAL_CALL SvxUnoTextRangeBase::setAllPropertiesToDefault( ) throw (uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
+
+ if( pForwarder )
+ {
+ for( const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap(); pMap->pName; pMap++ )
+ {
+ _setPropertyToDefault( pForwarder, pMap, -1 );
+ }
+ }
+}
+
+void SAL_CALL SvxUnoTextRangeBase::setPropertiesToDefault( const uno::Sequence< OUString >& aPropertyNames ) throw (beans::UnknownPropertyException, uno::RuntimeException)
+{
+ sal_Int32 nCount = aPropertyNames.getLength();
+ for( const OUString* pName = aPropertyNames.getConstArray(); nCount; pName++, nCount-- )
+ {
+ setPropertyToDefault( *pName );
+ }
+}
+
+uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::getPropertyDefaults( const uno::Sequence< OUString >& aPropertyNames ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ sal_Int32 nCount = aPropertyNames.getLength();
+ uno::Sequence< uno::Any > ret( nCount );
+ uno::Any* pDefaults = ret.getArray();
+
+ for( const OUString* pName = aPropertyNames.getConstArray(); nCount; pName++, nCount--, pDefaults++ )
+ {
+ *pDefaults = getPropertyDefault( *pName );
+ }
+
+ return ret;
+}
+
// internal
void SvxUnoTextRangeBase::CollapseToStart(void) throw()
{
@@ -1506,7 +1552,7 @@ sal_Int16 SAL_CALL SvxUnoTextRangeBase::compareRegionStarts( const uno::Referenc
SvxUnoTextRangeBase* pR1 = SvxUnoTextRangeBase::getImplementation( xR1 );
SvxUnoTextRangeBase* pR2 = SvxUnoTextRangeBase::getImplementation( xR2 );
- if( (pR1 == 0) || (pR2 == 0) || (pR1->mpEditSource != mpEditSource) || (pR2->mpEditSource != mpEditSource) )
+ if( (pR1 == 0) || (pR2 == 0) )
throw lang::IllegalArgumentException();
const ESelection& r1 = pR1->maSelection;
@@ -1530,7 +1576,7 @@ sal_Int16 SAL_CALL SvxUnoTextRangeBase::compareRegionEnds( const uno::Reference<
SvxUnoTextRangeBase* pR1 = SvxUnoTextRangeBase::getImplementation( xR1 );
SvxUnoTextRangeBase* pR2 = SvxUnoTextRangeBase::getImplementation( xR2 );
- if( (pR1 == 0) || (pR2 == 0) || (pR1->mpEditSource->GetTextForwarder() != mpEditSource->GetTextForwarder()) || (pR2->mpEditSource->GetTextForwarder() != mpEditSource->GetTextForwarder()) )
+ if( (pR1 == 0) || (pR2 == 0) )
throw lang::IllegalArgumentException();
const ESelection& r1 = pR1->maSelection;
@@ -1581,8 +1627,8 @@ uno::Any SAL_CALL SvxUnoTextRange::queryAggregation( const uno::Type & rType )
throw(uno::RuntimeException)
{
QUERYINT( text::XTextRange );
-// else if( rType == ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0) )
-// return uno::makeAny(uno::Reference< beans::XTolerantMultiPropertySet >(this));
+ else if( rType == ::getCppuType((const uno::Reference< beans::XMultiPropertyStates >*)0) )
+ return uno::makeAny(uno::Reference< beans::XMultiPropertyStates >(this));
else if( rType == ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) )
return uno::makeAny(uno::Reference< beans::XPropertySet >(this));
else QUERYINT( beans::XPropertyState );
@@ -1621,13 +1667,13 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoTextRange::getTypes()
{
if( maTypeSequence.getLength() == 0 )
{
- maTypeSequence.realloc( 8 ); // !DANGER! keep this updated
+ maTypeSequence.realloc( 9 ); // !DANGER! keep this updated
uno::Type* pTypes = maTypeSequence.getArray();
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0);
-// *pTypes++ = ::getCppuType(( const uno::Reference< beans::XTolerantMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0);
@@ -1744,7 +1790,7 @@ uno::Any SAL_CALL SvxUnoTextBase::queryAggregation( const uno::Type & rType )
return uno::makeAny(uno::Reference< text::XTextRange >((text::XText*)(this)));
QUERYINT(container::XEnumerationAccess );
QUERYINT( container::XElementAccess );
-// QUERYINT( beans::XTolerantMultiPropertySet );
+ QUERYINT( beans::XMultiPropertyStates );
QUERYINT( beans::XPropertySet );
QUERYINT( beans::XMultiPropertySet );
QUERYINT( beans::XPropertyState );
@@ -1767,14 +1813,14 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoTextBase::getStaticTypes() throw()
{
if( maTypeSequence.getLength() == 0 )
{
- maTypeSequence.realloc( 14 ); // !DANGER! keep this updated
+ maTypeSequence.realloc( 15 ); // !DANGER! keep this updated
uno::Type* pTypes = maTypeSequence.getArray();
*pTypes++ = ::getCppuType(( const uno::Reference< text::XText >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0);
-// *pTypes++ = ::getCppuType(( const uno::Reference< beans::XTolerantMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeMover >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextAppend >*)0);
diff --git a/svx/source/unoedit/unotext2.cxx b/svx/source/unoedit/unotext2.cxx
index ae06e7f83c..186f980c7c 100644
--- a/svx/source/unoedit/unotext2.cxx
+++ b/svx/source/unoedit/unotext2.cxx
@@ -170,7 +170,7 @@ SvxUnoTextContent::~SvxUnoTextContent() throw()
uno::Any SAL_CALL SvxUnoTextContent::queryAggregation( const uno::Type & rType ) throw( uno::RuntimeException )
{
QUERYINT( text::XTextRange );
-// else QUERYINT( beans::XTolerantMultiPropertySet );
+ else QUERYINT( beans::XMultiPropertyStates );
else QUERYINT( beans::XPropertySet );
else QUERYINT( beans::XMultiPropertySet );
else QUERYINT( beans::XPropertyState );
@@ -208,13 +208,13 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoTextContent::getTypes()
{
if( maTypeSequence.getLength() == 0 )
{
- maTypeSequence.realloc( 10 ); // !DANGER! keep this updated
+ maTypeSequence.realloc( 11 ); // !DANGER! keep this updated
uno::Type* pTypes = maTypeSequence.getArray();
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0);
-// *pTypes++ = ::getCppuType(( const uno::Reference< beans::XTolerantMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeCompare >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextContent >*)0);
@@ -527,7 +527,7 @@ uno::Any SAL_CALL SvxUnoTextCursor::queryAggregation( const uno::Type & rType )
if( rType == ::getCppuType((const uno::Reference< text::XTextRange >*)0) )
return uno::makeAny(uno::Reference< text::XTextRange >((text::XText*)(this)));
else QUERYINT( text::XTextCursor );
-// else QUERYINT( beans::XTolerantMultiPropertySet );
+ else QUERYINT( beans::XMultiPropertyStates );
else QUERYINT( beans::XPropertySet );
else QUERYINT( beans::XMultiPropertySet );
else QUERYINT( beans::XPropertyState );
@@ -561,14 +561,14 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoTextCursor::getTypes()
{
if( maTypeSequence.getLength() == 0 )
{
- maTypeSequence.realloc( 9 ); // !DANGER! keep this updated
+ maTypeSequence.realloc( 10 ); // !DANGER! keep this updated
uno::Type* pTypes = maTypeSequence.getArray();
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextCursor >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0);
-// *pTypes++ = ::getCppuType(( const uno::Reference< beans::XTolerantMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeCompare >*)0);
*pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0);