diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2009-11-24 13:21:26 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2009-11-24 13:21:26 +0100 |
commit | a296ef0e892862959725506e95bb1772cb964714 (patch) | |
tree | f633a1c12c33913537dbcd465ba6b44d20402b46 /sw/source | |
parent | 3ee0f60e251fc31f13cac15047ca3d3b9d2f56b6 (diff) | |
parent | d6ab00ec4be95303cfbd34acae8ae9b841229b5e (diff) |
CWS-TOOLING: integrate CWS c07v026_DEV300
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 61 | ||||
-rw-r--r-- | sw/source/core/layout/sectfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/itrcrsr.cxx | 25 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/uno/unomod.cxx | 34 |
5 files changed, 76 insertions, 53 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 4b8b41ec55..3151e2f291 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1746,36 +1746,45 @@ BOOL lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs ) pFmt != pCNd->GetFmtColl() && pFmt->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET ) { - // --> OD 2008-04-08 #refactorlists# -// if ( pPara->pHistory ) -// { -// SwTxtNode* pTNd( dynamic_cast<SwTxtNode*>(pCNd) ); -// ASSERT( pTNd, -// "<lcl_SetTxtFmtColl(..)> - text node expected -> crash" ); -// SwRegHistory aRegH( pTNd, *pTNd, pPara->pHistory ); -// pCNd->ResetAttr( RES_PARATR_NUMRULE ); -// } -// else -// { -// pCNd->ResetAttr( RES_PARATR_NUMRULE ); -// } - std::auto_ptr< SwRegHistory > pRegH; - if ( pPara->pHistory ) + // --> OD 2009-09-07 #b6876367# + // Check, if the list style of the paragraph will change. + bool bChangeOfListStyleAtParagraph( true ); + SwTxtNode* pTNd( dynamic_cast<SwTxtNode*>(pCNd) ); + ASSERT( pTNd, + "<lcl_SetTxtFmtColl(..)> - text node expected -> crash" ); { - SwTxtNode* pTNd( dynamic_cast<SwTxtNode*>(pCNd) ); - ASSERT( pTNd, - "<lcl_SetTxtFmtColl(..)> - text node expected -> crash" ); - pRegH.reset( new SwRegHistory( pTNd, *pTNd, pPara->pHistory ) ); + SwNumRule* pNumRuleAtParagraph( pTNd->GetNumRule() ); + if ( pNumRuleAtParagraph ) + { + const SwNumRuleItem& rNumRuleItemAtParagraphStyle = + pFmt->GetNumRule(); + if ( rNumRuleItemAtParagraphStyle.GetValue() == + pNumRuleAtParagraph->GetName() ) + { + bChangeOfListStyleAtParagraph = false; + } + } } - pCNd->ResetAttr( RES_PARATR_NUMRULE ); + if ( bChangeOfListStyleAtParagraph ) + { + // --> OD 2008-04-08 #refactorlists# + std::auto_ptr< SwRegHistory > pRegH; + if ( pPara->pHistory ) + { + pRegH.reset( new SwRegHistory( pTNd, *pTNd, pPara->pHistory ) ); + } + + pCNd->ResetAttr( RES_PARATR_NUMRULE ); - // reset all list attributes - pCNd->ResetAttr( RES_PARATR_LIST_LEVEL ); - pCNd->ResetAttr( RES_PARATR_LIST_ISRESTART ); - pCNd->ResetAttr( RES_PARATR_LIST_RESTARTVALUE ); - pCNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED ); - pCNd->ResetAttr( RES_PARATR_LIST_ID ); + // reset all list attributes + pCNd->ResetAttr( RES_PARATR_LIST_LEVEL ); + pCNd->ResetAttr( RES_PARATR_LIST_ISRESTART ); + pCNd->ResetAttr( RES_PARATR_LIST_RESTARTVALUE ); + pCNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED ); + pCNd->ResetAttr( RES_PARATR_LIST_ID ); + } + // <-- } // <-- } diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 5dcb6040d7..1c53fea46d 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -1160,6 +1160,10 @@ void SwSectionFrm::SimpleFormat() SWRECTFN( this ) if( GetPrev() || GetUpper() ) { + // --> OD 2009-09-28 #b6882166# + // assure notifications on position changes. + const SwLayNotify aNotify( this ); + // <-- (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), FALSE ); bValidPos = TRUE; } diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 7fbb6bae55..b40398463f 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -158,7 +158,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) const SwTxtNode *pNode = pFrm->GetTxtNode(); const SvxLRSpaceItem &rSpace = pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace(); - // --> OD 2009-09-02 #i95907# + // --> OD 2009-09-08 #i95907#, #b6879723# const bool bListLevelIndentsApplicable = pFrm->GetTxtNode()->AreListLevelIndentsApplicable(); // <-- @@ -183,7 +183,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) pFrm->Prt().Left() + nLMWithNum - pNode->GetLeftMarginWithNum( sal_False ) - - // --> OD 2009-09-02 #i95907# + // --> OD 2009-09-08 #i95907#, #b6879723# // rSpace.GetLeft() + // rSpace.GetTxtLeft(); ( bListLevelIndentsApplicable @@ -193,14 +193,18 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) } else { - if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) + // --> OD 2009-09-08 #i95907#, #b6879723# +// if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) + if ( bListLevelIndentsApplicable || + !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) + // <-- { // this calculation is identical this the calculation for R2L layout - see above nLeft = pFrm->Frm().Left() + pFrm->Prt().Left() + nLMWithNum - pNode->GetLeftMarginWithNum( sal_False ) - - // --> OD 2009-09-02 #i95907# + // --> OD 2009-09-08 #i95907#, #b6879723# // rSpace.GetLeft() + // rSpace.GetTxtLeft(); ( bListLevelIndentsApplicable @@ -223,7 +227,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) // paras inside cells inside new documents: ( pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) || !pFrm->IsInTab() || - !nLMWithNum) ) + !nLMWithNum ) ) // <-- { nLeft = pFrm->Prt().Left() + pFrm->Frm().Left(); @@ -235,8 +239,8 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nFirst = nLeft; else { - short nFLOfst; - long nFirstLineOfs; + short nFLOfst = 0; + long nFirstLineOfs = 0; if( !pNode->GetFirstLineOfsWithNum( nFLOfst ) && rSpace.IsAutoFirst() ) { @@ -290,8 +294,13 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) else nFirstLineOfs = nFLOfst; + // --> OD 2009-09-08 #i95907#, #b6879723# +// if ( pFrm->IsRightToLeft() || +// !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) if ( pFrm->IsRightToLeft() || - !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) + bListLevelIndentsApplicable || + !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) + // <-- { nFirst = nLeft + nFirstLineOfs; } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 1b0744a177..3df01632b8 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2842,6 +2842,9 @@ long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const { BOOL bRet( FALSE ); + // --> OD 2009-09-08 #i95907#, #b6879723# + rFLOffset = 0; + // <-- // --> OD 2005-11-02 #i51089 - TUNING# const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; @@ -2875,8 +2878,6 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const } // <-- } - else - rFLOffset = 0; bRet = TRUE; } diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 2f7716bac1..d5315fbd33 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -576,17 +576,17 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, break; case HANDLE_PRINTSET_PROSPECT_RTL: { - rValue <<= mpPrtOpt->IsPrintProspect_RTL(); + bBoolVal = mpPrtOpt->IsPrintProspect_RTL(); } break; case HANDLE_PRINTSET_PLACEHOLDER: { - rValue <<= mpPrtOpt->IsPrintTextPlaceholder(); + bBoolVal = mpPrtOpt->IsPrintTextPlaceholder(); } break; case HANDLE_PRINTSET_HIDDEN_TEXT: { - rValue <<= mpPrtOpt->IsPrintHiddenText(); + bBoolVal = mpPrtOpt->IsPrintHiddenText(); } break; default: @@ -823,7 +823,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c break; case HANDLE_VIEWSET_HORI_RULER_METRIC: case HANDLE_VIEWSET_VERT_RULER_METRIC: - { + { sal_Int32 nUnit = -1; if( rValue >>= nUnit ) switch( nUnit ) @@ -844,9 +844,9 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c mbApplyVRulerMetric = sal_True; } break; - default: + default: throw IllegalArgumentException(); - } + } } break; default: @@ -862,17 +862,17 @@ void SwXViewSettings::_postSetValues () if(mbApplyZoom ) pView->SetZoom( (SvxZoomType)mpViewOption->GetZoomType(), mpViewOption->GetZoom(), sal_True ); - if(mbApplyHRulerMetric) + if(mbApplyHRulerMetric) pView->ChangeTabMetric((FieldUnit)eHRulerUnit); - if(mbApplyVRulerMetric) + if(mbApplyVRulerMetric) pView->ChangeVLinealMetric((FieldUnit)eVRulerUnit); - + } else { - if(mbApplyHRulerMetric) + if(mbApplyHRulerMetric) SW_MOD()->ApplyRulerMetric( (FieldUnit)eHRulerUnit, sal_True, bWeb ); - if(mbApplyVRulerMetric) + if(mbApplyVRulerMetric) SW_MOD()->ApplyRulerMetric( (FieldUnit)eVRulerUnit, sal_False, bWeb ); } @@ -880,7 +880,7 @@ void SwXViewSettings::_postSetValues () SW_MOD()->ApplyUsrPref( *mpViewOption, pView, pView ? VIEWOPT_DEST_VIEW_ONLY : bWeb ? VIEWOPT_DEST_WEB : VIEWOPT_DEST_TEXT ); - + delete mpViewOption; mpViewOption = NULL; @@ -1004,7 +1004,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u } break; case HANDLE_VIEWSET_HORI_RULER_METRIC: - { + { if ( pView ) { FieldUnit eUnit; @@ -1015,12 +1015,12 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( bWeb ); rValue <<= (sal_Int32)pUsrPref->GetHScrollMetric(); - } + } bBool = sal_False; } break; case HANDLE_VIEWSET_VERT_RULER_METRIC: - { + { if ( pView ) { FieldUnit eUnit; @@ -1031,7 +1031,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( bWeb ); rValue <<= (sal_Int32)pUsrPref->GetVScrollMetric(); - } + } bBool = sal_False; } break; |