diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-04-07 13:41:56 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-04-07 13:44:27 -0300 |
commit | 85bdc19fcb6a1a71d6aef0f00b8610f4b85e5a00 (patch) | |
tree | 441c835831d6888eacfc68aa24bfa5cb3ed8b8c3 | |
parent | 69d46dd7a6adfffd71da055bb65108c80d27395f (diff) |
More stuffs related to OUStrings in sd
-rw-r--r-- | sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 34 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/view/frmview.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 2 |
4 files changed, 29 insertions, 33 deletions
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 9231f420dc87..b025cedf099c 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -68,8 +68,6 @@ using namespace ::com::sun::star::accessibility; class SfxViewFrame; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - namespace accessibility { @@ -399,31 +397,30 @@ void SAL_CALL OUString sFirstService = aServices[0]; if ( sFirstService == "com.sun.star.drawing.DrawingDocumentDrawView" ) { - if( aServices.getLength() >= 2 && - aServices[1].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.PresentationView"))) + if( aServices.getLength() >= 2 && aServices[1] == "com.sun.star.presentation.PresentationView") { SolarMutexGuard aGuard; - sName = String( SdResId(SID_SD_A11Y_I_DRAWVIEW_N) ); + sName = ResId::toString(SdResId(SID_SD_A11Y_I_DRAWVIEW_N) ); } else { SolarMutexGuard aGuard; - sName = String( SdResId(SID_SD_A11Y_D_DRAWVIEW_N) ); + sName = ResId::toString( SdResId(SID_SD_A11Y_D_DRAWVIEW_N) ); } } else if ( sFirstService == "com.sun.star.presentation.NotesView" ) { SolarMutexGuard aGuard; - sName = String( SdResId(SID_SD_A11Y_I_NOTESVIEW_N) ); + sName = ResId::toString( SdResId(SID_SD_A11Y_I_NOTESVIEW_N) ); } else if ( sFirstService == "com.sun.star.presentation.HandoutView" ) { SolarMutexGuard aGuard; - sName = String( SdResId(SID_SD_A11Y_I_HANDOUTVIEW_N) ); + sName = ResId::toString( SdResId(SID_SD_A11Y_I_HANDOUTVIEW_N) ); } else { @@ -432,7 +429,7 @@ void SAL_CALL } else { - sName = OUString(RTL_CONSTASCII_USTRINGPARAM("AccessibleDrawDocumentView")); + sName = "AccessibleDrawDocumentView"; } return sName; } @@ -456,31 +453,30 @@ void SAL_CALL OUString sFirstService = aServices[0]; if ( sFirstService == "com.sun.star.drawing.DrawingDocumentDrawView" ) { - if( aServices.getLength() >= 2 && - aServices[1].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.PresentationView"))) + if( aServices.getLength() >= 2 && aServices[1] == "com.sun.star.presentation.PresentationView") { SolarMutexGuard aGuard; - sDescription = String( SdResId(SID_SD_A11Y_I_DRAWVIEW_D) ); + sDescription = ResId::toString( SdResId(SID_SD_A11Y_I_DRAWVIEW_D) ); } else { SolarMutexGuard aGuard; - sDescription = String( SdResId(SID_SD_A11Y_D_DRAWVIEW_D) ); + sDescription = ResId::toString( SdResId(SID_SD_A11Y_D_DRAWVIEW_D) ); } } else if ( sFirstService == "com.sun.star.presentation.NotesView" ) { SolarMutexGuard aGuard; - sDescription = String( SdResId(SID_SD_A11Y_I_NOTESVIEW_D) ); + sDescription = ResId::toString( SdResId(SID_SD_A11Y_I_NOTESVIEW_D) ); } else if ( sFirstService == "com.sun.star.presentation.HandoutView" ) { SolarMutexGuard aGuard; - sDescription = String( SdResId(SID_SD_A11Y_I_HANDOUTVIEW_D) ); + sDescription = ResId::toString( SdResId(SID_SD_A11Y_I_HANDOUTVIEW_D) ); } else { @@ -489,7 +485,7 @@ void SAL_CALL } else { - sDescription = OUString(RTL_CONSTASCII_USTRINGPARAM("Accessible Draw Document")); + sDescription = "Accessible Draw Document"; } return sDescription; } @@ -694,7 +690,7 @@ void SAL_CALL AccessibleDrawDocumentView::disposing (void) void AccessibleDrawDocumentView::UpdateAccessibleName (void) { OUString sNewName (CreateAccessibleName()); - sNewName += A2S(": "); + sNewName += ": "; // Add the number of the current slide. uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY); @@ -705,7 +701,7 @@ void AccessibleDrawDocumentView::UpdateAccessibleName (void) try { sal_Int16 nPageNumber (0); - if (xProperties->getPropertyValue(A2S("Number")) >>= nPageNumber) + if (xProperties->getPropertyValue("Number") >>= nPageNumber) { sNewName += OUString::valueOf(sal_Int32(nPageNumber)); } @@ -722,7 +718,7 @@ void AccessibleDrawDocumentView::UpdateAccessibleName (void) Reference<container::XIndexAccess> xPages (xPagesSupplier->getDrawPages(), UNO_QUERY); if (xPages.is()) { - sNewName += A2S(" / "); + sNewName += " / "; sNewName += OUString::valueOf(xPages->getCount()); } } diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 6dd99c11d7d2..672043a7cd0a 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -378,7 +378,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) mbIsRulerDrag = sal_False; - String aName( RTL_CONSTASCII_USTRINGPARAM("DrawViewShell")); + rtl::OUString aName( "DrawViewShell" ); SetName (aName); mnLockCount = 0UL; @@ -751,11 +751,11 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STATUS_PAGE ) ) { // Allways show the slide/page number. - String aString (SdResId( STR_SD_PAGE )); - aString += sal_Unicode(' '); - aString += UniString::CreateFromInt32( maTabControl.GetCurPageId() ); - aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " / " )); - aString += UniString::CreateFromInt32( GetDoc()->GetSdPageCount( mePageKind ) ); + OUString aOUString = ResId::toString(SdResId( STR_SD_PAGE )); + aOUString += " "; + aOUString += OUString::valueOf( maTabControl.GetCurPageId() ); + aOUString += " / " ; + aOUString += OUString::valueOf( GetDoc()->GetSdPageCount( mePageKind ) ); // If in layer mode additionally show the layer that contains all // selected shapes of the page. If the shapes are distributed on @@ -793,14 +793,14 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) pLayer = rLayerAdmin.GetLayerPerID( nLayer ); if( pLayer ) { - aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" )); - aString += pLayer->GetName(); - aString += sal_Unicode(')'); + aOUString += " (" ; + aOUString += pLayer->GetName(); + aOUString += ")"; } } } - rSet.Put (SfxStringItem (SID_STATUS_PAGE, aString)); + rSet.Put (SfxStringItem (SID_STATUS_PAGE, aOUString)); } // Layout if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STATUS_LAYOUT ) ) diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index b55d15c7b074..47f80be9408b 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -956,19 +956,19 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : { pValue->Value >>= aSnapGridWidthYDom; } - else if (!bImpress && pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleLayers ) ) ) + else if (!bImpress && pValue->Name == sUNO_View_VisibleLayers ) { SetOfByte aSetOfBytes; aSetOfBytes.PutValue( pValue->Value ); SetVisibleLayers( aSetOfBytes ); } - else if (!bImpress && pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PrintableLayers ) ) ) + else if (!bImpress && pValue->Name == sUNO_View_PrintableLayers ) { SetOfByte aSetOfBytes; aSetOfBytes.PutValue( pValue->Value ); SetPrintableLayers( aSetOfBytes ); } - else if (!bImpress && pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_LockedLayers ) ) ) + else if (!bImpress && pValue->Name == sUNO_View_LockedLayers ) { SetOfByte aSetOfBytes; aSetOfBytes.PutValue( pValue->Value ); diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 6ac752e15924..fdbead996f26 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -229,7 +229,7 @@ void ViewShell::construct(void) mpScrollBarBox.reset(new ScrollBarBox(GetParentWindow(), WB_SIZEABLE)); } - String aName( RTL_CONSTASCII_USTRINGPARAM( "ViewShell" )); + rtl::OUString aName( "ViewShell" ); SetName (aName); GetDoc()->StartOnlineSpelling(sal_False); |