summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-12-05 19:29:07 +0100
committerMathias Bauer <mba@openoffice.org>2009-12-05 19:29:07 +0100
commitf114eda3f3285e5df3ac5e3f6a0474bbaa472e26 (patch)
treef50553b5a1c4f2aa05c6579283b71134fea2f95b /sw/source/core
parent4c2df1ef1d3a8f73429ec9bd4e328fd659d89a6e (diff)
parentb4c4d7ac0a50b17c526fc8092d1fa3b7b39dadd5 (diff)
merge to m67
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/docfmt.cxx18
-rw-r--r--sw/source/core/doc/doctxm.cxx4
-rw-r--r--sw/source/core/text/porfld.cxx7
-rw-r--r--sw/source/core/text/porfld.hxx2
-rw-r--r--sw/source/core/txtnode/thints.cxx6
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx3
6 files changed, 24 insertions, 16 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 0a350ddfd17e..312f8fb7b00f 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2669,18 +2669,18 @@ namespace docfunc
if ( !pParentTxtFmtColl )
continue;
- // --> OD 2007-12-07 #i77708#
- // consider that explicitly no list style is set - empty string
- // at numrule item.
-// const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule();
-// if ( rDirectItem.GetValue().Len() != 0 )
if ( SFX_ITEM_SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) )
{
- bRet = true;
- break;
+ // --> OD 2009-11-12 #i106218#
+ // consider that the outline style is set
+ const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule();
+ if ( rDirectItem.GetValue() != rDoc.GetOutlineNumRule()->GetName() )
+ {
+ bRet = true;
+ break;
+ }
+ // <--
}
- // <--
-
}
}
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 27cf4925c01c..4433d3b5e7e2 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -2220,7 +2220,9 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
}
}
pNd->InsertText( aNumStr, aPos,
- IDocumentContentOperations::INS_EMPTYEXPAND );
+ static_cast<IDocumentContentOperations::InsertFlags>(
+ IDocumentContentOperations::INS_EMPTYEXPAND |
+ IDocumentContentOperations::INS_FORCEHINTEXPAND) );
if(pPageNoCharFmt)
{
SwFmtCharFmt aCharFmt( pPageNoCharFmt );
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 932eb1c72b6f..162c0fddd07b 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -82,8 +82,13 @@ SwFldPortion *SwFldPortion::Clone( const XubString &rExpand ) const
{
SwFont *pNewFnt;
if( 0 != ( pNewFnt = pFnt ) )
+ {
pNewFnt = new SwFont( *pFnt );
- SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt );
+ }
+ // --> OD 2009-11-25 #i107143#
+ // pass placeholder property to created <SwFldPortion> instance.
+ SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt, bPlaceHolder );
+ // <--
pClone->SetNextOffset( nNextOffset );
pClone->m_bNoLength = this->m_bNoLength;
return pClone;
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 331ee8d401c7..b2ece8ffe8c6 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -60,7 +60,7 @@ protected:
sal_Bool bAnimated : 1; // wird von SwGrfNumPortion benutzt
sal_Bool bNoPaint : 1; // wird von SwGrfNumPortion benutzt
sal_Bool bReplace : 1; // wird von SwGrfNumPortion benutzt
- sal_Bool bPlaceHolder : 1;
+ const sal_Bool bPlaceHolder : 1;
sal_Bool m_bNoLength : 1; // HACK for meta suffix (no CH_TXTATR)
inline void SetFont( SwFont *pNew ) { pFnt = pNew; }
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index f77c07dfcbc6..b0d23e7ca4ee 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -153,12 +153,14 @@ bool isOverlap(const xub_StrLen nStart1, const xub_StrLen nEnd1,
|| ((nStart1 < nStart2) && (nStart2 < nEnd1) && (nEnd1 < nEnd2)); // (2)
}
+/// #i106930#: now asymmetric: empty hint1 is _not_ nested, but empty hint2 is
static
bool isNestedAny(const xub_StrLen nStart1, const xub_StrLen nEnd1,
const xub_StrLen nStart2, const xub_StrLen nEnd2)
{
- return (nStart1 == nStart2) // in this case ends do not matter
- || ((nStart1 < nStart2) ? (nEnd1 >= nEnd2) : (nEnd1 <= nEnd2));
+ return ((nStart1 == nStart2) || (nEnd1 == nEnd2))
+ ? (nStart1 != nEnd1) // same start/end: nested except if hint1 empty
+ : ((nStart1 < nStart2) ? (nEnd1 >= nEnd2) : (nEnd1 <= nEnd2));
}
static
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index decc9174a0f3..6fc184e2a50f 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -293,7 +293,6 @@ void SAL_CALL SwXParagraph::SetPropertyValues_Impl(
const OUString* pPropertyNames = rPropertyNames.getConstArray();
const uno::Any* pValues = rValues.getConstArray();
const SfxItemPropertyMap* pMap = m_pPropSet->getPropertyMap();
- OUString sTmp;
SwParaSelection aParaSel( & aCursor );
for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
{
@@ -306,7 +305,7 @@ void SAL_CALL SwXParagraph::SetPropertyValues_Impl(
throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) );
SwXTextCursor::SetPropertyValue(aCursor, *m_pPropSet,
- sTmp, pValues[nProp]);
+ pPropertyNames[nProp], pValues[nProp]);
}
}
}