summaryrefslogtreecommitdiff
path: root/sw/source/core/fields/docufld.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/fields/docufld.cxx')
-rw-r--r--sw/source/core/fields/docufld.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 6bb8ff4902ea..9f1b19db95fa 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -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&) {}
}
@@ -1877,6 +1870,11 @@ void SwPostItField::SetTextObject( OutlinerParaObject* pText )
mpText = pText;
}
+sal_uInt32 SwPostItField::GetNumberOfParagraphs() const
+{
+ return (mpText) ? mpText->Count() : 1;
+}
+
/*-----------------05.03.98 13:42-------------------
--------------------------------------------------*/