[Libreoffice-commits] core.git: sw/inc sw/source
Tor Lillqvist
tml at collabora.com
Sun Nov 3 18:53:05 CET 2013
sw/inc/swtypes.hxx | 1 -
sw/source/core/bastyp/swtypes.cxx | 1 -
sw/source/core/doc/number.cxx | 8 ++++----
sw/source/core/doc/poolfmt.cxx | 6 +++---
sw/source/core/table/swtable.cxx | 6 +++---
sw/source/filter/ww8/rtfexport.cxx | 2 +-
sw/source/filter/ww8/wrtw8num.cxx | 2 +-
sw/source/ui/app/applab.cxx | 2 +-
8 files changed, 13 insertions(+), 15 deletions(-)
New commits:
commit 574d7d9c79e40c09bee34d3e692d1d88d6a2b975
Author: Tor Lillqvist <tml at collabora.com>
Date: Sun Nov 3 19:52:12 2013 +0200
Get rid of global aDotStr
Change-Id: I6be71a738162ed53f2b81b7e03a18b1a8ddbdae0
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index fe2636e..07b22f9 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -81,7 +81,6 @@ const SwTwips lMinBorder = 1134;
// Constant strings.
SW_DLLPUBLIC extern OUString aEmptyOUStr; // remove once aEmptyOUStr can be changed to OUString
-SW_DLLPUBLIC extern OUString aDotStr; // '.'
// For inserting of captions (what and where to insert).
// It's here because it is not big enough to justify its own hxx
diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx
index 42c9d13..6a4eea1 100644
--- a/sw/source/core/bastyp/swtypes.cxx
+++ b/sw/source/core/bastyp/swtypes.cxx
@@ -48,7 +48,6 @@
using namespace com::sun::star;
OUString aEmptyOUStr; // remove once aEmptyOUStr can be changed to OUString
-OUString aDotStr('.'); // constant string
IMPL_FIXEDMEMPOOL_NEWDEL( SwAttrSet )
IMPL_FIXEDMEMPOOL_NEWDEL( SwStartNode )
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index cfd9076..6b992ab 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -408,7 +408,7 @@ SwNumRule::SwNumRule( const OUString& rNm,
pFmt->SetLSpace( lNumIndent );
pFmt->SetAbsLSpace( lNumIndent + SwNumRule::GetNumIndent( n ) );
pFmt->SetFirstLineOffset( lNumFirstLineOffset );
- pFmt->SetSuffix( aDotStr );
+ pFmt->SetSuffix( "." );
pFmt->SetBulletChar( numfunc::GetBulletChar(n));
SwNumRule::aBaseFmts[ NUM_RULE ][ n ] = pFmt;
}
@@ -431,7 +431,7 @@ SwNumRule::SwNumRule( const OUString& rNm,
pFmt->SetListtabPos( cIndentAt[ n ] );
pFmt->SetFirstLineIndent( cFirstLineIndent );
pFmt->SetIndentAt( cIndentAt[ n ] );
- pFmt->SetSuffix( aDotStr );
+ pFmt->SetSuffix( "." );
pFmt->SetBulletChar( numfunc::GetBulletChar(n));
SwNumRule::aLabelAlignmentBaseFmts[ NUM_RULE ][ n ] = pFmt;
}
@@ -682,7 +682,7 @@ OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVecto
{
// Should 1.1.1 --> 2. NoNum --> 1..1 or 1.1 ??
// if( i != rNum.nMyLevel )
- // aStr += aDotStr;
+ // aStr += ".";
continue;
}
@@ -696,7 +696,7 @@ OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVecto
else
aStr += "0"; // all 0 level are a 0
if( i != nLevel && !aStr.isEmpty() )
- aStr += aDotStr;
+ aStr += ".";
}
// The type doesn't have any number, so don't append
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index fcd9254..d7995fb 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -1646,7 +1646,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
- aFmt.SetSuffix( aDotStr );
+ aFmt.SetSuffix( "." );
static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
@@ -1795,7 +1795,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER);
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetIncludeUpperLevels( 1 );
- aFmt.SetSuffix( aDotStr );
+ aFmt.SetSuffix( "." );
static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
@@ -1873,7 +1873,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetNumberingType(SVX_NUM_ARABIC);
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
- aFmt.SetSuffix( aDotStr );
+ aFmt.SetSuffix( "." );
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index c9e4ee8..42b74f8 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1388,7 +1388,7 @@ sal_uInt16 SwTable::_GetBoxNum( OUString& rStr, sal_Bool bFirstPart,
}
else
{
- const sal_Int32 nPos = rStr.indexOf( aDotStr );
+ const sal_Int32 nPos = rStr.indexOf( "." );
if ( nPos<0 )
{
nRet = 0;
@@ -1916,13 +1916,13 @@ OUString SwTableBox::GetName() const
sTmp = OUString::number( nPos = pLines->GetPos( pLine ) + 1 );
if( !sNm.isEmpty() )
- sNm = sTmp + aDotStr + sNm;
+ sNm = sTmp + "." + sNm;
else
sNm = sTmp;
sTmp = OUString::number(( nPos = pBoxes->GetPos( pBox )) + 1 );
if( 0 != ( pBox = pLine->GetUpper()) )
- sNm = sTmp + aDotStr + sNm;
+ sNm = sTmp + "." + sNm;
else
sw_GetTblBoxColStr( nPos, sNm );
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 36f6509..b4501cc 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -189,7 +189,7 @@ static bool IsExportNumRule( const SwNumRule& rRule, sal_uInt8* pEnd = 0 )
for( nLvl = 0; nLvl < nEnd; ++nLvl )
if( SVX_NUM_NUMBER_NONE != ( pNFmt = &rRule.Get( nLvl ))
->GetNumberingType() || !pNFmt->GetPrefix().isEmpty() ||
- (!pNFmt->GetSuffix().isEmpty() && !pNFmt->GetSuffix().equals(aDotStr)) )
+ (!pNFmt->GetSuffix().isEmpty() && !pNFmt->GetSuffix().equals(".")) )
break;
if( pEnd )
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index bea022e..5083368 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -770,7 +770,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
(rRul.Get(nUpper).GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // Nummerierung drueber ?
{
// dann Punkt einfuegen
- SwWw8_InsertAnlText( aDotStr, rpCh, rCharLen,
+ SwWw8_InsertAnlText( ".", rpCh, rCharLen,
rAnlv.cbTextBefore );
}
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 3980e43..9c25742 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -343,7 +343,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
sLinkName.append(MASTER_LABEL);
aSect.SetLinkFileName(sLinkName.makeStringAndClear());
aSect.SetProtectFlag(true);
- pSh->Insert(aDotStr); // Dummytext to allocate the Section
+ pSh->Insert("."); // Dummytext to allocate the Section
pSh->SttDoc();
pSh->EndDoc(sal_True); // Select everything in the frame
pSh->InsertSection(aSect);
More information about the Libreoffice-commits
mailing list