Kaydet (Commit) 756ff569 authored tarafından Oliver Bolte's avatar Oliver Bolte

CWS-TOOLING: integrate CWS sw31bf04

2009-01-21 14:24:10 +0100 od  r266670 : #i59051# correction of metric change for PolyPolygonBezier needed
2009-01-21 09:35:44 +0100 od  r266632 : #i96062# adjustment of fix after rebasing
2009-01-21 09:34:56 +0100 od  r266631 : #i94152# adjustment of fix after rebasing
2009-01-20 16:43:12 +0100 od  r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39)
2009-01-20 11:52:22 +0100 od  r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)>
	- assure that at outline list style registered text node have the correct list level set
2009-01-20 10:43:53 +0100 od  r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)>
	 - adjust also the list tab position, if a list tab stop is applied
2009-01-16 16:26:56 +0100 od  r266432 : #i59051# adjust Writer's UNO-API for drawing objects
	 - correct conversion of "StartPosition" and "EndPosition"
	 - conversion of "PolyPolygonBezier"
2009-01-16 16:20:49 +0100 od  r266430 : #i59051# - adjust UNO-API of connector shape
	 -- convert "PolyPolygonBezier" to correct metric
	 -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position
	 - adjust UNO-API of measure shape
	 -- convert "StartPosition" and "EndPosition" to correct metric
2009-01-16 15:01:21 +0100 od  r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)>
	 - only columns as previous section leaves for tables inside sections, which are inside another table.
2009-01-14 14:34:58 +0100 od  r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()>
	 - set list level to outline level, if needed.
2009-01-13 17:09:43 +0100 od  r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)>
	 - adjust evaluation of WW8 attributes
2009-01-13 11:49:48 +0100 od  r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)>
	 - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
2009-01-13 11:48:45 +0100 od  r266202 : #i94187# method <OutWW8_SwTxtNode(..)>
	 - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION
2009-01-12 12:22:58 +0100 od  r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)>
	 - correct determination of anchor's frame top for object positioning.
üst 6c9ddd80
......@@ -73,6 +73,12 @@ class SfxItemSet;
class SdrModel;
class SvxDrawPage;
class SvGlobalName;
// --> OD 2009-01-16 #i59051#
namespace basegfx
{
class B2DPolyPolygon;
} // end of namespace basegfx
// <--
class SvxShapeMutex
{
......@@ -132,6 +138,10 @@ protected:
// Umrechnungen fuer den Writer, der in TWIPS arbeitet
void ForceMetricToItemPoolMetric(Pair& rPoint) const throw();
void ForceMetricTo100th_mm(Pair& rPoint) const throw();
// --> OD 2009-01-16 #i59051#
void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
// <--
::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap ) const;
......
......@@ -550,6 +550,37 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw()
}
}
//----------------------------------------------------------------------
// --> OD 2009-01-16 #i59051#
void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw()
{
DBG_TESTSOLARMUTEX();
if(mpModel)
{
SfxMapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0);
if(eMapUnit != SFX_MAPUNIT_100TH_MM)
{
switch(eMapUnit)
{
case SFX_MAPUNIT_TWIP :
{
basegfx::B2DHomMatrix aTransform;
const double fMMToTWIPS(72.0 / 127.0);
aTransform.scale(fMMToTWIPS, fMMToTWIPS);
rPolyPolygon.transform(aTransform);
break;
}
default:
{
DBG_ERROR("Missing unit translation to PoolMetric!");
}
}
}
}
}
// <--
//----------------------------------------------------------------------
void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
{
......@@ -577,6 +608,37 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
}
}
//----------------------------------------------------------------------
// --> OD 2009-01-16 #i59051#
void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw()
{
DBG_TESTSOLARMUTEX();
SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM;
if(mpModel)
{
eMapUnit = mpModel->GetItemPool().GetMetric(0);
if(eMapUnit != SFX_MAPUNIT_100TH_MM)
{
switch(eMapUnit)
{
case SFX_MAPUNIT_TWIP :
{
basegfx::B2DHomMatrix aTransform;
const double fTWIPSToMM(127.0 / 72.0);
aTransform.scale(fTWIPSToMM, fTWIPSToMM);
rPolyPolygon.transform(aTransform);
break;
}
default:
{
DBG_ERROR("Missing unit translation to 100th mm!");
}
}
}
}
}
// <--
//----------------------------------------------------------------------
void SvxShape::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet) throw()
{
......@@ -2420,10 +2482,15 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if( rValue >>= aUnoPoint )
{
Point aPoint( aUnoPoint.X, aUnoPoint.Y );
// --> OD 2009-01-16 #i59051#
// perform metric change before applying anchor position,
// because the anchor position is in pool metric.
ForceMetricToItemPoolMetric( aPoint );
// <--
if( mpModel->IsWriter() )
aPoint += mpObj->GetAnchorPos();
ForceMetricToItemPoolMetric( aPoint );
// ForceMetricToItemPoolMetric( aPoint );
pEdgeObj->SetTailPoint( pProperty->nWID == OWN_ATTR_EDGE_START_POS, aPoint );
return true;
}
......@@ -2447,6 +2514,9 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if ( rValue >>= aPolyPoly )
{
basegfx::B2DPolyPolygon aNewPolyPolygon( SvxConvertPolyPolygonBezierToB2DPolyPolygon( &aPolyPoly ) );
// --> OD 2009-01-16 #i59051#
ForceMetricToItemPoolMetric( aNewPolyPolygon );
// <--
if( mpModel->IsWriter() )
{
Point aPoint( mpObj->GetAnchorPos() );
......@@ -2471,6 +2541,9 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if(pMeasureObj && ( rValue >>= aUnoPoint ) )
{
Point aPoint( aUnoPoint.X, aUnoPoint.Y );
// --> OD 2009-01-12 #i59051#
ForceMetricToItemPoolMetric( aPoint );
// <--
if( mpModel->IsWriter() )
aPoint += mpObj->GetAnchorPos();
......@@ -2891,6 +2964,9 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
aMatrix.translate( -aPoint.X(), -aPoint.Y() );
aPolyPoly.transform( aMatrix );
}
// --> OD 2009-01-16 #i59051#
ForceMetricTo100th_mm( aPolyPoly );
// <--
drawing::PolyPolygonBezierCoords aRetval;
SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval);
rValue <<= aRetval;
......@@ -2911,6 +2987,9 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
if( mpModel->IsWriter() )
aPoint -= mpObj->GetAnchorPos();
// --> OD 2009-01-12 #i59051#
ForceMetricTo100th_mm( aPoint );
// <--
awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
rValue <<= aUnoPoint;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment