Make numbering more flexible by using custom separators. So that
numbers like 3-2(a) can be used instead of boring 3.2.a.
Everything for the goal was available so a simple hack in code makes
it ready to use.
By this patch suffix and prefix in number styles are used
only for specified level number not on the whole number. So the
hardcoded "." separator was removed.
From 48cd31d528d3b9264df83d1c3a09dcdbed40964f Mon Sep 17 00:00:00 2001
From: Mohammad Elahi <ElahiMohammad@gmail.com>
Date: Sat, 27 Aug 2011 03:04:38 +0430
Subject: [PATCH] Make numbering more flexible by custom separator
Make numbering more flexible by using custom separators. So that
numbers like 3-2(a) can be used instead of boring 3.2.a.
Everything for the goal was available so a simple hack in code make
it ready to use.
By this patch suffix and prefix in number styles are used for the
only for specified level number not on the whole number. So the
hardcoded "." separator was removed.
---
sw/source/core/doc/number.cxx | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index a977649..55b6335 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -715,6 +715,7 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
continue;
}
+ aStr+=rNFmt.GetPrefix();
if( rNumVector[ i ] )
{
if( bOnlyArabic )
@@ -724,18 +725,7 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector &
rNumVector,
}
else
aStr += '0'; // alle 0-Level sind eine 0
- if( i != nLevel && aStr.Len() )
- aStr += aDotStr;
- }
-
- //JP 14.12.99: the type dont have any number, so dont append
- // the Post-/Prefix String
- if( bInclStrings && !bOnlyArabic &&
- SVX_NUM_CHAR_SPECIAL != rMyNFmt.GetNumberingType() &&
- SVX_NUM_BITMAP != rMyNFmt.GetNumberingType() )
- {
- aStr.Insert( rMyNFmt.GetPrefix(), 0 );
- aStr += rMyNFmt.GetSuffix();
+ aStr+=rNFmt.GetSuffix();
}
}
}
--
1.7.4.1
From bcbadacf35f6f533a788af8e91400407919f38b2 Mon Sep 17 00:00:00 2001
From: Mohammad Elahi <ElahiMohammad@gmail.com>
Date: Sat, 27 Aug 2011 02:56:58 +0430
Subject: [PATCH] Make numbering more flexible by custom separator
Make numbering more flexible by using custom separators. So that
numbers like 3-2(a) can be used instead of boring 3.2.a.
Everything for the goal was available so a simple hack in code make
it ready to use.
By this patch suffix and prefix in number styles are used for the
only for specified level number not on the whole number. So the
hardcoded "." separator was removed.
---
editeng/source/items/numitem.cxx | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 9f4d838..b01dd7a 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -810,6 +810,7 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool
bInclStrings
}
sal_Bool bDot = sal_True;
+ aStr += rNFmt.GetPrefix();
if( rNum.GetLevelVal()[ i ] )
{
if(SVX_NUM_BITMAP != rNFmt.GetNumberingType())
@@ -819,15 +820,9 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool
bInclStrings
}
else
aStr += sal_Unicode('0'); // all 0-levels are a 0
- if( i != rNum.GetLevel() && bDot)
- aStr += sal_Unicode('.');
- }
- }
- if( bInclStrings )
- {
- aStr.Insert( rMyNFmt.GetPrefix(), 0 );
- aStr += rMyNFmt.GetSuffix();
+ aStr += rNFmt.GetSuffix();
+ }
}
}
return aStr;
--
1.7.4.1
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.