diff options
Diffstat (limited to 'svx/source/unoedit')
-rw-r--r-- | svx/source/unoedit/unoedprx.cxx | 6 | ||||
-rw-r--r-- | svx/source/unoedit/unofored.cxx | 11 | ||||
-rw-r--r-- | svx/source/unoedit/unoforou.cxx | 11 | ||||
-rw-r--r-- | svx/source/unoedit/unoviwed.cxx | 27 | ||||
-rw-r--r-- | svx/source/unoedit/unoviwou.cxx | 27 |
5 files changed, 59 insertions, 23 deletions
diff --git a/svx/source/unoedit/unoedprx.cxx b/svx/source/unoedit/unoedprx.cxx index 95efd650c443..592dfaf96792 100644 --- a/svx/source/unoedit/unoedprx.cxx +++ b/svx/source/unoedit/unoedprx.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoedprx.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: thb $ $Date: 2002-05-27 16:43:05 $ + * last change: $Author: thb $ $Date: 2002-05-29 15:49:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1095,7 +1095,7 @@ USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const SvxAccessibleTextIndex aEndIndex; USHORT nCurrLine; sal_Int32 nCurrIndex, nLastIndex; - for( nCurrLine=0, nCurrIndex=0, nLastIndex=0; nCurrLine<nLine; ++nCurrLine ) + for( nCurrLine=0, nCurrIndex=0, nLastIndex=0; nCurrLine<=nLine; ++nCurrLine ) { nLastIndex = nCurrIndex; nCurrIndex += mrTextForwarder->GetLineLen( nPara, nCurrLine ); diff --git a/svx/source/unoedit/unofored.cxx b/svx/source/unoedit/unofored.cxx index 4dc490fd1173..f0402bd19760 100644 --- a/svx/source/unoedit/unofored.cxx +++ b/svx/source/unoedit/unofored.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unofored.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: thb $ $Date: 2002-04-26 10:27:21 $ + * last change: $Author: thb $ $Date: 2002-05-29 15:49:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -189,6 +189,13 @@ void SvxEditEngineForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESel rEditEngine.QuickSetAttribs( rSet, rSel ); } +BOOL SvxEditEngineForwarder::IsValid() const +{ + // cannot reliably query EditEngine state + // while in the middle of an update + return rEditEngine.GetUpdateMode(); +} + XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) { return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); diff --git a/svx/source/unoedit/unoforou.cxx b/svx/source/unoedit/unoforou.cxx index eb66a5c23555..ca3a6fda2ee1 100644 --- a/svx/source/unoedit/unoforou.cxx +++ b/svx/source/unoedit/unoforou.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoforou.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: thb $ $Date: 2002-04-26 10:27:21 $ + * last change: $Author: thb $ $Date: 2002-05-29 15:49:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -278,6 +278,13 @@ XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, USHO return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } +BOOL SvxOutlinerForwarder::IsValid() const +{ + // cannot reliably query outliner state + // while in the middle of an update + return rOutliner.GetUpdateMode(); +} + extern USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich ); USHORT SvxOutlinerForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const diff --git a/svx/source/unoedit/unoviwed.cxx b/svx/source/unoedit/unoviwed.cxx index 4f0aee720e36..6f6f5668f3a0 100644 --- a/svx/source/unoedit/unoviwed.cxx +++ b/svx/source/unoedit/unoviwed.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoviwed.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: thb $ $Date: 2002-05-27 16:43:06 $ + * last change: $Author: thb $ $Date: 2002-05-29 15:49:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,8 +100,12 @@ Rectangle SvxEditEngineViewForwarder::GetVisArea() const if( pEditEngine ) { - aVisArea = pOutDev->LogicToLogic( aVisArea, pEditEngine->GetRefMapMode(), pOutDev->GetMapMode() ); - return pOutDev->LogicToPixel( aVisArea ); + MapMode aMapMode(pOutDev->GetMapMode()); + aVisArea = OutputDevice::LogicToLogic( aVisArea, + pEditEngine->GetRefMapMode(), + aMapMode.GetMapUnit() ); + aMapMode.SetOrigin(Point()); + return pOutDev->LogicToPixel( aVisArea, aMapMode ); } } @@ -114,8 +118,11 @@ Point SvxEditEngineViewForwarder::LogicToPixel( const Point& rPoint, const MapMo if( pOutDev ) { - Point aPoint( pOutDev->LogicToLogic( rPoint, rMapMode, pOutDev->GetMapMode() ) ); - return pOutDev->LogicToPixel( aPoint ); + MapMode aMapMode(pOutDev->GetMapMode()); + Point aPoint( OutputDevice::LogicToLogic( rPoint, rMapMode, + aMapMode.GetMapUnit() ) ); + aMapMode.SetOrigin(Point()); + return pOutDev->LogicToPixel( aPoint, aMapMode ); } return Point(); @@ -127,8 +134,12 @@ Point SvxEditEngineViewForwarder::PixelToLogic( const Point& rPoint, const MapMo if( pOutDev ) { - Point aPoint( pOutDev->PixelToLogic( rPoint ) ); - return pOutDev->LogicToLogic( aPoint, pOutDev->GetMapMode(), rMapMode ); + MapMode aMapMode(pOutDev->GetMapMode()); + aMapMode.SetOrigin(Point()); + Point aPoint( pOutDev->PixelToLogic( rPoint, aMapMode ) ); + return OutputDevice::LogicToLogic( aPoint, + aMapMode.GetMapUnit(), + rMapMode ); } return Point(); diff --git a/svx/source/unoedit/unoviwou.cxx b/svx/source/unoedit/unoviwou.cxx index 6860440de8c0..d008fb3467cf 100644 --- a/svx/source/unoedit/unoviwou.cxx +++ b/svx/source/unoedit/unoviwou.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoviwou.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: thb $ $Date: 2002-05-27 16:43:06 $ + * last change: $Author: thb $ $Date: 2002-05-29 15:49:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,8 +99,12 @@ Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const if( pOutliner ) { - aVisArea = pOutDev->LogicToLogic( aVisArea, pOutliner->GetRefMapMode(), pOutDev->GetMapMode() ); - return pOutDev->LogicToPixel( aVisArea ); + MapMode aMapMode(pOutDev->GetMapMode()); + aVisArea = OutputDevice::LogicToLogic( aVisArea, + pOutliner->GetRefMapMode(), + aMapMode.GetMapUnit() ); + aMapMode.SetOrigin(Point()); + return pOutDev->LogicToPixel( aVisArea, aMapMode ); } } @@ -113,8 +117,11 @@ Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const Map if( pOutDev ) { - Point aPoint( pOutDev->LogicToLogic( rPoint, rMapMode, pOutDev->GetMapMode() ) ); - return pOutDev->LogicToPixel( aPoint ); + MapMode aMapMode(pOutDev->GetMapMode()); + Point aPoint( OutputDevice::LogicToLogic( rPoint, rMapMode, + aMapMode.GetMapUnit() ) ); + aMapMode.SetOrigin(Point()); + return pOutDev->LogicToPixel( aPoint, aMapMode ); } return Point(); @@ -126,8 +133,12 @@ Point SvxDrawOutlinerViewForwarder::PixelToLogic( const Point& rPoint, const Map if( pOutDev ) { - Point aPoint( pOutDev->PixelToLogic( rPoint ) ); - return pOutDev->LogicToLogic( aPoint, pOutDev->GetMapMode(), rMapMode ); + MapMode aMapMode(pOutDev->GetMapMode()); + aMapMode.SetOrigin(Point()); + Point aPoint( pOutDev->PixelToLogic( rPoint, aMapMode ) ); + return OutputDevice::LogicToLogic( aPoint, + aMapMode.GetMapUnit(), + rMapMode ); } return Point(); |