diff options
author | os <os@openoffice.org> | 2010-01-11 15:11:11 +0100 |
---|---|---|
committer | os <os@openoffice.org> | 2010-01-11 15:11:11 +0100 |
commit | 2ac42e9f9636c575169cc4db9ac8c03c33eb6305 (patch) | |
tree | ab36a50837539eea6493fe4182d7b50cb83fab6d | |
parent | 46e584010539eef2999cbe9285d8beb8feed42b9 (diff) |
#i105646# unused code removed
39 files changed, 29 insertions, 481 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 36e9bdd08639..3b10a872d3a7 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -222,7 +222,9 @@ class SwPostItMgr: public SfxListener void Delete(String aAuthor); void Delete(); +#if 0 void Hide( SwPostItField* pPostItField ); +#endif void Hide( const String& rAuthor ); void Hide(); void Show(); @@ -245,7 +247,6 @@ class SwPostItMgr: public SfxListener SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const; SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const; SwPostIt* GetPostIt(const SwPostItField* pFld) const; - SwPostIt* GetPostIt(SwPostItField* pFld) const; void SetShadowState(const SwPostItField* pFld,bool bCursor = true); @@ -255,8 +256,6 @@ class SwPostItMgr: public SfxListener Color GetColorLight(sal_uInt16 aAuthorIndex); Color GetColorAnkor(sal_uInt16 aAuthorIndex); - bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const; - void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} OutlinerParaObject* IsAnswer() {return mpAnswer;} void CheckMetaText(); diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx index 7f4c88b6081c..cf546f354721 100644 --- a/sw/inc/SwNumberTree.hxx +++ b/sw/inc/SwNumberTree.hxx @@ -168,13 +168,6 @@ public: } /** - Returns the first child of this node. - - @return the child - */ - SwNumberTreeNode* GetFirstChild() const; - - /** Returns number of this node. @param bValidate validate the number? diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index b0c8a54125f0..c85dcd9e1d9a 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -877,8 +877,6 @@ public: @return the textual description of the current selection */ String GetCrsrDescr() const; - - SwRect GetRectOfCurrentChar(); }; diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx index 5ddf9c1458fb..c8890136924d 100644 --- a/sw/inc/postit.hxx +++ b/sw/inc/postit.hxx @@ -324,7 +324,9 @@ class SwMarginWin : public Window virtual bool CalcFollow(); SwMarginWin* GetTopReplyNote(); - bool IsAnyStackParentVisible(); +#if 0 + bool IsAnyStackParentVisible(); +#endif sal_Int32 GetMetaHeight(); sal_Int32 GetMinimumSizeWithMeta(); diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 19ec6ed6084f..654ed121d22c 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -66,7 +66,6 @@ namespace SwPostItHelper }; SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& ); - SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwTxtFld* ); long getLayoutHeight( const SwRootFrm* pRoot ); void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ); unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 5b08b496a360..0d524791deb6 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -404,7 +404,6 @@ public: */ virtual SwRewriter GetRewriter() const; - BOOL CanGrouping( const SwPosition&, sal_Unicode cIns ); OUT_UNDOBJ( Insert ) DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert) @@ -566,7 +565,6 @@ public: ULONG GetEndNode() const { return nEndNode; } ULONG GetDestSttNode() const { return nDestSttNode; } xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; } - void AddTblMrgFlyHstry( SwHistory& rHstr ); void SetMoveRedlines( bool b ) { bMoveRedlines = b; } @@ -1143,15 +1141,6 @@ public: }; -class SwUndoDelBookmark : public SwUndoBookmark -{ -public: - SwUndoDelBookmark( const ::sw::mark::IMark& ); - virtual void Undo( SwUndoIter& ); - virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( DelBookmark ) -}; - class SwUndoInsBookmark : public SwUndoBookmark { public: diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index f12b3ecbe9bc..42325bc7098e 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -398,9 +398,6 @@ public: // compatible behaviour of tabs void SetTabCompat( bool bNew ); - //#i24363# tab stops relative to indent - void SetTabsRelativeToIndent( bool bNew ); - // font metric attribute "External Leading" should be considered void SetAddExtLeading( bool bNew ); diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index f1fd0abb4ae4..906f29c3cb93 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -95,8 +95,6 @@ class SwSelPaintRects : public SwRects // die Shell const SwCrsrShell* pCShell; - void Paint( const SwRect& rRect ); - virtual void Paint( const Rectangle& rRect ); virtual void FillRects() = 0; diff --git a/sw/inc/warnpassword.hxx b/sw/inc/warnpassword.hxx deleted file mode 100644 index fa6adc89b968..000000000000 --- a/sw/inc/warnpassword.hxx +++ /dev/null @@ -1,50 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: warnpassword.hxx,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SW_WARNPASSWORD_HXX -#define SW_WARNPASSWORD_HXX - - - -class SfxMedium; -/** Static API helper functions. */ -class SwWarnPassword -{ -public: - /** Opens a query warning dialog. - @descr Pop up Query on export with a choice of yes/no if a - an encrypted password is imported. - @return true if yes and false if no. default to true. - */ - static bool WarningOnPassword( SfxMedium& rMedium ); -}; - - -#endif diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index 8f9caf5f022b..7a1a18b88501 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -130,19 +130,6 @@ SwNumberTreeNode * SwNumberTreeNode::GetRoot() const return pResult; } -SwNumberTreeNode * SwNumberTreeNode::GetFirstChild() const -{ - SwNumberTreeNode * pResult = 0; - - tSwNumberTreeChildren::iterator aIt = mChildren.begin(); - - if (aIt != mChildren.end() ) - pResult = *aIt; - - return pResult; -} - - void SwNumberTreeNode::ClearObsoletePhantoms() { tSwNumberTreeChildren::iterator aIt = mChildren.begin(); diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 48f4b23136b9..973ed07ded50 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -262,12 +262,6 @@ sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const return IsPortionAttrSet(nPortionNo, PORATTR_READONLY); } -sal_Bool SwAccessiblePortionData::IsGrayPortion( size_t nPortionNo ) const -{ - return IsPortionAttrSet(nPortionNo, PORATTR_GRAY); -} - - sal_Bool SwAccessiblePortionData::IsGrayPortionType( USHORT nType ) const { // gray portions? diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index ab866dbc3701..a281a40f0f2e 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -93,7 +93,6 @@ class SwAccessiblePortionData : public SwPortionHandler sal_Bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const; sal_Bool IsSpecialPortion( size_t nPortionNo ) const; sal_Bool IsReadOnlyPortion( size_t nPortionNo ) const; - sal_Bool IsGrayPortion( size_t nPortionNo ) const; sal_Bool IsGrayPortionType( USHORT nType ) const; // helper method for GetEditableRange(...): diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 3637cc19354d..1433acb46628 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3305,19 +3305,6 @@ String SwCrsrShell::GetCrsrDescr() const return aResult; } -SwRect SwCrsrShell::GetRectOfCurrentChar() -{ - SwCntntFrm* pFrm = pCurCrsr->GetCntntNode()->GetFrm( 0, pCurCrsr->GetPoint(), FALSE ); - SwRect aRet; - SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bRealHeight = TRUE; - pFrm->GetCharRect( aRet, *pCurCrsr->GetPoint(), &aTmpState ); - //const SwTwips nRealHeight = aTmpState.aRealHeight.Y(); - if (aTmpState.aRealHeight.X() != 0) - aRet.Top(aRet.Top() + aTmpState.aRealHeight.X()); - return aRet; -} - // SMARTTAGS void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes, diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 8a9dc3c0a458..608abeb21c47 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -669,16 +669,6 @@ void SwSelPaintRects::Paint( const Rectangle& /*rRect*/ ) // nothing to do with overlays } -/* - * Rectangle ist in Dokument-Koordianten !! - * pWin != 0 -> auch wirklich malen - * == 0 -> nur testen, ob es gemalt werden kann - */ - -void SwSelPaintRects::Paint( const SwRect& /*rRect*/ ) -{ - // nothing to do with overlays -} // check current MapMode of the shell and set possibly the static members. // Optional set the parameters pX, pY diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 596a390cd2ae..7750981c7a7b 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -129,22 +129,6 @@ unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrm, const SwRootFrm* pR return nRet; } -SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwTxtFld* pFld ) -{ - SwLayoutStatus aRet = SwPostItHelper::INVISIBLE; - if( pFld ) - { - SwTxtNode* pTNd = pFld->GetpTxtNode(); - if( pTNd ) - { - SwPosition aPos( *pTNd ); - aPos.nContent.Assign( pTNd, *pFld->GetStart() ); - aRet = getLayoutInfos( rInfo, aPos ); - } - } - return aRet; -} - SwPosition SwPostItItem::GetPosition() { SwTxtFld* pFld = pFmtFld->GetTxtFld(); diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx index bb8ccc96905e..e953408c1daf 100644 --- a/sw/source/core/inc/SwGrammarMarkUp.hxx +++ b/sw/source/core/inc/SwGrammarMarkUp.hxx @@ -72,8 +72,6 @@ public: /* getSentenceEnd returns the first start position of a sentence which is greater than the given parameter */ xub_StrLen getSentenceEnd( xub_StrLen nPos ); - /* removeSentence removes all start positions in the given range */ - void removeSentence(xub_StrLen nStart, xub_StrLen nLength ); }; #endif diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx index 74e6dbf27b30..4514f3fe64ac 100644 --- a/sw/source/core/text/SwGrammarMarkUp.cxx +++ b/sw/source/core/text/SwGrammarMarkUp.cxx @@ -139,21 +139,6 @@ void SwGrammarMarkUp::setSentence( xub_StrLen nStart ) maSentence.insert( pIter, nStart ); } -void SwGrammarMarkUp::removeSentence(xub_StrLen nStart, xub_StrLen nLength ) -{ - std::vector< xub_StrLen >::iterator pIter = maSentence.begin(); - while( pIter != maSentence.end() && *pIter < nStart ) - ++pIter; - if( nLength == STRING_LEN ) - nStart = STRING_LEN; - else - nStart += nLength; - std::vector< xub_StrLen >::iterator pLast = pIter; - while( pLast != maSentence.end() && *pLast < nStart ) - ++pLast; - maSentence.erase( pIter, pLast ); -} - xub_StrLen SwGrammarMarkUp::getSentenceStart( xub_StrLen nPos ) { if( !maSentence.size() ) diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 2448b061bc1d..c96cf90ea8c9 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1140,7 +1140,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const } } - +#if 0 void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const { SwRect aIntersect; @@ -1167,7 +1167,7 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) } } } - +#endif /************************************************************************* * SwTxtPaintInfo::DrawBackGround() *************************************************************************/ diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 77b6e03d4f26..6ee02e1dafd1 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -473,7 +473,9 @@ public: inline void DrawBackBrush( const SwLinePortion &rPor ) const { /* if( pFnt->GetBackColor() ) */ _DrawBackBrush( rPor ); } +#if 0 void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const; +#endif inline void NotifyURL( const SwLinePortion &rPor ) const { if( URLNotify() ) _NotifyURL( rPor ); } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 7b3d381929e2..02e003e1e9b1 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -125,11 +125,6 @@ sal_Bool isHahChar ( xub_Unicode cCh ) || cCh == 0x6BF ); } -sal_Bool isTahChar ( xub_Unicode cCh ) -{ - return ( cCh == 0x637 || cCh == 0x638 || cCh == 0x69F ); -} - sal_Bool isAinChar ( xub_Unicode cCh ) { return ( cCh == 0x639 || cCh == 0x63A || cCh == 0x6A0 || cCh == 0x6FC ); diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index f49cea5ac7d3..d583e2135910 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -91,23 +91,6 @@ SwRewriter SwUndoBookmark::GetRewriter() const //---------------------------------------------------------------------- -SwUndoDelBookmark::SwUndoDelBookmark( const ::sw::mark::IMark& rBkmk ) - : SwUndoBookmark( UNDO_DELBOOKMARK, rBkmk ) -{ -} - - -void SwUndoDelBookmark::Undo( SwUndoIter& rUndoIter ) -{ - SetInDoc( &rUndoIter.GetDoc() ); -} - - -void SwUndoDelBookmark::Redo( SwUndoIter& rUndoIter ) -{ - ResetInDoc( &rUndoIter.GetDoc() ); -} - SwUndoInsBookmark::SwUndoInsBookmark( const ::sw::mark::IMark& rBkmk ) : SwUndoBookmark( UNDO_INSBOOKMARK, rBkmk ) diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 85db90c85701..f99bfbebf432 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -167,21 +167,6 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd ) // werden kann. Wenn ja, dann aender die Laenge und die InsPos. // Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt. -BOOL SwUndoInsert::CanGrouping( const SwPosition& rInsPos, sal_Unicode cIns ) -{ - BOOL bRet = FALSE; - if( !bIsAppend ) - { - ++nCntnt; - bRet = CanGrouping( rInsPos ); - --nCntnt; - if( bRet ) - bRet = CanGrouping( cIns ); - } - return bRet; -} - - BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns ) { if( !bIsAppend && bIsWordDelim == diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index ac318b2aab6d..a16bbc47be75 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -357,13 +357,3 @@ void SwUndoMove::DelFtn( const SwPaM& rRange ) } } -void SwUndoMove::AddTblMrgFlyHstry( SwHistory& rHstr ) -{ - if( !pHistory ) - pHistory = new SwHistory; - - USHORT nInsPos = nFtnStt; - nFtnStt = nFtnStt + rHstr.Count(); - pHistory->Move( nInsPos, &rHstr ); -} - diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 36a8808fd351..2e1dd7e8abee 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -4429,41 +4429,6 @@ void SwXCellRange::GetDataSequence( pDblSeq->realloc( nDtaCnt ); } -/*-- 04.06.04 11:42:47--------------------------------------------------- - - -----------------------------------------------------------------------*/ - -SwUnoCrsr * lcl_CreateCursor( SwFrmFmt &rTblFmt, - SwTableBox *pStartBox, // should be top-left cell of cell range - SwTableBox *pEndBox ) // should be bottom right-cell cell range -{ - // create a *new* UNO cursor spanning the cell range defined by - // the start and end box. Both boxes must be belong to the same table! - - SwUnoCrsr *pUnoCrsr = 0; - if (pStartBox && pEndBox) - { - // hier muessen die Actions aufgehoben werden um - // (zB dem Layout zu ermglichen die Tabelle zu formatieren, da - // sonst kein Tabellen Cursor aufgespannt werden kann.) - UnoActionRemoveContext aRemoveContext(rTblFmt.GetDoc()); - - // set point of cursor to top left box of range - const SwStartNode* pSttNd = pStartBox->GetSttNd(); - SwPosition aPos(*pSttNd); - pUnoCrsr = rTblFmt.GetDoc()->CreateUnoCrsr(aPos, sal_True); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - pUnoCrsr->SetRemainInSection( sal_False ); - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pEndBox->GetSttNd(); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr *pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr); - pCrsr->MakeBoxSels(); - } - return pUnoCrsr; -} - - /*-- 29.04.02 11:42:47--------------------------------------------------- -----------------------------------------------------------------------*/ diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index cd80439877f6..2f6483e632f3 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -884,21 +884,6 @@ void ViewShell::SetTabCompat( bool bNew ) } } -/*-- 29.11.2007 09:03:18--------------------------------------------------- - //#i24363# tab stops relative to indent - -----------------------------------------------------------------------*/ -void ViewShell::SetTabsRelativeToIndent(bool bNew) -{ - IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess(); - if( pIDSA->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) != bNew ) - { - SwWait aWait( *GetDoc()->GetDocShell(), TRUE ); - pIDSA->set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, bNew ); - const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION; - lcl_InvalidateAllCntnt( *this, nInv ); - } -} - void ViewShell::SetAddExtLeading( bool bNew ) { IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess(); diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 0b2bd344ccc4..60796e43d93a 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1618,79 +1618,6 @@ USHORT SwRTFParser::ReadRevTbl() return nAuthorTableIndex; } -// #117910# simulate words behaviour of \keepn in table rows -void fixKeepAndSplitAttributes(SwTableNode *pTableNode) -{ - ASSERT(pTableNode!=NULL, "no table node!"); - if (!pTableNode) return; - SwDoc *pDoc=pTableNode->GetDoc(); - if (pTableNode==NULL) return; - SwTable& rTable=pTableNode->GetTable(); - SwTableLines& rLns = rTable.GetTabLines(); - USHORT nLines=rLns.Count(); - if (nLines==0) return; - // get first paragaph in left down-most box - SwTableLine* pLastLine = rLns[ nLines-1 ]; - SwTableBox* pBox = pLastLine->GetTabBoxes()[ 0 ]; - ULONG iFirstParagraph=pBox->GetSttIdx()+1; - SwTxtNode *pTxtNode=(SwTxtNode *)pDoc->GetNodes()[iFirstParagraph]; - SwFrmFmt* pFmt=rTable.GetFrmFmt(); - - SwFmtLayoutSplit *pTableSplit=(SwFmtLayoutSplit *)pFmt->GetAttrSet().GetItem(RES_LAYOUT_SPLIT); - BOOL isTableKeep = pTableSplit!=NULL && !pTableSplit->GetValue(); - SvxFmtKeepItem *pTableKeep=(SvxFmtKeepItem *)pFmt->GetAttrSet().GetItem(RES_KEEP); - BOOL isTableKeepNext = pTableKeep!=NULL && pTableKeep->GetValue(); - SvxFmtKeepItem *pKeepNext = (SvxFmtKeepItem *)pTxtNode->GetSwAttrSet().GetItem(RES_KEEP); - - if (isTableKeepNext) - { - if (nLines>2 && !isTableKeep) - { // split - SwTableLine* pSplitLine = rLns[ nLines-2 ]; - SwTableBox* pSplitBox = pSplitLine->GetTabBoxes()[ 0 ]; - SwNodeIndex aSplitIdx( *pSplitBox->GetSttNd() ); - pDoc->SplitTable( SwPosition(aSplitIdx), HEADLINE_NONE, - !isTableKeep ); - SwTable& rSplitTable=aSplitIdx.GetNode().FindTableNode()->GetTable(); - aSplitIdx-=2; - pDoc->GetNodes().Delete(aSplitIdx); - pFmt=rSplitTable.GetFrmFmt(); - pFmt->ResetFmtAttr(RES_PAGEDESC); - } - // set keep=1(i.e. split=0) attribut - SwFmtLayoutSplit aSplit(0); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aSplit); - pFmt->SetFmtAttr(aNewSet); - } - else // !isTableKeepNext - { - if (isTableKeep) - { - SwNodeIndex aTmpIdx( *pBox->GetSttNd() ); - pDoc->SplitTable( SwPosition(aTmpIdx), HEADLINE_NONE, FALSE ); - SwTable& rSplitTable=aTmpIdx.GetNode().FindTableNode()->GetTable(); - aTmpIdx-=2; - pDoc->GetNodes().Delete(aTmpIdx); - pFmt=rSplitTable.GetFrmFmt(); - pFmt->ResetFmtAttr(RES_PAGEDESC); - } - // set keep=0(i.e. split=1) attribut - SwFmtLayoutSplit aSplit(1); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aSplit); - pFmt->SetFmtAttr(aNewSet); - } - // move keepnext attribtue from last paragraph to table - if (pKeepNext!=NULL) - { - SvxFmtKeepItem aNewKeepItem(pKeepNext->GetValue(), RES_KEEP); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aNewKeepItem); - pFmt->SetFmtAttr(aNewSet); - } -} - void SwRTFParser::NextToken( int nToken ) { USHORT eDateFmt; diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 021bbea5f380..a4e7fb9a1517 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -139,6 +139,7 @@ const SwTable * WW8TableNodeInfoInner::getTable() const return mpTable; } +#ifdef DEBUG string WW8TableNodeInfoInner::toString() const { static char buffer[256]; @@ -154,7 +155,7 @@ string WW8TableNodeInfoInner::toString() const return string(buffer); } - +#endif // WW8TableTextNodeInfo WW8TableNodeInfo::WW8TableNodeInfo(const SwNode * pNode) @@ -170,6 +171,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo() { } +#ifdef DEBUG ::std::string WW8TableNodeInfo::toString() const { static char buffer[1024]; @@ -190,15 +192,13 @@ WW8TableNodeInfo::~WW8TableNodeInfo() aIt++; } -#ifdef DEBUG sResult += dbg_out(*mpNode); -#endif sResult +="</tableNodeInfo>"; return sResult; } - +#endif void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth) { mnDepth = nDepth; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 035464fb751b..7d5babc9bbfa 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -84,7 +84,9 @@ public: const SwNode * getNode() const; +#ifdef DEBUG string toString() const; +#endif }; class WW8TableNodeInfo @@ -131,7 +133,9 @@ public: sal_uInt32 getCell() const; sal_uInt32 getRow() const; +#ifdef DEBUG ::std::string toString() const; +#endif }; struct hashNode diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index b68f321d35b6..1da4d59e7ec2 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -570,6 +570,7 @@ namespace sw return aRet; } +#if 0 Frames GetFramesBetweenNodes(const Frames &rFrames, const SwNode &rStart, const SwNode &rEnd) { @@ -583,7 +584,7 @@ namespace sw return aRet; } - +#endif Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode) { Frames aRet; diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 68a474b227d5..6c8721df214f 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -666,6 +666,7 @@ namespace sw */ Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode); +#if 0 /** Get the Frames anchored for all nodes between two points Given a container of frames, find the ones anchored to the nodes @@ -688,7 +689,7 @@ namespace sw */ Frames GetFramesBetweenNodes(const Frames &rFrames, const SwNode &rStart, const SwNode &rEnd); - +#endif /** Get the Numbering Format used on a paragraph There are two differing types of numbering formats that may be on a diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 98006fb5d267..b4a536839829 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -383,20 +383,18 @@ private: SwNodeIndex maPtNode; xub_StrLen mnPtCntnt; ::rtl::OUString msBookmarkName; - ::rtl::OUString msMarkType; typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> Param_t; typedef ::std::vector< Param_t > Params_t; Params_t maParams; SwPaM * mpPaM; public: - WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType); + WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName); ~WW8NewFieldCtx(); SwNodeIndex GetPtNode() { return maPtNode; }; xub_StrLen GetPtCntnt() { return mnPtCntnt; }; ::rtl::OUString GetBookmarkName(); - ::rtl::OUString GetMarkType(); void AddParam(::rtl::OUString name, ::rtl::OUString value); void SetCurrentFieldParamsTo(::sw::mark::IFieldmark* pFieldmark); }; diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx index 302227fca0fe..a9879d509627 100644 --- a/sw/source/filter/ww8/ww8par2.hxx +++ b/sw/source/filter/ww8/ww8par2.hxx @@ -288,7 +288,6 @@ public: const WW8SwFlyPara* pFS, bool bGraf); WW8FlySet(SwWW8ImplReader& rReader, const SwPaM* pPaM, const WW8_PIC& rPic, long nWidth, long nHeight); - WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM); }; enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause}; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index b6b91459fc10..ba35fd2bfdb6 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -103,11 +103,10 @@ using namespace com::sun::star; using namespace sw::util; using namespace sw::types; -WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType) +WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName) : maPtNode(aStartPos.nNode) , mnPtCntnt(aStartPos.nContent.GetIndex()) , msBookmarkName(sBookmarkName) - , msMarkType(sMarkType) , mpPaM(NULL) { } @@ -123,11 +122,6 @@ WW8NewFieldCtx::~WW8NewFieldCtx() return msBookmarkName; } -::rtl::OUString WW8NewFieldCtx::GetMarkType() -{ - return msMarkType; -} - void WW8NewFieldCtx::AddParam(::rtl::OUString name, ::rtl::OUString value) { maParams.push_back( Param_t(name, value) ); @@ -233,7 +227,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) if (aBookmarkName.Len()>0) { - WW8NewFieldCtx *pFieldCtx=new WW8NewFieldCtx(*pPaM->GetPoint(), aBookmarkName, ::rtl::OUString::createFromAscii("ecma.office-open-xml.field.FORMTEXT")); + WW8NewFieldCtx *pFieldCtx=new WW8NewFieldCtx(*pPaM->GetPoint(), aBookmarkName/*, ::rtl::OUString::createFromAscii("ecma.office-open-xml.field.FORMTEXT"*/); maNewFieldCtxStack.push_back(pFieldCtx); pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Name"), aFormula.sTitle); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 82e2192b52ed..c5cdac8b6d8a 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2275,12 +2275,6 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, + aSizeArray[WW8_BOT]) ); } -WW8FlySet::WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM) - : SfxItemSet(rReader.rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) -{ - Init(rReader, pPaM); -} - void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) { if (!rReader.mbNewDoc) diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 8a119ddd5140..2fcfe185921c 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -106,7 +106,6 @@ #include <cmdid.h> #include <globals.hrc> #include <app.hrc> -#include "warnpassword.hxx" #include <cfgid.h> #include <unotools/moduleoptions.hxx> diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 8b275c0a6447..c249c2cbc85f 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1295,7 +1295,7 @@ void SwPostItMgr::Delete() CalcRects(); LayoutPostIts(); } - +#if 0 void SwPostItMgr::Hide(SwPostItField* pPostItField ) { for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1314,7 +1314,7 @@ void SwPostItMgr::Hide(SwPostItField* pPostItField ) LayoutPostIts(); } - +#endif void SwPostItMgr::Hide( const String& rAuthor ) { for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1379,16 +1379,6 @@ SwMarginWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const return NULL; } -SwPostIt* SwPostItMgr::GetPostIt(SwPostItField* pFld) const -{ - for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) - { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld) ) - return static_cast<SwPostIt*>((*i)->pPostIt); - } - return NULL; -} - SwMarginWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1409,30 +1399,6 @@ SwPostIt* SwPostItMgr::GetPostIt(const SwPostItField* pFld) const return NULL; } -bool SwPostItMgr::ShowPreview(const SwField* pFld, SwFmtFld*& pFmtFld) const -{ - for (unsigned long n=0;n<mPages.size();n++) - { - if (mPages[n]->mList->size()>0) - { - for(const_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) - { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld()==pFld) ) - { - pFmtFld = (*i)->GetFmtFld(); - const long aSidebarheight = mPages[n]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0; - bool bTopPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() >= (mPages[n]->mPageRect.Top()+aSidebarheight); - bool bBottomPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()+(*i)->pPostIt->GetSizePixel().Height())).Y() <= (mPages[n]->mPageRect.Bottom()-aSidebarheight); - const bool bTopVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() > mpView->GetVisArea().Top(); - const bool bBottomVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()/*+(*i)->pPostIt->GetSizePixel().Height()*/)).Y() <= mpView->GetVisArea().Bottom(); - return !(bBottomPage && bTopPage && bBottomVis && bTopVis); - } - } - } - } - return false; -} - SwMarginWin* SwPostItMgr::GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt) { if (mvPostItFlds.size()>1) diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index 3079cc855c50..ee7d4f87f049 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1517,6 +1517,7 @@ void SwMarginWin::SetViewState(ShadowState bState) } } +#if 0 bool SwMarginWin::IsAnyStackParentVisible() { SwMarginWin* pMarginWin = mpMgr->GetNextPostIt(KEY_PAGEUP, this); @@ -1533,7 +1534,7 @@ bool SwMarginWin::IsAnyStackParentVisible() } return false; } - +#endif SwMarginWin* SwMarginWin::GetTopReplyNote() { SwMarginWin* pTopNote = 0; diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk index 41b2cc73ca78..2632db2e89c8 100644 --- a/sw/source/ui/uno/makefile.mk +++ b/sw/source/ui/uno/makefile.mk @@ -63,8 +63,7 @@ SLO1FILES = \ $(SLO)$/SwXFilterOptions.obj\ $(SLO)$/RefreshListenerContainer.obj \ $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj \ - $(SLO)$/warnpassword.obj + $(SLO)$/unodoc.obj SLO2FILES = \ $(SLO)$/swdetect.obj \ diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx deleted file mode 100644 index 600256cf05db..000000000000 --- a/sw/source/ui/uno/warnpassword.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: warnpassword.cxx,v $ - * $Revision: 1.7 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * -+ ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -// ============================================================================ -#include "warnpassword.hxx" -#include <com/sun/star/task/XInteractionHandler.hpp> -#include <svl/itemset.hxx> -#include <sfx2/docfile.hxx> -#include <sfx2/sfxsids.hrc> -#include <ucbhelper/simpleinteractionrequest.hxx> -#include <com/sun/star/ucb/InteractiveAppException.hpp> -#include <svx/svxerr.hxx> - -using ::rtl::OUString; - -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::task; - -bool SwWarnPassword::WarningOnPassword( SfxMedium& rMedium ) -{ - bool bReturn = true; - uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler()); - if( xHandler.is() ) - { - - OUString empty; - uno::Any xException( makeAny(InteractiveAppException(empty, - uno::Reference <XInterface> (), - InteractionClassification_QUERY, - ERRCODE_SVX_EXPORT_FILTER_CRYPT))); - - uno::Reference< ucbhelper::SimpleInteractionRequest > xRequest - = new ucbhelper::SimpleInteractionRequest( - xException, - ucbhelper::CONTINUATION_APPROVE - | ucbhelper::CONTINUATION_DISAPPROVE ); - - xHandler->handle( xRequest.get() ); - - const sal_Int32 nResp = xRequest->getResponse(); - - switch ( nResp ) - { - case ucbhelper::CONTINUATION_UNKNOWN: - break; - - case ucbhelper::CONTINUATION_APPROVE: - // Continue - break; - - case ucbhelper::CONTINUATION_DISAPPROVE: - bReturn = false; - break; - } - } - return bReturn; -} - |