summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uno')
-rw-r--r--sw/source/ui/uno/unoatxt.cxx41
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx15
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx69
-rw-r--r--sw/source/ui/uno/unotxvw.cxx286
4 files changed, 199 insertions, 212 deletions
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index ffae96e30010..dfdbacab354b 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -56,12 +56,13 @@
#include <swevent.hxx>
#include <doc.hxx>
#include <unocrsr.hxx>
-#include <bookmrk.hxx>
+#include <IMark.hxx>
#include <unoprnms.hxx>
#include <docsh.hxx>
#include <swunodef.hxx>
#include <swmodule.hxx>
#include <svtools/smplhint.hxx>
+#include <svtools/macitem.hxx>
#include <svx/acorrcfg.hxx>
@@ -323,7 +324,7 @@ sal_Int64 SAL_CALL SwXAutoTextGroup::getSomething( const uno::Sequence< sal_Int8
-----------------------------------------------------------------------*/
SwXAutoTextGroup::SwXAutoTextGroup(const OUString& rName,
SwGlossaries* pGlos) :
- aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_AUTO_TEXT_GROUP)),
+ pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_AUTO_TEXT_GROUP)),
pGlossaries(pGlos),
sName(rName),
m_sGroupName(rName)
@@ -398,10 +399,8 @@ void SwXAutoTextGroup::renameByName(const OUString& aElementName,
else
throw uno::RuntimeException();
}
-/* -----------------04.05.99 11:57-------------------
- *
- * --------------------------------------------------*/
-sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextRange* pxRange )
+
+sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextRange* pxRange)
{
ASSERT( pInsDoc, "kein Ins.Dokument" );
@@ -421,10 +420,10 @@ sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextR
}
else
{
- SwBookmark* pBkm = pxRange->GetBookmark();
- if(pBkm && pBkm->GetOtherBookmarkPos())
+ const ::sw::mark::IMark* const pBkmk = pxRange->GetBookmark();
+ if(pBkmk && pBkmk->IsExpanded())
{
- SwPaM aTmp(*pBkm->GetOtherBookmarkPos(), pBkm->GetBookmarkPos());
+ SwPaM aTmp(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos());
bRet |= (true == pxRange->GetDoc()->Copy(aTmp, aPos));
}
}
@@ -722,7 +721,7 @@ sal_Bool SwXAutoTextGroup::hasByName(const OUString& rName)
uno::Reference< beans::XPropertySetInfo > SwXAutoTextGroup::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
- static uno::Reference< beans::XPropertySetInfo > xRet = aPropSet.getPropertySetInfo();
+ static uno::Reference< beans::XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
/*-- 09.02.00 15:33:31---------------------------------------------------
@@ -734,16 +733,15 @@ void SwXAutoTextGroup::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aPropSet.getPropertyMap(), rPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName );
- if(!pMap)
+ if(!pEntry)
throw beans::UnknownPropertyException();
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case WID_GROUP_TITLE:
{
@@ -767,17 +765,16 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aPropSet.getPropertyMap(), rPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
- if(!pMap)
+ if(!pEntry)
throw beans::UnknownPropertyException();
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
uno::Any aAny;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case WID_GROUP_PATH:
aAny <<= OUString(pGlosGroup->GetFileName());
@@ -1134,11 +1131,11 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
SwPaM* pInsertPaM = 0;
if(pRange)
{
- SwBookmark* pBkm = pRange->GetBookmark();
- if(pBkm->GetOtherBookmarkPos())
- pInsertPaM = new SwPaM(*pBkm->GetOtherBookmarkPos(), pBkm->GetBookmarkPos());
+ const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark();
+ if(pBkmk->IsExpanded())
+ pInsertPaM = new SwPaM(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos());
else
- pInsertPaM = new SwPaM(pBkm->GetBookmarkPos());
+ pInsertPaM = new SwPaM(pBkmk->GetMarkPos());
}
else
{
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 54da1ede78a8..3acb1e25bd31 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -418,7 +418,7 @@ SwXMailMerge::SwXMailMerge() :
aEvtListeners ( GetMailMergeMutex() ),
aMergeListeners ( GetMailMergeMutex() ),
aPropListeners ( GetMailMergeMutex() ),
- pMap( aSwMapProvider.GetPropertyMap( PROPERTY_MAP_MAILMERGE ) ),
+ pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_MAILMERGE ) ),
bSendAsHTML(sal_False),
bSendAsAttachment(sal_False),
bSaveAsSingleFile(sal_False)
@@ -887,7 +887,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXMailMerge::getPropertySetI
throw (RuntimeException)
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- static Reference< XPropertySetInfo > aRef = new SfxItemPropertySetInfo( pMap );
+ static Reference< XPropertySetInfo > aRef = pPropSet->getPropertySetInfo();
return aRef;
}
@@ -897,8 +897,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pCur =
- SfxItemPropertyMap::GetByName( pMap, rPropertyName );
+ const SfxItemPropertySimpleEntry* pCur = pPropSet->getPropertyMap()->getByName( rPropertyName );
if (!pCur)
throw UnknownPropertyException();
else if (pCur->nFlags & PropertyAttribute::READONLY)
@@ -1055,7 +1054,7 @@ uno::Any SAL_CALL SwXMailMerge::getPropertyValue(
Any aRet;
- const SfxItemPropertyMap* pCur = SfxItemPropertyMap::GetByName( pMap, rPropertyName );
+ const SfxItemPropertySimpleEntry* pCur = pPropSet->getPropertyMap()->getByName( rPropertyName );
if (!pCur)
throw UnknownPropertyException();
else
@@ -1109,8 +1108,7 @@ void SAL_CALL SwXMailMerge::addPropertyChangeListener(
vos::OGuard aGuard( Application::GetSolarMutex() );
if (!bDisposing && rListener.is())
{
- const SfxItemPropertyMap* pCur =
- SfxItemPropertyMap::GetByName( pMap, rPropertyName );
+ const SfxItemPropertySimpleEntry* pCur = pPropSet->getPropertyMap()->getByName( rPropertyName );
if (pCur)
aPropListeners.addInterface( pCur->nWID, rListener );
else
@@ -1126,8 +1124,7 @@ void SAL_CALL SwXMailMerge::removePropertyChangeListener(
vos::OGuard aGuard( Application::GetSolarMutex() );
if (!bDisposing && rListener.is())
{
- const SfxItemPropertyMap* pCur =
- SfxItemPropertyMap::GetByName( pMap, rPropertyName );
+ const SfxItemPropertySimpleEntry* pCur = pPropSet->getPropertyMap()->getByName( rPropertyName );
if (pCur)
aPropListeners.removeInterface( pCur->nWID, rListener );
else
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 9479350620b3..ed997c6392ba 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -329,7 +329,7 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell) :
aRefreshCont ( static_cast < XTextDocument* > ( this ) ),
- aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_DOCUMENT)),
+ pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_DOCUMENT)),
pDocShell(pShell),
@@ -1942,7 +1942,7 @@ Reference< XIndexAccess > SwXTextDocument::getDocumentIndexes(void) throw( Runt
-----------------------------------------------------------------------*/
Reference< XPropertySetInfo > SwXTextDocument::getPropertySetInfo(void) throw( RuntimeException )
{
- static Reference< XPropertySetInfo > xRet = aPropSet.getPropertySetInfo();
+ static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
/*-- 10.05.99 13:58:58---------------------------------------------------
@@ -1956,14 +1956,13 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aPropSet.getPropertyMap(), rPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
- if(!pMap)
+ if(!pEntry)
throw UnknownPropertyException();
- if(pMap->nFlags & PropertyAttribute::READONLY)
+ if(pEntry->nFlags & PropertyAttribute::READONLY)
throw PropertyVetoException();
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case WID_DOC_CHAR_COUNT :
case WID_DOC_PARA_COUNT :
@@ -1981,14 +1980,14 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
{
sal_Bool bSet = *(sal_Bool*)aValue.getValue();
sal_uInt16 eMode = pDocShell->GetDoc()->GetRedlineMode();
- if(WID_DOC_CHANGES_SHOW == pMap->nWID)
+ if(WID_DOC_CHANGES_SHOW == pEntry->nWID)
{
eMode &= ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE);
eMode |= nsRedlineMode_t::REDLINE_SHOW_INSERT;
if( bSet )
eMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
}
- else if(WID_DOC_CHANGES_RECORD == pMap->nWID)
+ else if(WID_DOC_CHANGES_RECORD == pEntry->nWID)
{
eMode = bSet ? eMode|nsRedlineMode_t::REDLINE_ON : eMode&~nsRedlineMode_t::REDLINE_ON;
}
@@ -2118,9 +2117,9 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
default:
{
- const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pMap->nWID);
+ const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pEntry->nWID);
SfxPoolItem* pNewItem = rItem.Clone();
- pNewItem->PutValue(aValue, pMap->nMemberId);
+ pNewItem->PutValue(aValue, pEntry->nMemberId);
pDocShell->GetDoc()->SetDefault(*pNewItem);
delete pNewItem;
}
@@ -2135,13 +2134,12 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aPropSet.getPropertyMap(), rPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
- if(!pMap)
+ if(!pEntry)
throw UnknownPropertyException();
Any aAny;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case WID_DOC_CHAR_COUNT :
case WID_DOC_PARA_COUNT :
@@ -2151,7 +2149,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
if(aStat.bModified)
pDocShell->GetDoc()->UpdateDocStat( aStat );
sal_Int32 nValue;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case WID_DOC_CHAR_COUNT :nValue = aStat.nChar;break;
case WID_DOC_PARA_COUNT :nValue = aStat.nPara;break;
@@ -2170,12 +2168,12 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
sal_uInt16 eMode = pDocShell->GetDoc()->GetRedlineMode();
sal_Bool bSet = sal_False;
- if(WID_DOC_CHANGES_SHOW == pMap->nWID)
+ if(WID_DOC_CHANGES_SHOW == pEntry->nWID)
{
sal_uInt16 nMask = nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE;
bSet = (eMode & nMask) == nMask;
}
- else if(WID_DOC_CHANGES_RECORD == pMap->nWID)
+ else if(WID_DOC_CHANGES_RECORD == pEntry->nWID)
{
bSet = (eMode& nsRedlineMode_t::REDLINE_ON) != 0;
}
@@ -2273,8 +2271,8 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
default:
{
- const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pMap->nWID);
- rItem.QueryValue(aAny, pMap->nMemberId);
+ const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pEntry->nWID);
+ rItem.QueryValue(aAny, pEntry->nMemberId);
}
}
return aAny;
@@ -2397,13 +2395,12 @@ PropertyState SAL_CALL SwXTextDocument::getPropertyState( const OUString& rPrope
PropertyState eRet = PropertyState_DIRECT_VALUE;
if(!IsValid())
throw RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aPropSet.getPropertyMap(), rPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
- if(!pMap)
+ if(!pEntry)
throw UnknownPropertyException();
Any aAny;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case 0:default:break;
}
@@ -2428,11 +2425,10 @@ void SAL_CALL SwXTextDocument::setPropertyToDefault( const OUString& rPropertyNa
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aPropSet.getPropertyMap(), rPropertyName);
- if(!pMap)
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
+ if(!pEntry)
throw UnknownPropertyException();
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case 0:default:break;
}
@@ -2443,12 +2439,11 @@ Any SAL_CALL SwXTextDocument::getPropertyDefault( const OUString& rPropertyName
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aPropSet.getPropertyMap(), rPropertyName);
- if(!pMap)
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
+ if(!pEntry)
throw UnknownPropertyException();
Any aAny;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case 0:default:break;
}
@@ -3253,7 +3248,7 @@ Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames(void)
SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
Reference< XNameAccess > xAccess, const String& rLinkDisplayName, String sSuffix ) :
xRealAccess(xAccess),
- aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_LINK_TARGET)),
+ pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
sLinkSuffix(sSuffix),
sLinkDisplayName(rLinkDisplayName),
pxDoc(0)
@@ -3264,7 +3259,7 @@ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
--------------------------------------------------*/
SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
const String& rLinkDisplayName, String sSuffix) :
- aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_LINK_TARGET)),
+ pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
sLinkSuffix(sSuffix),
sLinkDisplayName(rLinkDisplayName),
xDoc(&rxDoc),
@@ -3442,7 +3437,7 @@ sal_Bool SwXLinkNameAccessWrapper::hasElements(void) throw( RuntimeException )
Reference< XPropertySetInfo > SwXLinkNameAccessWrapper::getPropertySetInfo(void)
throw( RuntimeException )
{
- static Reference< XPropertySetInfo > xRet = aPropSet.getPropertySetInfo();
+ static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
/*-- 26.10.99 09:16:26---------------------------------------------------
@@ -3583,7 +3578,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames(void)
--------------------------------------------------*/
SwXOutlineTarget::SwXOutlineTarget(const String& rOutlineText) :
- aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_LINK_TARGET)),
+ pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
sOutlineText(rOutlineText)
{
}
@@ -3598,7 +3593,7 @@ SwXOutlineTarget::~SwXOutlineTarget()
-----------------------------------------------------------------------*/
Reference< XPropertySetInfo > SwXOutlineTarget::getPropertySetInfo(void) throw( RuntimeException )
{
- static Reference< XPropertySetInfo > xRet = aPropSet.getPropertySetInfo();
+ static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
/*-- 26.10.99 15:51:46---------------------------------------------------
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 42b0d699689a..eaba514a6e6a 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -66,7 +66,7 @@
#include <sfx2/request.hxx>
#include <frmatr.hxx>
#include <vos/mutex.hxx>
-#include <bookmrk.hxx>
+#include <IMark.hxx>
#include <unotxdoc.hxx>
#include <unodraw.hxx>
#include <svx/unoshcol.hxx>
@@ -134,8 +134,8 @@ SwPaM* lcl_createPamCopy(const SwPaM& rPam)
-----------------------------------------------------------------------*/
SwXTextView::SwXTextView(SwView* pSwView) :
SfxBaseController(pSwView),
- pView(pSwView),
- pMap( aSwMapProvider.GetPropertyMap( PROPERTY_MAP_TEXT_VIEW ) ),
+ m_pView(pSwView),
+ m_pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_VIEW ) ),
pxViewSettings(0),
pxTextViewCursor(0)
{
@@ -188,7 +188,7 @@ void SwXTextView::Invalidate()
}
m_refCount--;
- pView = 0;
+ m_pView = 0;
}
/* -----------------------------18.05.00 10:18--------------------------------
@@ -435,13 +435,12 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
xIfcTunnel->getSomething(SwXBookmark::getUnoTunnelId()));
if(pBkm && pBkm->GetDoc() == pDoc)
{
-
- sal_uInt16 nFndPos = rSh.FindBookmark(pBkm->getName());
-
- if( USHRT_MAX != nFndPos )
+ IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
+ IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(pBkm->getName());
+ if( ppMark != pMarkAccess->getMarksEnd() )
{
rSh.EnterStdMode();
- rSh.GotoBookmark( nFndPos );
+ rSh.GotoMark( ppMark->get() );
}
return sal_True;
}
@@ -498,7 +497,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
SdrObject *pObj = pSvxShape->GetSdrObject();
if (pObj)
{
-// lcl_ShowObject( *pViewSh, *pDrawView, pObj );
+// lcl_ShowObject( *m_pViewSh, *pDrawView, pObj );
SdrPageView* pPV = pDrawView->GetSdrPageView();
if ( pPV && pObj->GetPage() == pPV->GetPage() )
{
@@ -531,7 +530,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
{
if (!pPV) // erstes Objekt
{
-// lcl_ShowObject( *pViewSh, *pDrawView, pObj );
+// lcl_ShowObject( *m_pViewSh, *pDrawView, pObj );
pPV = pDrawView->GetSdrPageView();
}
if ( pPV && pObj->GetPage() == pPV->GetPage() )
@@ -561,10 +560,10 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
if(GetView())
{
//force immediat shell update
- pView->StopShellTimer();
+ m_pView->StopShellTimer();
// ein interface aus der aktuellen Selektion erzeugen
- SwWrtShell& rSh = pView->GetWrtShell();
- ShellModes eSelMode = pView->GetShellMode();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
+ ShellModes eSelMode = m_pView->GetShellMode();
switch(eSelMode)
{
case SHELL_MODE_TABLE_TEXT :
@@ -632,7 +631,7 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
case SHELL_MODE_BEZIER :
{
uno::Reference< drawing::XDrawPageSupplier > xPageSupp;
- uno::Reference< frame::XModel > xModel = pView->GetDocShell()->GetBaseModel();
+ uno::Reference< frame::XModel > xModel = m_pView->GetDocShell()->GetBaseModel();
uno::Reference< lang::XUnoTunnel > xModelTunnel(xModel, uno::UNO_QUERY);
SwXTextDocument* pTextDoc = reinterpret_cast<SwXTextDocument*>(xModelTunnel->
getSomething(SwXTextDocument::getUnoTunnelId()));
@@ -787,12 +786,12 @@ uno::Reference< text::XTextViewCursor > SwXTextView::getViewCursor(void) throw(
uno::Reference< beans::XPropertySet > SwXTextView::getViewSettings(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if(!pxViewSettings)
{
((SwXTextView*)this)->pxViewSettings = new uno::Reference< beans::XPropertySet > ;
- *pxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( sal_False, pView ) );
+ *pxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( sal_False, m_pView ) );
}
}
else
@@ -808,15 +807,15 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
if(!GetView())
throw RuntimeException();
- SwWrtShell& rSh = pView->GetWrtShell();
- ShellModes eSelMode = pView->GetShellMode();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
+ ShellModes eSelMode = m_pView->GetShellMode();
if (eSelMode != SHELL_MODE_LIST_TEXT &&
eSelMode != SHELL_MODE_TABLE_LIST_TEXT &&
eSelMode != SHELL_MODE_TABLE_TEXT &&
eSelMode != SHELL_MODE_TEXT )
return Sequence< Sequence< PropertyValue > > ();
- SwDoc* pDoc = pView->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
SwRubyList aList;
USHORT nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
@@ -858,8 +857,8 @@ void SAL_CALL SwXTextView::setRubyList(
if(!GetView() || !rRubyList.getLength())
throw RuntimeException();
- SwWrtShell& rSh = pView->GetWrtShell();
- ShellModes eSelMode = pView->GetShellMode();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
+ ShellModes eSelMode = m_pView->GetShellMode();
if (eSelMode != SHELL_MODE_LIST_TEXT &&
eSelMode != SHELL_MODE_TABLE_LIST_TEXT &&
eSelMode != SHELL_MODE_TABLE_TEXT &&
@@ -919,7 +918,7 @@ void SAL_CALL SwXTextView::setRubyList(
}
aList.Insert(pEntry, (USHORT)nPos);
}
- SwDoc* pDoc = pView->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 );
}
/*-- 29.12.02 15:45:29---------------------------------------------------
@@ -927,7 +926,7 @@ void SAL_CALL SwXTextView::setRubyList(
-----------------------------------------------------------------------*/
SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ )
{
- SwWrtShell* pOldSh = &pView->GetWrtShell();
+ SwWrtShell* pOldSh = &m_pView->GetWrtShell();
SfxPrinter *pPrt = pOldSh->getIDocumentDeviceAccess()->getPrinter( false );
SwDocShell* pDocSh;
SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
@@ -965,14 +964,14 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/
-----------------------------------------------------------------------*/
void SwXTextView::NotifySelChanged()
{
- DBG_ASSERT( pView, "view is missing" );
+ DBG_ASSERT( m_pView, "view is missing" );
// destroy temporary document with selected text that is used
// in PDF export of (multi-)selections.
- if (pView && pView->GetTmpSelectionDoc().Is())
+ if (m_pView && m_pView->GetTmpSelectionDoc().Is())
{
- pView->GetTmpSelectionDoc()->DoClose();
- pView->GetTmpSelectionDoc() = 0;
+ m_pView->GetTmpSelectionDoc()->DoClose();
+ m_pView->GetTmpSelectionDoc() = 0;
}
uno::Reference< uno::XInterface > xInt = (cppu::OWeakObject*)(SfxBaseController*)this;
@@ -1012,7 +1011,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXTextView::getPropertySetIn
throw (uno::RuntimeException)
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- static uno::Reference< XPropertySetInfo > aRef = new SfxItemPropertySetInfo( pMap );
+ static uno::Reference< XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
return aRef;
}
@@ -1022,15 +1021,14 @@ void SAL_CALL SwXTextView::setPropertyValue(
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
vos::OGuard aGuard( Application::GetSolarMutex() );
-
- const SfxItemPropertyMap* pCur = SfxItemPropertyMap::GetByName( pMap, rPropertyName );
- if (!pCur)
+ const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
+ if (!pEntry)
throw UnknownPropertyException();
- else if (pCur->nFlags & PropertyAttribute::READONLY)
+ else if (pEntry->nFlags & PropertyAttribute::READONLY)
throw PropertyVetoException();
else
{
- switch (pCur->nWID)
+ switch (pEntry->nWID)
{
case WID_IS_HIDE_SPELL_MARKS :
// deprecated #i91949
@@ -1038,13 +1036,13 @@ void SAL_CALL SwXTextView::setPropertyValue(
case WID_IS_CONSTANT_SPELLCHECK :
{
sal_Bool bVal = sal_False;
- const SwViewOption *pOpt = pView->GetWrtShell().GetViewOptions();
+ const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions();
if (!pOpt || !(rValue >>= bVal))
throw RuntimeException();
SwViewOption aNewOpt( *pOpt );
- if (pCur->nWID == WID_IS_CONSTANT_SPELLCHECK)
+ if (pEntry->nWID == WID_IS_CONSTANT_SPELLCHECK)
aNewOpt.SetOnlineSpell(bVal);
- pView->GetWrtShell().ApplyViewOptions( aNewOpt );
+ m_pView->GetWrtShell().ApplyViewOptions( aNewOpt );
}
break;
default :
@@ -1062,12 +1060,12 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
Any aRet;
- const SfxItemPropertyMap* pCur = SfxItemPropertyMap::GetByName( pMap, rPropertyName );
- if (!pCur)
+ const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
+ if (!pEntry)
throw UnknownPropertyException();
else
{
- sal_Int16 nWID = pCur->nWID;
+ sal_Int16 nWID = pEntry->nWID;
switch (nWID)
{
case WID_PAGE_COUNT :
@@ -1075,13 +1073,13 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
{
// format document completely in order to get meaningful
// values for page count and line count
- pView->GetWrtShell().CalcLayout();
+ m_pView->GetWrtShell().CalcLayout();
sal_Int32 nCount = -1;
if (nWID == WID_PAGE_COUNT)
- nCount = pView->GetDocShell()->GetDoc()->GetPageCount();
+ nCount = m_pView->GetDocShell()->GetDoc()->GetPageCount();
else // WID_LINE_COUNT
- nCount = pView->GetWrtShell().GetLineCount( FALSE /*of whole document*/ );
+ nCount = m_pView->GetWrtShell().GetLineCount( FALSE /*of whole document*/ );
aRet <<= nCount;
}
break;
@@ -1090,7 +1088,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
break;
case WID_IS_CONSTANT_SPELLCHECK :
{
- const SwViewOption *pOpt = pView->GetWrtShell().GetViewOptions();
+ const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions();
if (!pOpt)
throw RuntimeException();
UINT32 nFlag = VIEWOPT_1_ONLINESPELL;
@@ -1176,8 +1174,8 @@ Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeE
-----------------------------------------------------------------------*/
SwXTextViewCursor::SwXTextViewCursor(SwView* pVw) :
- pView(pVw),
- aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_CURSOR))
+ m_pView(pVw),
+ m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
{
}
/*-- 17.12.98 09:36:24---------------------------------------------------
@@ -1203,12 +1201,12 @@ sal_Bool SwXTextViewCursor::IsTextSelection( sal_Bool bAllowTables ) const
{
sal_Bool bRes = sal_False;
- DBG_ASSERT(pView, "pView is NULL ???");
- if(pView)
+ DBG_ASSERT(m_pView, "m_pView is NULL ???");
+ if(m_pView)
{
- //! pView->GetShellMode() will only work after the shell
+ //! m_pView->GetShellMode() will only work after the shell
//! has already changed and thus can not be used here!
- SelectionType eSelType = pView->GetWrtShell().GetSelectionType();
+ SelectionType eSelType = m_pView->GetWrtShell().GetSelectionType();
bRes = ( (nsSelectionType::SEL_TXT & eSelType) ||
(nsSelectionType::SEL_NUM & eSelType) ) &&
(!(nsSelectionType::SEL_TBL_CELLS & eSelType) || bAllowTables);
@@ -1240,9 +1238,9 @@ awt::Point SwXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
awt::Point aRet;
- if(pView)
+ if(m_pView)
{
- const SwWrtShell& rSh = pView->GetWrtShell();
+ const SwWrtShell& rSh = m_pView->GetWrtShell();
const SwRect aCharRect(rSh.GetCharRect());
const SwFrmFmt& rMaster = rSh.GetPageDesc( rSh.GetCurPageDesc() ).GetMaster();
@@ -1265,12 +1263,12 @@ awt::Point SwXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
if(rSh.HasSelection())
{
SwPaM* pShellCrsr = rSh.GetCrsr();
@@ -1290,12 +1288,12 @@ void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
if(rSh.HasSelection())
{
SwPaM* pShellCrsr = rSh.GetCrsr();
@@ -1316,12 +1314,12 @@ sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- const SwWrtShell& rSh = pView->GetWrtShell();
+ const SwWrtShell& rSh = m_pView->GetWrtShell();
bRet = !rSh.HasSelection();
}
else
@@ -1336,13 +1334,13 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( un
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
+ bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
}
else
throw uno::RuntimeException();
@@ -1355,13 +1353,13 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( u
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
+ bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
}
else
throw uno::RuntimeException();
@@ -1377,17 +1375,17 @@ void SwXTextViewCursor::gotoRange(
throw(RuntimeException)
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView && xRange.is())
+ if(m_pView && xRange.is())
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- SwUnoInternalPaM rDestPam(*pView->GetDocShell()->GetDoc());
+ SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc());
if(!SwXTextRange::XTextRangeToSwPaM( rDestPam, xRange))
throw IllegalArgumentException();
- ShellModes eSelMode = pView->GetShellMode();
- SwWrtShell& rSh = pView->GetWrtShell();
+ ShellModes eSelMode = m_pView->GetShellMode();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
// call EnterStdMode in non-text selections only
if(!bExpand ||
(eSelMode != SHELL_MODE_TABLE_TEXT &&
@@ -1441,8 +1439,8 @@ void SwXTextViewCursor::gotoRange(
}
else if(pRange && pRange->GetBookmark())
{
- SwBookmark* pBkm = pRange->GetBookmark();
- pSrcNode = &pBkm->GetBookmarkPos().nNode.GetNode();
+ const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark();
+ pSrcNode = &(pBkmk->GetMarkPos().nNode.GetNode());
}
else if (pPara && pPara->GetCrsr())
{
@@ -1513,12 +1511,12 @@ void SwXTextViewCursor::gotoRange(
void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- pView->GetWrtShell().SttDoc( bExpand );
+ m_pView->GetWrtShell().SttDoc( bExpand );
}
else
throw uno::RuntimeException();
@@ -1529,12 +1527,12 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException
void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- pView->GetWrtShell().EndDoc( bExpand );
+ m_pView->GetWrtShell().EndDoc( bExpand );
}
else
throw uno::RuntimeException();
@@ -1546,9 +1544,9 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
if (rSh.IsSelFrmMode())
{
rSh.UnSelectFrm();
@@ -1568,9 +1566,9 @@ sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
if (rSh.IsSelFrmMode())
{
rSh.UnSelectFrm();
@@ -1591,8 +1589,8 @@ sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeExcep
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
- bRet = pView->GetWrtShell().GotoPage(nPage, TRUE);
+ if(m_pView)
+ bRet = m_pView->GetWrtShell().GotoPage(nPage, TRUE);
else
throw uno::RuntimeException();
return bRet;
@@ -1604,8 +1602,8 @@ sal_Bool SwXTextViewCursor::jumpToNextPage(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
- bRet = pView->GetWrtShell().SttNxtPg();
+ if(m_pView)
+ bRet = m_pView->GetWrtShell().SttNxtPg();
else
throw uno::RuntimeException();
return bRet;
@@ -1617,8 +1615,8 @@ sal_Bool SwXTextViewCursor::jumpToPreviousPage(void) throw( uno::RuntimeExceptio
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
- bRet = pView->GetWrtShell().EndPrvPg();
+ if(m_pView)
+ bRet = m_pView->GetWrtShell().EndPrvPg();
else
throw uno::RuntimeException();
return bRet;
@@ -1630,8 +1628,8 @@ sal_Bool SwXTextViewCursor::jumpToEndOfPage(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
- bRet = pView->GetWrtShell().EndPg();
+ if(m_pView)
+ bRet = m_pView->GetWrtShell().EndPg();
else
throw uno::RuntimeException();
return bRet;
@@ -1643,8 +1641,8 @@ sal_Bool SwXTextViewCursor::jumpToStartOfPage(void) throw( uno::RuntimeException
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
- bRet = pView->GetWrtShell().SttPg();
+ if(m_pView)
+ bRet = m_pView->GetWrtShell().SttPg();
else
throw uno::RuntimeException();
return bRet;
@@ -1656,9 +1654,9 @@ sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
short nRet = 0;
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
nRet = (short)pShellCrsr->GetPageNum( TRUE, 0 );
}
@@ -1673,10 +1671,10 @@ sal_Bool SwXTextViewCursor::screenDown(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
- SfxRequest aReq(FN_PAGEDOWN, SFX_CALLMODE_SLOT, pView->GetPool());
- pView->Execute(aReq);
+ SfxRequest aReq(FN_PAGEDOWN, SFX_CALLMODE_SLOT, m_pView->GetPool());
+ m_pView->Execute(aReq);
const SfxPoolItem* pRet = aReq.GetReturnValue();
bRet = pRet && ((const SfxBoolItem*)pRet)->GetValue();
}
@@ -1691,10 +1689,10 @@ sal_Bool SwXTextViewCursor::screenUp(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
- SfxRequest aReq(FN_PAGEUP, SFX_CALLMODE_SLOT, pView->GetPool());
- pView->Execute(aReq);
+ SfxRequest aReq(FN_PAGEUP, SFX_CALLMODE_SLOT, m_pView->GetPool());
+ m_pView->Execute(aReq);
const SfxPoolItem* pRet = aReq.GetReturnValue();
bRet = pRet && ((const SfxBoolItem*)pRet)->GetValue();
}
@@ -1709,14 +1707,14 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt
{
::vos::OGuard aGuard(Application::GetSolarMutex());
uno::Reference< text::XText > xRet;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection( sal_False ))
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwDoc* pDoc = pView->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
uno::Reference< text::XTextRange > xRg = SwXTextRange::CreateTextRangeFromPosition(pDoc,
*pShellCrsr->Start(), 0);
xRet = xRg->getText();
@@ -1732,14 +1730,14 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno
{
::vos::OGuard aGuard(Application::GetSolarMutex());
uno::Reference< text::XTextRange > xRet;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwDoc* pDoc = pView->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc,
*pShellCrsr->Start(), 0);
}
@@ -1754,14 +1752,14 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno::
{
::vos::OGuard aGuard(Application::GetSolarMutex());
uno::Reference< text::XTextRange > xRet;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwDoc* pDoc = pView->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc,
*pShellCrsr->End(), 0);
}
@@ -1776,12 +1774,12 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
OUString uRet;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection( sal_False ))
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- ShellModes eSelMode = pView->GetShellMode();
+ ShellModes eSelMode = m_pView->GetShellMode();
switch(eSelMode)
{
//! since setString for SEL_TABLE_TEXT (with possible
@@ -1793,7 +1791,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
case SHELL_MODE_TABLE_LIST_TEXT:
case SHELL_MODE_TEXT :
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwXTextCursor::getTextFromPam(*pShellCrsr, uRet);
}
@@ -1808,12 +1806,12 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection( sal_False ))
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- ShellModes eSelMode = pView->GetShellMode();
+ ShellModes eSelMode = m_pView->GetShellMode();
switch(eSelMode)
{
//! since setString for SEL_TABLE_TEXT (with possible
@@ -1825,7 +1823,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx
case SHELL_MODE_TABLE_LIST_TEXT :
case SHELL_MODE_TEXT :
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwCursor* pShellCrsr = rSh.GetSwCrsr();
SwXTextCursor::SetString( *pShellCrsr, aString );
}
@@ -1839,7 +1837,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx
-----------------------------------------------------------------------*/
uno::Reference< XPropertySetInfo > SwXTextViewCursor::getPropertySetInfo( ) throw(RuntimeException)
{
- static uno::Reference< XPropertySetInfo > xRef = aPropSet.getPropertySetInfo();
+ static uno::Reference< XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
return xRef;
}
/*-- 29.06.00 17:33:39---------------------------------------------------
@@ -1850,13 +1848,13 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const
IllegalArgumentException, WrappedTargetException, RuntimeException)
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwNode *pNode = pShellCrsr->GetNode();
if (pNode && pNode->IsTxtNode())
- SwXTextCursor::SetPropertyValue(*pShellCrsr, aPropSet, rPropertyName, aValue );
+ SwXTextCursor::SetPropertyValue(*pShellCrsr, *m_pPropSet, rPropertyName, aValue );
else
throw RuntimeException();
}
@@ -1871,11 +1869,11 @@ Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
Any aRet;
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyValue( *pShellCrsr, aPropSet, rPropertyName);
+ aRet = SwXTextCursor::GetPropertyValue( *pShellCrsr, *m_pPropSet, rPropertyName);
}
else
throw RuntimeException();
@@ -1920,11 +1918,11 @@ PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyNam
{
::vos::OGuard aGuard(Application::GetSolarMutex());
PropertyState eState;
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- eState = SwXTextCursor::GetPropertyState( *pShellCrsr, aPropSet, rPropertyName);
+ eState = SwXTextCursor::GetPropertyState( *pShellCrsr, *m_pPropSet, rPropertyName);
}
else
throw RuntimeException();
@@ -1938,11 +1936,11 @@ Sequence< PropertyState > SwXTextViewCursor::getPropertyStates(
{
::vos::OGuard aGuard(Application::GetSolarMutex());
Sequence< PropertyState > aRet;
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyStates(*pShellCrsr, aPropSet, rPropertyNames);
+ aRet = SwXTextCursor::GetPropertyStates(*pShellCrsr, *m_pPropSet, rPropertyNames);
}
return aRet;
}
@@ -1953,11 +1951,11 @@ void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName )
throw(UnknownPropertyException, RuntimeException)
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwXTextCursor::SetPropertyToDefault( *pShellCrsr, aPropSet, rPropertyName);
+ SwXTextCursor::SetPropertyToDefault( *pShellCrsr, *m_pPropSet, rPropertyName);
}
}
/*-- 29.06.00 17:33:43---------------------------------------------------
@@ -1968,11 +1966,11 @@ Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName )
{
Any aRet;
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyDefault( *pShellCrsr, aPropSet, rPropertyName);
+ aRet = SwXTextCursor::GetPropertyDefault( *pShellCrsr, *m_pPropSet, rPropertyName);
}
return aRet;
}
@@ -1983,13 +1981,13 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( un
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = pView->GetWrtShell().Down( bExpand, 1, sal_True );
+ bRet = m_pView->GetWrtShell().Down( bExpand, 1, sal_True );
}
else
throw uno::RuntimeException();
@@ -2002,13 +2000,13 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno:
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection())
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = pView->GetWrtShell().Up( bExpand, 1, sal_True );
+ bRet = m_pView->GetWrtShell().Up( bExpand, 1, sal_True );
}
else
throw uno::RuntimeException();
@@ -2021,12 +2019,12 @@ sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection( sal_False ))
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- bRet = pView->GetWrtShell().IsAtLeftMargin();
+ bRet = m_pView->GetWrtShell().IsAtLeftMargin();
}
else
throw uno::RuntimeException();
@@ -2039,12 +2037,12 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection( sal_False ))
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- bRet = pView->GetWrtShell().IsAtRightMargin(sal_True);
+ bRet = m_pView->GetWrtShell().IsAtRightMargin(sal_True);
}
else
throw uno::RuntimeException();
@@ -2056,12 +2054,12 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException )
void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection( sal_False ))
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- pView->GetWrtShell().RightMargin(bExpand, sal_True);
+ m_pView->GetWrtShell().RightMargin(bExpand, sal_True);
}
else
throw uno::RuntimeException();
@@ -2072,12 +2070,12 @@ void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeExcep
void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeException )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- if(pView)
+ if(m_pView)
{
if (!IsTextSelection( sal_False ))
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
- pView->GetWrtShell().LeftMargin(bExpand, sal_True);
+ m_pView->GetWrtShell().LeftMargin(bExpand, sal_True);
}
else
throw uno::RuntimeException();
@@ -2147,25 +2145,25 @@ sal_Int64 SAL_CALL SwXTextViewCursor::getSomething(
IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCursorHelper)
const SwDoc* SwXTextViewCursor::GetDoc() const
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
}
// -----------------------------------------------------------------------------
SwDoc* SwXTextViewCursor::GetDoc()
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
}
// -----------------------------------------------------------------------------
const SwPaM* SwXTextViewCursor::GetPaM() const
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
return rSh.GetCrsr();
}
// -----------------------------------------------------------------------------
SwPaM* SwXTextViewCursor::GetPaM()
{
- SwWrtShell& rSh = pView->GetWrtShell();
+ SwWrtShell& rSh = m_pView->GetWrtShell();
return rSh.GetCrsr();
}