summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-22 11:49:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-22 11:57:04 +0000
commit753628eec23f4b4ba037953f05c1430b5108bf15 (patch)
tree9910b8244e4ecbcfee20b0f50440ab7ad6e8455b /sw
parent5c89214a80f0284eafaf4eba23243dfe3c9f7193 (diff)
fix sw build
Change-Id: I2d42420307f359b30cce5422629689bdc964ebd9
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docfmt.cxx2
-rw-r--r--sw/source/core/doc/docnum.cxx2
-rw-r--r--sw/source/core/docnode/node.cxx4
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx8
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx8
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/filter/xml/swxml.cxx2
-rw-r--r--sw/source/ui/dialog/regionsw.cxx6
-rw-r--r--sw/source/ui/shells/textsh1.cxx4
-rw-r--r--sw/source/ui/shells/txtattr.cxx2
-rw-r--r--sw/source/ui/uiview/view2.cxx2
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx2
12 files changed, 25 insertions, 21 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 6355ec2b8843..1a9024579413 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -226,7 +226,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
break;
case RES_PARATR_NUMRULE:
{
- bSave = 0 != ((SwNumRuleItem*)pItem)->GetValue().Len();
+ bSave = !((SwNumRuleItem*)pItem)->GetValue().isEmpty();
}
break;
case RES_PARATR_OUTLINELEVEL: //#outline level,add by zhaojianwei
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 5b1680808d63..c4a3c1fea5da 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -159,7 +159,7 @@ void SwDoc::PropagateOutlineRule()
const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( sal_False );
// Check on document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE no longer needed.
- if ( rCollRuleItem.GetValue().Len() == 0 )
+ if ( rCollRuleItem.GetValue().isEmpty() )
{
SwNumRule * pMyOutlineRule = GetOutlineNumRule();
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 3c77fbbdfc25..cca5729fd4ef 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1041,7 +1041,7 @@ sal_Bool SwCntntNode::InvalidateNumRule()
const SfxPoolItem* pItem;
if( GetNodes().IsDocNodes() &&
0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, sal_True )) &&
- ((SwNumRuleItem*)pItem)->GetValue().Len() &&
+ !((SwNumRuleItem*)pItem)->GetValue().isEmpty() &&
0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() ) ) )
{
@@ -1405,7 +1405,7 @@ sal_Bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
const SfxPoolItem* pNameItem = 0;
if ( 0 != GetCondFmtColl() ||
SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, sal_False, &pNameItem ) ||
- 0 == static_cast<const SfxStringItem*>(pNameItem)->GetValue().Len() )
+ static_cast<const SfxStringItem*>(pNameItem)->GetValue().isEmpty() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFmtColl(), GetFmtColl() );
else
const_cast<SfxItemSet*>(mpAttrSet.get())->SetParent( &GetFmtColl()->GetAttrSet() );
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 986611721d4a..a0bc301dcdba 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2358,7 +2358,7 @@ SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
if ( pColl )
{
const SwNumRuleItem& rDirectItem = pColl->GetNumRule( sal_False );
- if ( rDirectItem.GetValue().Len() == 0 )
+ if ( rDirectItem.GetValue().isEmpty() )
{
pRet = 0L;
}
@@ -3465,7 +3465,7 @@ namespace {
if ( rTxtNode.IsEmptyListStyleDueToSetOutlineLevelAttr() )
{
const SwNumRuleItem& rNumRuleItem = rTxtNode.GetTxtColl()->GetNumRule();
- if ( rNumRuleItem.GetValue().Len() > 0 )
+ if ( !rNumRuleItem.GetValue().isEmpty() )
{
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
}
@@ -4292,7 +4292,7 @@ namespace {
const SwNumRuleItem& pNumRuleItem =
dynamic_cast<const SwNumRuleItem&>(pItem);
- if ( pNumRuleItem.GetValue().Len() > 0 )
+ if ( !pNumRuleItem.GetValue().isEmpty() )
{
mbAddTxtNodeToList = true;
// #i105562#
@@ -4406,7 +4406,7 @@ namespace {
const SwNumRuleItem* pNumRuleItem =
dynamic_cast<const SwNumRuleItem*>(pItem);
- if ( pNumRuleItem->GetValue().Len() > 0 )
+ if ( !pNumRuleItem->GetValue().isEmpty() )
{
mbAddTxtNodeToList = true;
// #i70748#
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 204dffa1d267..67eb8cf57cff 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2860,7 +2860,7 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec
{
// try to generate the encryption data based on password
SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False );
- if ( pPasswordItem && pPasswordItem->GetValue().Len() && pPasswordItem->GetValue().Len() <= 15 )
+ if ( pPasswordItem && !pPasswordItem->GetValue().isEmpty() && pPasswordItem->GetValue().getLength() <= 15 )
{
// Generate random number with a seed of time as salt.
TimeValue aTime;
@@ -2875,8 +2875,10 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec
sal_Unicode aPassword[16];
memset( aPassword, 0, sizeof( aPassword ) );
- for ( xub_StrLen nChar = 0; nChar < pPasswordItem->GetValue().Len(); ++nChar )
- aPassword[nChar] = pPasswordItem->GetValue().GetChar(nChar);
+
+ OUString sPassword(pPasswordItem->GetValue());
+ for ( sal_Int32 nChar = 0; nChar < sPassword.getLength(); ++nChar )
+ aPassword[nChar] = sPassword[nChar];
rCodec.InitKey( aPassword, pDocId );
aEncryptionData = rCodec.GetEncryptionData();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index e8007d53b0a3..7440be4e5516 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -266,7 +266,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
AttrOutput().OutputItem( *pItem );
// switch off the numerbering?
- if ( !( (SwNumRuleItem*)pItem )->GetValue().Len() &&
+ if ( ( (SwNumRuleItem*)pItem )->GetValue().isEmpty() &&
SFX_ITEM_SET != rSet.GetItemState( RES_LR_SPACE, false) &&
SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, true, &pItem ) )
{
@@ -3272,7 +3272,7 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
const SwTxtNode* pTxtNd = 0;
sal_uInt16 nNumId;
sal_uInt8 nLvl = 0;
- if ( rNumRule.GetValue().Len() )
+ if (!rNumRule.GetValue().isEmpty())
{
const SwNumRule* pRule = GetExport().pDoc->FindNumRulePtr(
rNumRule.GetValue() );
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 2d2f108c591e..ca25dd2ea58e 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -461,7 +461,7 @@ static void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// apply outline numbering rule, if none is set.
const SfxPoolItem& rItem =
aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, sal_False );
- if ( static_cast<const SwNumRuleItem&>(rItem).GetValue().Len() == 0 )
+ if ( static_cast<const SwNumRuleItem&>(rItem).GetValue().isEmpty() )
{
SwNumRuleItem aItem( pOutlineRule->GetName() );
aCreatedDefaultOutlineStyles[ i ]->SetFmtAttr( aItem );
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 80005c685f43..b2fcd7adc19d 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -95,8 +95,10 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
String aTmpStr;
if ( SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_NAME, sal_True, &pItem) )
- aTmpStr = rSh.GetUniqueSectionName(
- &((const SfxStringItem *)pItem)->GetValue() );
+ {
+ String sRemoveWhenUniStringIsGone = ((const SfxStringItem *)pItem)->GetValue();
+ aTmpStr = rSh.GetUniqueSectionName(&sRemoveWhenUniStringIsGone);
+ }
else
aTmpStr = rSh.GetUniqueSectionName();
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 78d607167317..5a147adb9ea5 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -412,7 +412,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem )
aStr = pNameItem->GetValue();
- bool bFont = pFont && pFont->GetValue().Len();
+ bool bFont = pFont && !pFont->GetValue().isEmpty();
rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
if ( bFont )
@@ -993,7 +993,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.StartAction();
if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) )
{
- if ( ((SfxStringItem*)pItem)->GetValue().Len() )
+ if ( !((SfxStringItem*)pItem)->GetValue().isEmpty() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue(), pPaM);
}
rWrtSh.SetAttr( *pSet, 0, pPaM );
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 266602597372..3f769db5a95e 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -458,7 +458,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
rSh.StartUndo( UNDO_START );
if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,sal_False,&pItem) )
{
- if ( ((SfxStringItem*)pItem)->GetValue().Len() )
+ if ( !((SfxStringItem*)pItem)->GetValue().isEmpty() )
rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
}
rSh.SetAttr(*pDlg->GetOutputItemSet());
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index cf690f532821..ed0245dc3441 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -371,7 +371,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
if ( pAsLink )
bAsLink = pAsLink->GetValue();
- if ( pStyle && pStyle->GetValue().Len() )
+ if ( pStyle && !pStyle->GetValue().isEmpty() )
sGraphicFormat = pStyle->GetValue();
}
else
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 11d745521ed7..c9e5e5d51acb 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -300,7 +300,7 @@ SfxItemPresentation SwNumRuleItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- if( GetValue().Len() )
+ if( !GetValue().isEmpty() )
rText = SW_RESSTR( STR_NUMRULE_ON ) +
"(" + GetValue() + ")";
else