Improve readability of OUString concatanation in SvxPixelCtlAccessible
, SvxShowCharSetVirtualAcc , SvxBmpMask , SvxSuperContourDlg , and SvxTPView It is more readable and more efficient as a bonus. See: https://goo.gl/jsVAwy: Change-Id: Id0641673e1e6fb04b3193c2b8e9a2ab3156b4552 Reviewed-on: https://gerrit.libreoffice.org/26794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
committed by
Noel Grandin
parent
1a13a9a46a
commit
35de25aac0
@@ -644,7 +644,7 @@ OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription()
|
|||||||
{
|
{
|
||||||
OExternalLockGuard aGuard( this );
|
OExternalLockGuard aGuard( this );
|
||||||
ensureAlive();
|
ensureAlive();
|
||||||
OUString sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE );
|
OUString sDescription;
|
||||||
|
|
||||||
const OUString aCharStr( mpParent->maText);
|
const OUString aCharStr( mpParent->maText);
|
||||||
sal_Int32 nStrIndex = 0;
|
sal_Int32 nStrIndex = 0;
|
||||||
@@ -660,7 +660,10 @@ OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription()
|
|||||||
}
|
}
|
||||||
if( c < 256 )
|
if( c < 256 )
|
||||||
snprintf( buf+6, 10, " (%" SAL_PRIuUINT32 ")", c );
|
snprintf( buf+6, 10, " (%" SAL_PRIuUINT32 ")", c );
|
||||||
sDescription += " " + OUString(buf, strlen(buf), RTL_TEXTENCODING_ASCII_US);
|
|
||||||
|
sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE )
|
||||||
|
+ " "
|
||||||
|
+ OUString(buf, strlen(buf), RTL_TEXTENCODING_ASCII_US);
|
||||||
|
|
||||||
return sDescription;
|
return sDescription;
|
||||||
}
|
}
|
||||||
|
@@ -843,12 +843,11 @@ OUString SvxPixelCtlAccessibleChild::GetName()
|
|||||||
sal_Int32 nXIndex = mnIndexInParent % mrParentWindow.GetLineCount();
|
sal_Int32 nXIndex = mnIndexInParent % mrParentWindow.GetLineCount();
|
||||||
sal_Int32 nYIndex = mnIndexInParent / mrParentWindow.GetLineCount();
|
sal_Int32 nYIndex = mnIndexInParent / mrParentWindow.GetLineCount();
|
||||||
|
|
||||||
OUString str;
|
OUString str = "("
|
||||||
str += "(";
|
+ OUString::number(nXIndex)
|
||||||
str += OUString::number(nXIndex);
|
+ ","
|
||||||
str += ",";
|
+ OUString::number(nYIndex)
|
||||||
str += OUString::number(nYIndex);
|
+ ")";
|
||||||
str += ")";
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -420,37 +420,34 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window*
|
|||||||
m_pLbColor4->SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
|
m_pLbColor4->SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
|
||||||
m_pLbColorTrans->Disable();
|
m_pLbColorTrans->Disable();
|
||||||
|
|
||||||
|
OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
|
||||||
|
OUString sColorPaletteN;
|
||||||
|
|
||||||
m_pQSet1->SetStyle( m_pQSet1->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
m_pQSet1->SetStyle( m_pQSet1->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
||||||
m_pQSet1->SetColCount();
|
m_pQSet1->SetColCount();
|
||||||
m_pQSet1->SetLineCount( 1 );
|
m_pQSet1->SetLineCount( 1 );
|
||||||
OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
|
sColorPaletteN = sColorPalette + " 1";
|
||||||
OUString sColorPaletteN;
|
|
||||||
sColorPaletteN = sColorPalette;
|
|
||||||
sColorPaletteN += " 1";
|
|
||||||
m_pQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
m_pQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
||||||
m_pQSet1->SelectItem( 1 );
|
m_pQSet1->SelectItem( 1 );
|
||||||
|
|
||||||
m_pQSet2->SetStyle( m_pQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
m_pQSet2->SetStyle( m_pQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
||||||
m_pQSet2->SetColCount();
|
m_pQSet2->SetColCount();
|
||||||
m_pQSet2->SetLineCount( 1 );
|
m_pQSet2->SetLineCount( 1 );
|
||||||
sColorPaletteN = sColorPalette;
|
sColorPaletteN = sColorPalette + " 2";
|
||||||
sColorPaletteN += " 2";
|
|
||||||
m_pQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
m_pQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
||||||
m_pQSet2->SelectItem( 0 );
|
m_pQSet2->SelectItem( 0 );
|
||||||
|
|
||||||
m_pQSet3->SetStyle( m_pQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
m_pQSet3->SetStyle( m_pQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
||||||
m_pQSet3->SetColCount();
|
m_pQSet3->SetColCount();
|
||||||
m_pQSet3->SetLineCount( 1 );
|
m_pQSet3->SetLineCount( 1 );
|
||||||
sColorPaletteN = sColorPalette;
|
sColorPaletteN = sColorPalette + " 3";
|
||||||
sColorPaletteN += " 3";
|
|
||||||
m_pQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
m_pQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
||||||
m_pQSet3->SelectItem( 0 );
|
m_pQSet3->SelectItem( 0 );
|
||||||
|
|
||||||
m_pQSet4->SetStyle( m_pQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
m_pQSet4->SetStyle( m_pQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
|
||||||
m_pQSet4->SetColCount();
|
m_pQSet4->SetColCount();
|
||||||
m_pQSet4->SetLineCount( 1 );
|
m_pQSet4->SetLineCount( 1 );
|
||||||
sColorPaletteN = sColorPalette;
|
sColorPaletteN = sColorPalette + " 4";
|
||||||
sColorPaletteN += " 4";
|
|
||||||
m_pQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
m_pQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
|
||||||
m_pQSet4->SelectItem( 0 );
|
m_pQSet4->SelectItem( 0 );
|
||||||
|
|
||||||
@@ -1130,17 +1127,14 @@ void SvxBmpMask::SetAccessibleNames()
|
|||||||
// set the accessible name for valueset
|
// set the accessible name for valueset
|
||||||
OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
|
OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
|
||||||
OUString sColorPaletteN;
|
OUString sColorPaletteN;
|
||||||
sColorPaletteN = sColorPalette;
|
|
||||||
sColorPaletteN += " 1";
|
sColorPaletteN = sColorPalette + " 1";
|
||||||
m_pQSet1->SetText (sColorPaletteN);
|
m_pQSet1->SetText (sColorPaletteN);
|
||||||
sColorPaletteN = sColorPalette;
|
sColorPaletteN = sColorPalette + " 2";
|
||||||
sColorPaletteN += " 2";
|
|
||||||
m_pQSet2->SetText (sColorPaletteN);
|
m_pQSet2->SetText (sColorPaletteN);
|
||||||
sColorPaletteN = sColorPalette;
|
sColorPaletteN = sColorPalette + " 3";
|
||||||
sColorPaletteN += " 3";
|
|
||||||
m_pQSet3->SetText (sColorPaletteN);
|
m_pQSet3->SetText (sColorPaletteN);
|
||||||
sColorPaletteN = sColorPalette;
|
sColorPaletteN = sColorPalette + " 4";
|
||||||
sColorPaletteN += " 4";
|
|
||||||
m_pQSet4->SetText (sColorPaletteN);
|
m_pQSet4->SetText (sColorPaletteN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -545,9 +545,9 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, MousePosHdl, GraphCtrl*, pWnd, void )
|
|||||||
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
|
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
|
||||||
const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
|
const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
|
||||||
|
|
||||||
aStr = GetUnitString( rMousePos.X(), eFieldUnit, cSep );
|
aStr = GetUnitString( rMousePos.X(), eFieldUnit, cSep )
|
||||||
aStr += " / ";
|
+ " / "
|
||||||
aStr += GetUnitString( rMousePos.Y(), eFieldUnit, cSep );
|
+ GetUnitString( rMousePos.Y(), eFieldUnit, cSep );
|
||||||
|
|
||||||
m_pStbStatus->SetItemText( 2, aStr );
|
m_pStbStatus->SetItemText( 2, aStr );
|
||||||
}
|
}
|
||||||
@@ -560,9 +560,9 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, GraphSizeHdl, GraphCtrl*, pWnd, void )
|
|||||||
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
|
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
|
||||||
const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
|
const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
|
||||||
|
|
||||||
aStr = GetUnitString( rSize.Width(), eFieldUnit, cSep );
|
aStr = GetUnitString( rSize.Width(), eFieldUnit, cSep )
|
||||||
aStr += " x ";
|
+ " x "
|
||||||
aStr += GetUnitString( rSize.Height(), eFieldUnit, cSep );
|
+ GetUnitString( rSize.Height(), eFieldUnit, cSep );
|
||||||
|
|
||||||
m_pStbStatus->SetItemText( 3, aStr );
|
m_pStbStatus->SetItemText( 3, aStr );
|
||||||
}
|
}
|
||||||
|
@@ -436,13 +436,13 @@ void SvxTPView::InsertWriterHeader()
|
|||||||
m_pViewData->SetTabs(pTabs);
|
m_pViewData->SetTabs(pTabs);
|
||||||
|
|
||||||
OUString aStrTab('\t');
|
OUString aStrTab('\t');
|
||||||
OUString aString(get<FixedText>("action")->GetText());
|
OUString aString = get<FixedText>("action")->GetText()
|
||||||
aString += aStrTab;
|
+ aStrTab
|
||||||
aString += get<FixedText>("author")->GetText();
|
+ get<FixedText>("author")->GetText()
|
||||||
aString += aStrTab;
|
+ aStrTab
|
||||||
aString += get<FixedText>("date")->GetText();
|
+ get<FixedText>("date")->GetText()
|
||||||
aString += aStrTab;
|
+ aStrTab
|
||||||
aString += get<FixedText>("comment")->GetText();
|
+ get<FixedText>("comment")->GetText();
|
||||||
m_pViewData->ClearHeader();
|
m_pViewData->ClearHeader();
|
||||||
m_pViewData->InsertHeaderEntry(aString);
|
m_pViewData->InsertHeaderEntry(aString);
|
||||||
}
|
}
|
||||||
@@ -453,15 +453,15 @@ void SvxTPView::InsertCalcHeader()
|
|||||||
m_pViewData->SetTabs(pTabs);
|
m_pViewData->SetTabs(pTabs);
|
||||||
|
|
||||||
OUString aStrTab('\t');
|
OUString aStrTab('\t');
|
||||||
OUString aString(get<FixedText>("action")->GetText());
|
OUString aString = get<FixedText>("action")->GetText()
|
||||||
aString += aStrTab;
|
+ aStrTab
|
||||||
aString += get<FixedText>("position")->GetText();
|
+ get<FixedText>("position")->GetText()
|
||||||
aString += aStrTab;
|
+ aStrTab
|
||||||
aString += get<FixedText>("author")->GetText();
|
+ get<FixedText>("author")->GetText()
|
||||||
aString += aStrTab;
|
+ aStrTab
|
||||||
aString += get<FixedText>("date")->GetText();
|
+ get<FixedText>("date")->GetText()
|
||||||
aString += aStrTab;
|
+ aStrTab
|
||||||
aString += get<FixedText>("comment")->GetText();
|
+ get<FixedText>("comment")->GetText();
|
||||||
m_pViewData->ClearHeader();
|
m_pViewData->ClearHeader();
|
||||||
m_pViewData->InsertHeaderEntry(aString);
|
m_pViewData->InsertHeaderEntry(aString);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user