sw/source/ui/app/swmodul1.cxx | 6 ++---- sw/source/ui/lingu/olmenu.cxx | 19 +++++++------------ sw/source/ui/ribbar/tblctrl.cxx | 3 +-- sw/source/ui/vba/vbaeventshelper.cxx | 2 +- sw/source/ui/vba/vbainformationhelper.cxx | 2 +- 5 files changed, 12 insertions(+), 20 deletions(-)
New commits: commit 0fbfa10ca9986236f1a906ea465135f4e367115e Author: Miklos Vajna <vmik...@suse.cz> Date: Sat Jun 23 14:43:06 2012 +0200 sw: kill last direct RTL_CONSTASCII_USTRINGPARAM usages Change-Id: I7e19b6ff9e12d7aee57f24b1acce722e287accf0 diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index dd54cb5..0e0627c 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -381,9 +381,7 @@ void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyI Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface(); Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY); - uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")), - FrameSearchFlag::CHILDREN); + uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame("_beamer", FrameSearchFlag::CHILDREN); if (xBeamerFrame.is()) { // the beamer has been opened by the SfxViewFrame Reference<XController> xController = xBeamerFrame->getController(); @@ -428,7 +426,7 @@ const String& SwModule::GetRedlineAuthor(sal_uInt16 nPos) OSL_ENSURE(nPos < pAuthorNames->size(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash while(!(nPos < pAuthorNames->size())) { - InsertRedlineAuthor(String(RTL_CONSTASCII_USTRINGPARAM("nn"))); + InsertRedlineAuthor(String("nn")); }; return (*pAuthorNames)[nPos]; } diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 6e792d8..8fbde25 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -281,15 +281,13 @@ void SwSpellPopup::fillLangPopupMenu( sal_uInt16 nItemId = nLangItemIdStart; - const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection - const OUString sEmpty; // 'no language found' from language guessing std::set< OUString >::const_iterator it; for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { OUString aEntryTxt( *it ); if (aEntryTxt != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&& - aEntryTxt != sAsterix && - aEntryTxt != sEmpty) + aEntryTxt != "*" && // multiple languages in current selection + !aEntryTxt.isEmpty()) // 'no language found' from language guessing { OSL_ENSURE( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG, "nItemId outside of expected range!" ); @@ -319,7 +317,7 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) OUString aTmp; osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); Graphic aGraphic; - const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); + const String aFilterName( IMP_PNG ); if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) { aRes = Image( aGraphic.GetBitmapEx() ); @@ -335,12 +333,11 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL ) { try { - uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.frame.UICommandDescription" ), uno::UNO_QUERY ); if ( xNameAccess.is() ) { uno::Reference< container::XNameAccess > xUICommandLabels; - const OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ); - uno::Any a = xNameAccess->getByName( aModule ); + uno::Any a = xNameAccess->getByName( "com.sun.star.text.TextDocument" ); uno::Reference< container::XNameAccess > xUICommands; a >>= xUICommandLabels; OUString aStr; @@ -552,8 +549,7 @@ SwSpellPopup::SwSpellPopup( if (bUseImagesInMenus) { uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); - Image rImg = ::GetImage( xFrame, - OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False ); + Image rImg = ::GetImage( xFrame, ".uno:SpellingAndGrammarDialog", sal_False ); SetItemImage( MN_SPELLING_DLG, rImg ); } @@ -707,8 +703,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) if (bUseImagesInMenus) { uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); - Image rImg = ::GetImage( xFrame, - OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False ); + Image rImg = ::GetImage( xFrame, ".uno:SpellingAndGrammarDialog", sal_False ); SetItemImage( MN_SPELLING_DLG, rImg ); } diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx index 351550e..2893cd5 100644 --- a/sw/source/ui/ribbar/tblctrl.cxx +++ b/sw/source/ui/ribbar/tblctrl.cxx @@ -62,8 +62,7 @@ SwTableOptimizeCtrl::~SwTableOptimizeCtrl() SfxPopupWindow* SwTableOptimizeCtrl::CreatePopupWindow() { - rtl::OUString aToolBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/optimizetablebar" )); - createAndPositionSubToolBar( aToolBarResStr ); + createAndPositionSubToolBar("private:resource/toolbar/optimizetablebar"); return NULL; } diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx index 04c53a5..c5c9e93 100644 --- a/sw/source/ui/vba/vbaeventshelper.cxx +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -79,7 +79,7 @@ void SwVbaEventsHelper::implPostProcessEvent( EventQueue& /*rEventQueue*/, const uno::Sequence< uno::Any >& /*rArgs*/ ) const throw (lang::IllegalArgumentException) { // TODO: get actual codename from document - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisDocument" ) ); + return ::rtl::OUString( "ThisDocument" ); } // ============================================================================ diff --git a/sw/source/ui/vba/vbainformationhelper.cxx b/sw/source/ui/vba/vbainformationhelper.cxx index cb2f17e..fb5bb37 100644 --- a/sw/source/ui/vba/vbainformationhelper.cxx +++ b/sw/source/ui/vba/vbainformationhelper.cxx @@ -47,7 +47,7 @@ double SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( const css xTVCursor->collapseToStart(); uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); sal_Int32 nTopMargin = 0; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ) ) >>= nTopMargin; + xStyleProps->getPropertyValue( "TopMargin" ) >>= nTopMargin; sal_Int32 nCurrentPos = xTVCursor->getPosition().Y; sal_Int32 nCurrentPage = handleWdActiveEndPageNumber( xTVCursor ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits