summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-10-29 12:22:30 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-10-29 12:22:30 +0000
commit2de41c091cabf245f3759908418e82e27aca477f (patch)
tree0af4cbf0d37773787872984faf4f96cb5c4ab776
parent110cdebe9e63efeac995dedd931772ddfffdd320 (diff)
CWS-TOOLING: integrate CWS c07v026_OOO320
2009-10-19 10:26:11 +0200 mav r277008 : #b6886425# use standard solution to encode the URL for the Gnome 2009-10-19 08:38:28 +0200 mav r276998 : #b6886425# encode the URL correctly for the Gnome 2009-10-07 12:49:32 +0200 os r276749 : #b6887668# resize items depending on the item text length 2009-09-28 18:42:32 +0200 dr r276499 : #b6883075# shrink print ranges to Excel sheet limits 2009-09-28 16:50:25 +0200 od r276497 : #b6882166# method <SwSectionFrm::SimpleFormat(..)> - assure notification on position changes, otherwise the layout will not be correct. 2009-09-15 18:31:37 +0200 dr r276185 : #b6872823# check cursor before using, patch by aw 2009-09-09 10:52:52 +0200 od r275975 : #b6879723# correct handling of new list level attributes regarding paragraph indent values, especially in case of OOo 2.0 and former hidden compatibility option "Ignore first line indent on numbering" 2009-09-08 11:10:31 +0200 od r275918 : #b6876367# method <lcl_SetTxtFmtColl(..)> - do not reset list attributes at paragraph, if its applied list style will not change due to the newly applied paragraph style. 2009-09-07 12:48:58 +0200 obo r275890 : Merge from c07v025 into this CWS
-rw-r--r--sw/source/core/doc/docfmt.cxx61
-rw-r--r--sw/source/core/layout/sectfrm.cxx4
-rw-r--r--sw/source/core/text/itrcrsr.cxx25
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5
-rw-r--r--sw/source/ui/uno/unomod.cxx34
5 files changed, 76 insertions, 53 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index fff14d4ed3..f8e267a006 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1744,36 +1744,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 7930190ffa..84e650d6fd 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2852,6 +2852,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;
@@ -2885,8 +2888,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;