summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-11-23 17:21:39 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-11-23 17:21:39 +0000
commit0d08134ba677f64b223a9b190d568d10b32f8f47 (patch)
treeea7f6ab4b6462c8f00dbe57eea3517e1d2324343
parentd13b49038fb283b6a2a16cd188b9b5732caf4afe (diff)
CWS-TOOLING: integrate CWS sw32bf07
2009-11-16 13:33:38 +0100 mst r277514 : #i106930#: thints.cxx: isNestedAny: new empty hints at start/end _not_ nested 2009-11-13 10:55:40 +0100 mst r277494 : #i100658#: SwDocInfoField::Expand(): do not add properties that are not found 2009-11-13 10:38:27 +0100 od r277493 : #i106218# method <XMLTextImportHelper::SetOutlineStyles(..)> - First collect all paragraph styles chosen for assignment to the outline style. Then perform the intrinsic assignment. Reason: side effect of assignment in Writer. 2009-11-13 10:32:21 +0100 od r277492 : #i106218# method <HasOutlineStyleToBeWrittenAsNormalListStyle(..)> - consider that the outline style itself is set at the parent paragraph style of one of the to the outline style assigned paragraph styles. 2009-11-13 09:30:06 +0100 os r277490 : #i106730# load styles from source, not from working document 2009-11-13 07:24:13 +0100 os r277489 : #i106859# crash fixed 2009-11-12 15:29:09 +0100 od r277480 : #i103745# method <XMLTextParagraphExport::exportListChange(..)> - correct handling of restart without start value on list level 1
-rwxr-xr-xsw/qa/complex/writer/TextPortionEnumerationTest.java13
-rw-r--r--sw/source/core/doc/docfmt.cxx18
-rw-r--r--sw/source/core/fields/docufld.cxx11
-rw-r--r--sw/source/core/txtnode/thints.cxx6
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx2
5 files changed, 29 insertions, 21 deletions
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
index aec77b891a..a07b3cccad 100755
--- a/sw/qa/complex/writer/TextPortionEnumerationTest.java
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
@@ -2099,6 +2099,19 @@ public class TextPortionEnumerationTest extends ComplexTestCase
.appendChild( url4.dup().appendChild( new TextNode("7") ) )
.appendChild( new TextNode("89") );
doTest(root, false);
+ // empty
+ TreeNode url6 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(7, 7, url6) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( url4.dup().appendChild( new TextNode("4") ) )
+ .appendChild( url5.dup().appendChild( new TextNode("56") ) )
+ .appendChild( url4.dup().appendChild( new TextNode("7") ) )
+// this one gets eaten, but we still need to test inserting it (#i106930#)
+// .appendChild( url6.dup().appendChild( new TextNode("") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
}
public void testRangeHyperlinkRuby() throws Exception
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index f8e267a006..b4a03c2095 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2667,18 +2667,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/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index d5204f1c1d..926d676e2a 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1132,7 +1132,7 @@ String SwDocInfoField::Expand() const
uno::Reference<document::XDocumentProperties> xDocProps( xDPS->getDocumentProperties());
uno::Reference < beans::XPropertySet > xSet( xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW);
uno::Reference < beans::XPropertySetInfo > xSetInfo = xSet->getPropertySetInfo();
-
+
uno::Any aAny;
if( xSetInfo->hasPropertyByName( aName ) )
aAny = xSet->getPropertyValue( aName );
@@ -1147,16 +1147,9 @@ String SwDocInfoField::Expand() const
->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), uno::UNO_QUERY );
uno::Any aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING );
aNew >>= sVal;
- ((SwDocInfoField*)this)->aContent = sVal;
+ const_cast<SwDocInfoField*>(this)->aContent = sVal;
}
}
- else
- {
- // property is "void" - means it has not been added until now - do it!
- aAny <<= ::rtl::OUString(aContent);
- uno::Reference < beans::XPropertyContainer > xCont( xSet, uno::UNO_QUERY );
- xCont->addProperty( aName, ::com::sun::star::beans::PropertyAttribute::REMOVEABLE, aAny );
- }
}
catch (uno::Exception&) {}
}
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 7bd02bf4e4..dee7b90f1a 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/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index ef1bc3375c..36b79871f4 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -3298,7 +3298,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
if(nDocNo == 1 || bPageStylesWithHeaderFooter)
{
- pTargetView->GetDocShell()->_LoadStyles( *pWorkView->GetDocShell(), sal_True );
+ pTargetView->GetDocShell()->_LoadStyles( *rSourceView.GetDocShell(), sal_True );
}
if(nDocNo > 1)
{