summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <thb@openoffice.org>2002-05-29 14:49:18 +0000
committerThorsten Behrens <thb@openoffice.org>2002-05-29 14:49:18 +0000
commit1cf8936ca70d797b6e092343e6541288cb0c8eea (patch)
treeb9102b70ece6058312beaf916ac0612e99265ba1
parent937bc19633160d691896aeb376bc613a2b44e998 (diff)
#96948# Forwarder valid only if EE/Outliner in UpdateMode
-rw-r--r--svx/source/unoedit/unoedprx.cxx6
-rw-r--r--svx/source/unoedit/unofored.cxx11
-rw-r--r--svx/source/unoedit/unoforou.cxx11
-rw-r--r--svx/source/unoedit/unoviwed.cxx27
-rw-r--r--svx/source/unoedit/unoviwou.cxx27
5 files changed, 59 insertions, 23 deletions
diff --git a/svx/source/unoedit/unoedprx.cxx b/svx/source/unoedit/unoedprx.cxx
index 1a093a65fb..364613679b 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 ea3f83ab25..9e2b3beef9 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 4980ea0c71..88cd5175d8 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 024771ea5c..2bfd3ce86e 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 6860440de8..d394ec234d 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();