diff options
author | obo <obo@openoffice.org> | 2010-04-21 15:14:40 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-04-21 15:14:40 +0200 |
commit | fd7b7ad7a360991e1b895750830a8740d4869a9f (patch) | |
tree | 7cd086ba99ee0b264e2ed14c5c0a775b9f40b81d | |
parent | 1ec9190b448dc0c2021c7a1ed76d2c8259cb1b48 (diff) | |
parent | 90e8e23ca5ad4143c19ae4b78601359cc8028f83 (diff) |
CWS-TOOLING: integrate CWS c07v027ooo/OOO320_m19ooo/OOO320_m18ooo/OOO320_m17ooo/OOO320_m16
-rw-r--r-- | sw/source/core/SwNumberTree/SwNodeNum.cxx | 19 | ||||
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/ascii/ascatr.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.cxx | 19 |
4 files changed, 45 insertions, 11 deletions
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index 6a9eee1462..0927723b93 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -37,6 +37,10 @@ // --> OD 2007-10-31 #i83479# #include <IDocumentListItems.hxx> // <-- +// --> OD 2010-01-13 #b6912256# +#include <svtools/svstdarr.hxx> +#include <doc.hxx> +// <-- // --> OD 2008-02-19 #refactorlists# SwNodeNum::SwNodeNum( SwTxtNode* pTxtNode ) @@ -489,8 +493,21 @@ void SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum ) SwTxtNode* pTxtNode( rNodeNum.GetTxtNode() ); if ( pTxtNode ) { - // --> OD 2008-03-13 #refactorlists# pTxtNode->RemoveFromList(); + // --> OD 2010-01-13 #b6912256# + // clear all list attributes and the list style + SvUShortsSort aResetAttrsArray; + aResetAttrsArray.Insert( RES_PARATR_LIST_ID ); + aResetAttrsArray.Insert( RES_PARATR_LIST_LEVEL ); + aResetAttrsArray.Insert( RES_PARATR_LIST_ISRESTART ); + aResetAttrsArray.Insert( RES_PARATR_LIST_RESTARTVALUE ); + aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED ); + aResetAttrsArray.Insert( RES_PARATR_NUMRULE ); + SwPaM aPam( *pTxtNode ); + pTxtNode->GetDoc()->ResetAttrs( aPam, sal_False, + &aResetAttrsArray, + false ); + // <-- } } } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 37dbda7a43..b4c097d96c 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -228,12 +228,9 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry case FN_NUMBER_NEWSTART: { const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode(); - // --> OD 2006-10-19 #134160# - make code robust: - // consider case that PaM doesn't denote a text node - const SwNumRule* pRule = pTxtNd ? pTxtNd->GetNumRule() : 0; + // --> OD 2010-01-13 #b6912256# + if ( pTxtNd && pTxtNd->IsInList() ) // <-- - // hier wird Multiselektion nicht beruecksichtigt - if( pRule ) { if( pAny ) { @@ -514,7 +511,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry } eNewState = aCharStyles.getLength() ? - PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;; + PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE; if(pAny) (*pAny) <<= aCharStyles; } diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 092077eda8..8e2334dd47 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -169,7 +169,14 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) SwASC_AttrIter aAttrIter( (SwASCWriter&)rWrt, rNd, nStrPos ); if( !nStrPos && rWrt.bExportPargraphNumbering ) - rWrt.Strm().WriteUnicodeOrByteText( rNd.GetNumString() ); + { + String numString( rNd.GetNumString() ); + if (numString.Len()) + { + numString.Append(' '); + rWrt.Strm().WriteUnicodeOrByteText(numString); + } + } String aStr( rNd.GetTxt() ); if( rWrt.bASCII_ParaAsBlanc ) diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index e0c79b28b3..7d74426231 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -239,6 +239,18 @@ SwTbxAutoTextCtrl::~SwTbxAutoTextCtrl() /********************************************************************** **********************************************************************/ +void lcl_InsertSorted( PopupMenu& rPopup, const XubString& rTitle, USHORT nItemId ) +{ + USHORT nPosition = 0; + for( USHORT nEntry = 0; nEntry < rPopup.GetItemCount(); ++nEntry ) + { + String sEntry = rPopup.GetItemText( rPopup.GetItemId( nEntry )); + if( COMPARE_LESS == rTitle.CompareIgnoreCaseToAscii( sEntry)) + break; + ++nPosition; + } + rPopup.InsertItem( nItemId, rTitle, 0, nPosition); +} SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() @@ -282,8 +294,9 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() if(nBlockCount) { USHORT nIndex = 100 * (i); - // aber ohne extension einfuegen - pPopup->InsertItem( i, sTitle);//sGroupName.GetToken(0, GLOS_DELIM)); + // insert without extension + //b6919254 + lcl_InsertSorted( *pPopup, sTitle, i ); PopupMenu* pSub = new PopupMenu; pSub->SetSelectHdl(aLnk); pPopup->SetPopupMenu(i, pSub); @@ -293,7 +306,7 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry)); sEntry.AppendAscii(" - "); sEntry += sLongName; - pSub->InsertItem(++nIndex, sEntry); + lcl_InsertSorted( *pSub, sEntry, ++nIndex ); } } } |