diff options
author | obo <obo@openoffice.org> | 2010-06-22 06:15:26 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-22 06:15:26 +0200 |
commit | d65a826c8032b50febb8c4c37a45f91688e95edd (patch) | |
tree | b2eff5d2e774823b0a055f3377aa02a05d657741 | |
parent | c59dd34038ccc7665705f26622acacbf18c1fddc (diff) | |
parent | ad29da789a5bb2fed95a95c841b26114b21db43b (diff) |
CWS-TOOLING: integrate CWS sw33bf05
-rw-r--r-- | sw/source/core/access/accportions.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/doc/number.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/text/porfld.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/docvw/PostItMgr.cxx | 40 | ||||
-rwxr-xr-x | sw/source/ui/docvw/SidebarWin.cxx | 39 |
6 files changed, 89 insertions, 27 deletions
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 2d216533f1..ecb45c2ab1 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -173,6 +173,17 @@ void SwAccessiblePortionData::Special( sDisplay = aTmpBuffer.makeStringAndClear(); break; } + // --> OD 2010-06-04 #i111768# - apply patch from kstribley: + // Include the control characters. + case POR_CONTROLCHAR: + { + OUStringBuffer aTmpBuffer( rText.Len() + 1 ); + aTmpBuffer.append( rText ); + aTmpBuffer.append( pTxtNode->GetTxt().GetChar(nModelPosition) ); + sDisplay = aTmpBuffer.makeStringAndClear(); + break; + } + // <-- default: sDisplay = rText; break; diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index b0f95952d9..ed1d795f78 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -998,7 +998,15 @@ void SwNumRule::SetInvalidRule(BOOL bFlag) for ( aIter = maTxtNodeList.begin(); aIter != maTxtNodeList.end(); ++aIter ) { const SwTxtNode* pTxtNode = *aIter; - aLists.insert( pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ) ); + // --> OD 2010-06-04 #i111681# - applying patch from cmc +// aLists.insert( pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ) ); + SwList* pList = pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ); + ASSERT( pList, "<SwNumRule::SetInvalidRule(..)> - list at which the text node is registered at does not exist. This is a serious issue --> please inform OD."); + if ( pList ) + { + aLists.insert( pList ); + } + // <-- } std::for_each( aLists.begin(), aLists.end(), std::mem_fun( &SwList::InvalidateListTree ) ); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 0e50ee3e3a..8ca7c2db14 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1385,11 +1385,15 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn ) return pPage; } -// false = right, true = left sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const { - if (!GetShell() || GetShell()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)) - return sw::sidebarwindows::SIDEBAR_NONE; + if ( !GetShell() || + GetShell()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) + { + // --> OD 2010-06-03 #i111964# - provide default sidebar position + return sw::sidebarwindows::SIDEBAR_RIGHT; + // <-- + } else { const bool bLTR = GetUpper() ? static_cast<const SwRootFrm*>(GetUpper())->IsLeftToRightViewLayout() : true; diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 933a01c019..dc11a8e456 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -416,6 +416,12 @@ sal_Bool SwFldPortion::Format( SwTxtFormatInfo &rInf ) // case CHAR_RLM : // case CHAR_LRM : // <-- + // --> OD 2010-06-03 #i111750# + // - Erasing further control characters from field string in + // to avoid loop. + case CH_TXTATR_BREAKWORD: + case CH_TXTATR_INWORD: + // <-- { aNew.Erase( 0, 1 ); ++nNextOfst; diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 2744935009..35067b2947 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1645,28 +1645,36 @@ void SwPostItMgr::CorrectPositions() if (!pFirstPostIt) return; - // yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it - const long aAnchorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); - const long aAnchorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; - if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel()) - { - long aAnchorPosX = 0; - long aAnchorPosY = 0; - for (unsigned long n=0;n<mPages.size();n++) - { - for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) - { - if ((*i)->bShow && (*i)->pPostIt) - { + // yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it + // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists. + const long aAnchorX = pFirstPostIt->Anchor() + ? mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X() + : 0; + const long aAnchorY = pFirstPostIt->Anchor() + ? mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1 + : 0; + // <-- + if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel()) + { + long aAnchorPosX = 0; + long aAnchorPosY = 0; + for (unsigned long n=0;n<mPages.size();n++) + { + for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) + { + // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists. + if ( (*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->Anchor() ) + // <-- + { aAnchorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X() : mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); aAnchorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; (*i)->pPostIt->SetPosPixel(Point(aAnchorPosX,aAnchorPosY)); } - } - } - } + } + } + } } diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index cce6db3a89..a166c25913 100755 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -560,14 +560,28 @@ void SwSidebarWin::SetPosAndSize() { if (IsFollow() && !HasChildPathFocus()) { - mpAnchor->SetAnchorState(AS_END); + // --> OD 2010-06-03 #i111964# + if ( mpAnchor ) + { + mpAnchor->SetAnchorState(AS_END); + } + // <-- } else { - mpAnchor->SetAnchorState(AS_ALL); + // --> OD 2010-06-03 #i111964# + if ( mpAnchor ) + { + mpAnchor->SetAnchorState(AS_ALL); + } + // <-- SwSidebarWin* pWin = GetTopReplyNote(); - if (pWin) + // --> OD 2010-06-03 #i111964# + if ( pWin && pWin->Anchor() ) + // <-- + { pWin->Anchor()->SetAnchorState(AS_END); + } } } } @@ -1127,8 +1141,12 @@ void SwSidebarWin::SetViewState(ViewState bViewState) { mpAnchor->SetAnchorState(AS_ALL); SwSidebarWin* pWin = GetTopReplyNote(); - if (pWin) + // --> OD 2010-06-03 #i111964# + if ( pWin && pWin->Anchor() ) + // <-- + { pWin->Anchor()->SetAnchorState(AS_END); + } mpAnchor->setLineSolid(true); } if (mpShadow) @@ -1156,17 +1174,24 @@ void SwSidebarWin::SetViewState(ViewState bViewState) SwSidebarWin* pTopWinActive = mrMgr.HasActiveSidebarWin() ? mrMgr.GetActiveSidebarWin()->GetTopReplyNote() : 0; - if (pTopWinSelf && (pTopWinSelf!=pTopWinActive)) + // --> OD 2010-06-03 #i111964# + if ( pTopWinSelf && ( pTopWinSelf != pTopWinActive ) && + pTopWinSelf->Anchor() ) + // <-- { - if (pTopWinSelf!=mrMgr.GetActiveSidebarWin()) + if ( pTopWinSelf != mrMgr.GetActiveSidebarWin() ) + { pTopWinSelf->Anchor()->setLineSolid(false); + } pTopWinSelf->Anchor()->SetAnchorState(AS_ALL); } } mpAnchor->setLineSolid(false); } - if (mpShadow) + if ( mpShadow ) + { mpShadow->SetShadowState(SS_NORMAL); + } break; } } |