summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/doc/doccorr.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx46
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx3
-rw-r--r--sw/source/core/doc/ftnidx.cxx3
-rw-r--r--sw/source/core/text/itratr.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx3
-rw-r--r--[-rwxr-xr-x]sw/source/core/view/vprint.cxx2
8 files changed, 37 insertions, 30 deletions
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 87ec511c62dd..2cef07f9b487 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -43,8 +43,6 @@
#include <swundo.hxx>
#include <hints.hxx>
-/* */
-
/*
* MACROS um ueber alle CrsrShells zu iterieren
*/
@@ -441,7 +439,7 @@ SwEditShell* SwDoc::GetEditShell( ViewShell** ppSh ) const
// Layout und OLE-Shells sollten vorhanden sein!
if( pCurrentView )
{
- register ViewShell *pSh = pCurrentView, *pVSh = pSh;
+ ViewShell *pSh = pCurrentView, *pVSh = pSh;
if( ppSh )
*ppSh = pSh;
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 3c6357ba4aad..5244cd79606a 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -2294,22 +2294,45 @@ sal_Bool SwDoc::IsInVerticalText( const SwPosition& rPos, const Point* pPt ) con
return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir;
}
-//const SwRootFrm* SwDoc::GetRootFrm() const { return pLayout; }
-//SwRootFrm* SwDoc::GetRootFrm() { return pLayout; }
-//void SwDoc::SetRootFrm( SwRootFrm* pNew ) { pLayout = pNew; } //swmod 071029//swmod 071225
-void SwDoc::SetCurrentViewShell( ViewShell* pNew ) { pCurrentView = pNew; }//swmod 071227
-SwLayouter* SwDoc::GetLayouter() { return pLayouter; }
-const SwLayouter* SwDoc::GetLayouter() const { return pLayouter; }
-void SwDoc::SetLayouter( SwLayouter* pNew ) { pLayouter = pNew; }
-const ViewShell *SwDoc::GetCurrentViewShell() const { return pCurrentView;} //swmod 080219
-ViewShell *SwDoc::GetCurrentViewShell() { return pCurrentView;} //swmod 080219 It must be able to communicate to a ViewShell.This is going to be removerd later.
-const SwRootFrm *SwDoc::GetCurrentLayout() const {
+void SwDoc::SetCurrentViewShell( ViewShell* pNew )
+{
+ pCurrentView = pNew;
+}
+
+SwLayouter* SwDoc::GetLayouter()
+{
+ return pLayouter;
+}
+
+const SwLayouter* SwDoc::GetLayouter() const
+{
+ return pLayouter;
+}
+
+void SwDoc::SetLayouter( SwLayouter* pNew )
+{
+ pLayouter = pNew;
+}
+
+const ViewShell *SwDoc::GetCurrentViewShell() const
+{
+ return pCurrentView;
+}
+
+ViewShell *SwDoc::GetCurrentViewShell()
+{
+ return pCurrentView;
+} //swmod 080219 It must be able to communicate to a ViewShell.This is going to be removedd later.
+
+const SwRootFrm *SwDoc::GetCurrentLayout() const
+{
if(GetCurrentViewShell())
return GetCurrentViewShell()->GetLayout();
return 0;
}
-SwRootFrm *SwDoc::GetCurrentLayout(){
+SwRootFrm *SwDoc::GetCurrentLayout()
+{
if(GetCurrentViewShell())
return GetCurrentViewShell()->GetLayout();
return 0;
@@ -2334,4 +2357,3 @@ std::set<SwRootFrm*> SwDoc::GetAllLayouts()
return aAllLayouts;
}//swmod 070825
-
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 6e2a1eb51ea5..68ae706a4b51 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -238,7 +238,6 @@ SwDoc::SwDoc() :
pGrfFmtCollTbl( new SwGrfFmtColls() ),
pTOXTypes( new SwTOXTypes() ),
pDefTOXBases( new SwDefTOXBase_Impl() ),
- //pLayout( 0 ), // Rootframe des spezifischen Layouts. //swmod 071029
pCurrentView( 0 ), //swmod 071225
pDrawModel( 0 ),
pUndos( new SwUndos( 0, 20 ) ),
@@ -319,7 +318,6 @@ SwDoc::SwDoc() :
mbNewDoc =
mbCopyIsMove =
mbNoDrawUndoObj =
- //mbBrowseMode =//swmod 080130
mbInReading =
mbInXMLImport =
mbUpdateTOX =
@@ -528,8 +526,6 @@ SwDoc::~SwDoc()
// damit die Fussnotenattribute die Fussnotennodes in Frieden lassen.
mbDtor = TRUE;
- //DELETEZ( pCurrentView ); //swmod 080110//test if i can commit
-
delete pRedlineTbl;
delete pUnoCrsrTbl;
delete pAutoFmtRedlnComment;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index dd8485ece497..e6900e96c363 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1095,8 +1095,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
{
SwFrm::CheckPageDescs( (SwPageFrm*)(*pLayoutIter)->Lower() );
}//swmod 080310
- //if(pDoc->GetCurrentLayout())
- //SwFrm::CheckPageDescs( (SwPageFrm*)pDoc->GetCurrentLayout()->Lower() ); //swmod 080218
+
SetProtect( SwTOXBase::IsProtected() );
}
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 8ffcac046be4..a8b39c9062a6 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -232,7 +232,6 @@ void SwFtnIdxs::UpdateAllFtn()
nFtnIdx = 0; // Index in das FtnIdx-Array
for( USHORT n = 0; n < rOutlNds.Count(); ++n )
{
- //if( !rOutlNds[ n ]->GetTxtNode()->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
if ( rOutlNds[ n ]->GetTxtNode()->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
ULONG nCapStt = rOutlNds[ n ]->GetIndex(); // Start eines neuen Kapitels
@@ -294,8 +293,6 @@ void SwFtnIdxs::UpdateAllFtn()
}
}
- //if( pDoc->GetCurrentLayout() && FTNNUM_PAGE == rFtnInfo.eNum )
- // pDoc->GetCurrentLayout()->UpdateFtnNums();
if( pTmpRoot && FTNNUM_PAGE == rFtnInfo.eNum )
std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::UpdateFtnNums));//swmod 0
}
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 3ee041485a50..208d8a7ec9eb 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -435,7 +435,6 @@ sal_Bool SwTxtNode::IsSymbol( const xub_StrLen nBegin ) const//swmodtest 080307
SwScriptInfo aScriptInfo;
SwAttrIter aIter( *(SwTxtNode*)this, aScriptInfo );
aIter.Seek( nBegin );
- //const SwRootFrm* pTmpRootFrm = getIDocumentLayoutAccess()->GetCurrentLayout();
return aIter.GetFnt()->IsSymbol(
const_cast<ViewShell *>(getIDocumentLayoutAccess()->GetCurrentViewShell()) );//swmod 080311
}
@@ -702,7 +701,6 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax,
case CHAR_HARDHYPHEN:
{
XubString sTmp( cChar );
- //const SwRootFrm* pTmpRootFrm = getIDocumentLayoutAccess()->GetCurrentLayout();
SwDrawTextInfo aDrawInf( const_cast<ViewShell *>(getIDocumentLayoutAccess()->GetCurrentViewShell()),
*pOut, 0, sTmp, 0, 1, 0, sal_False );//swmod 080311
nAktWidth = aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 0bc5139a8159..43662250ebd0 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -559,7 +559,6 @@ void ViewShell::InvalidateWindows( const SwRect &rRect )
if ( pSh->GetWin() )
{
if ( pSh->IsPreView() )
-// pSh->GetWin()->Invalidate();
::RepaintPagePreview( pSh, rRect );
else if ( pSh->VisArea().IsOver( rRect ) )
pSh->GetWin()->Invalidate( rRect.SVRect() );
@@ -587,7 +586,7 @@ void ViewShell::MakeVisible( const SwRect &rRect )
{
if( pWin )
{
- const SwFrm* pRoot = /*GetDoc()->GetCurrentViewShell()->*/GetLayout();
+ const SwFrm* pRoot = GetLayout();
int nLoopCnt = 3;
long nOldH;
do{
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 91a8353cedc6..5dd52ab9f66e 100755..100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -341,7 +341,6 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
SET_CURR_SHELL( this );
SwRootFrm* pMyLayout = GetLayout();
- // ULONG nStatMax = pMyLayout->GetPageNum();
const SwFrm *pPage = pMyLayout->Lower();
SwLayAction aAction( pMyLayout, Imp() );
@@ -752,7 +751,6 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
pSh->GetNext() == pSh )
{
pSh->CheckBrowseView( FALSE );
- //pDoc->GetCurrentLayout()->Lower()->InvalidateSize(); //swmod 080218//?
pSh->GetLayout()->Lower()->InvalidateSize();
}