summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLTextNumRuleInfo.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/XMLTextNumRuleInfo.cxx')
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.cxx29
1 files changed, 8 insertions, 21 deletions
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index cbb0d976a836..f9e0912b9b79 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,9 +36,7 @@
#include <com/sun/star/style/NumberingType.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include "XMLTextNumRuleInfo.hxx"
-// --> OD 2008-04-25 #refactorlists#
#include "xmloff/XMLTextListAutoStylePool.hxx"
-// <--
using ::rtl::OUString;
@@ -46,7 +45,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::style;
-// --> OD 2008-05-08 #refactorlists#
// Complete refactoring of the class and enhancement of the class for lists.
XMLTextNumRuleInfo::XMLTextNumRuleInfo()
: msNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules"))
@@ -57,10 +55,8 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo()
, msNumberingIsOutline(RTL_CONSTASCII_USTRINGPARAM("NumberingIsOutline"))
, msPropNameListId(RTL_CONSTASCII_USTRINGPARAM("ListId"))
, msPropNameStartWith(RTL_CONSTASCII_USTRINGPARAM("StartWith"))
- // --> OD 2008-11-26 #158694#
, msContinueingPreviousSubTree(RTL_CONSTASCII_USTRINGPARAM("ContinueingPreviousSubTree"))
, msListLabelStringProp(RTL_CONSTASCII_USTRINGPARAM("ListLabelString"))
- // <--
, mxNumRules()
, msNumRulesName()
, msListId()
@@ -74,20 +70,17 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo()
Reset();
}
-// --> OD 2006-09-27 #i69627#
+// Written OpenDocument file format doesn't fit to the created text document (#i69627#)
void XMLTextNumRuleInfo::Set(
const ::com::sun::star::uno::Reference <
::com::sun::star::text::XTextContent > & xTextContent,
const sal_Bool bOutlineStyleAsNormalListStyle,
const XMLTextListAutoStylePool& rListAutoPool,
- // --> OD 2008-11-26 #158694#
const sal_Bool bExportTextNumberElement )
- // <--
{
Reset();
- // --> OD 2006-09-27 #i69627#
+ // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
mbOutlineStyleAsNormalListStyle = bOutlineStyleAsNormalListStyle;
- // <--
Reference< XPropertySet > xPropSet( xTextContent, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
@@ -110,7 +103,7 @@ void XMLTextNumRuleInfo::Set(
mnListLevel = 0;
}
- // --> OD 2008-12-17 #i97312#
+ // Assertion saving writer document (#i97312#)
if ( mxNumRules.is() && mxNumRules->getCount() < 1 )
{
DBG_ASSERT( false,
@@ -118,9 +111,7 @@ void XMLTextNumRuleInfo::Set(
Reset();
return;
}
- // <--
- // --> OD 2010-01-13 #b6912256#
if ( mnListLevel < 0 )
{
DBG_ASSERT( false,
@@ -129,7 +120,7 @@ void XMLTextNumRuleInfo::Set(
return;
}
- // --> OD 2006-09-27 #i69627#
+ // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
bool bSuppressListStyle( false );
if ( mxNumRules.is() )
{
@@ -148,7 +139,6 @@ void XMLTextNumRuleInfo::Set(
}
if( mxNumRules.is() && !bSuppressListStyle )
- // <--
{
// First try to find the numbering rules in the list auto style pool.
// If not found, the numbering rules instance has to be named.
@@ -171,20 +161,18 @@ void XMLTextNumRuleInfo::Set(
xPropSet->getPropertyValue( msPropNameListId ) >>= msListId;
}
- // --> OD 2008-11-26 #158694#
mbContinueingPreviousSubTree = sal_False;
if( xPropSetInfo->hasPropertyByName( msContinueingPreviousSubTree ) )
{
xPropSet->getPropertyValue( msContinueingPreviousSubTree ) >>= mbContinueingPreviousSubTree;
}
- // <--
mbIsNumbered = sal_True;
if( xPropSetInfo->hasPropertyByName( msNumberingIsNumber ) )
{
if( !(xPropSet->getPropertyValue( msNumberingIsNumber ) >>= mbIsNumbered ) )
{
- OSL_ENSURE( false, "numbered paragraph without number info" );
+ OSL_FAIL( "numbered paragraph without number info" );
mbIsNumbered = sal_False;
}
}
@@ -224,14 +212,12 @@ void XMLTextNumRuleInfo::Set(
}
}
- // --> OD 2008-11-26 #158694#
msListLabelString = ::rtl::OUString();
if ( bExportTextNumberElement &&
xPropSetInfo->hasPropertyByName( msListLabelStringProp ) )
{
xPropSet->getPropertyValue( msListLabelStringProp ) >>= msListLabelString;
}
- // <--
// paragraph's list level range is [0..9] representing list levels [1..10]
++mnListLevel;
@@ -258,4 +244,5 @@ sal_Bool XMLTextNumRuleInfo::BelongsToSameList( const XMLTextNumRuleInfo& rCmp )
return bRet;
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */