diff options
Diffstat (limited to 'sw/source/ui/vba')
40 files changed, 245 insertions, 245 deletions
diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index f8e03294d9e5..336b953bf953 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -45,7 +45,7 @@ OUString SAL_CALL SwVbaAddin::getName() throw (uno::RuntimeException) void SAL_CALL SwVbaAddin::setName( const OUString& ) throw ( css::uno::RuntimeException ) { - throw uno::RuntimeException( OUString(" Fail to set name"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() ); } OUString SAL_CALL SwVbaAddin::getPath() throw (uno::RuntimeException) diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index e46b0c8dd745..d55358bd333b 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -107,7 +107,7 @@ SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException) uno::Reference< container::XEnumeration > SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Any diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index cafe3bef44c3..4aac8ef39484 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -46,7 +46,7 @@ SwVbaBookmark::~SwVbaBookmark() void SwVbaBookmark::checkVality() throw ( uno::RuntimeException ) { if( !mbValid ) - throw uno::RuntimeException( OUString("The bookmark is not valid" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("The bookmark is not valid", uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaBookmark::Delete() throw ( uno::RuntimeException ) diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 08515b1f9f8d..da372179f2e3 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -140,7 +140,7 @@ void SwVbaBookmarks::removeBookmarkByName( const OUString& rName ) throw (uno::R void SwVbaBookmarks::addBookmarkByName( const uno::Reference< frame::XModel >& xModel, const OUString& rName, const uno::Reference< text::XTextRange >& rTextRange ) throw (uno::RuntimeException) { uno::Reference< lang::XMultiServiceFactory > xDocMSF( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance( OUString("com.sun.star.text.Bookmark") ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY_THROW ); uno::Reference< container::XNamed > xNamed( xBookmark, uno::UNO_QUERY_THROW ); xNamed->setName( rName ); rTextRange->getText()->insertTextContent( rTextRange, xBookmark, sal_False ); diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 38825f64f531..dff81949a751 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -226,12 +226,12 @@ public: break; } default: - throw uno::RuntimeException( OUString( "Bad param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() ); } }; diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx index f41d6a4bcba0..f21c742ef449 100644 --- a/sw/source/ui/vba/vbacolumns.cxx +++ b/sw/source/ui/vba/vbacolumns.cxx @@ -104,11 +104,11 @@ uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /* { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() ); } return uno::makeAny( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 829d44d51960..cb06a1e5e8e7 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -326,7 +326,7 @@ void SAL_CALL SwVbaDocument::setUpdateStylesOnOpen( ::sal_Bool /*_updatestyleson // check this property only in default paragraph style sal_Bool IsAutoHyphenation = sal_False; uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->getPropertyValue( OUString("ParaIsHyphenation") ) >>= IsAutoHyphenation; + xParaProps->getPropertyValue("ParaIsHyphenation") >>= IsAutoHyphenation; return IsAutoHyphenation; } @@ -334,7 +334,7 @@ void SAL_CALL SwVbaDocument::setAutoHyphenation( ::sal_Bool _autohyphenation ) t { //TODO uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue( OUString("ParaIsHyphenation"), uno::makeAny( _autohyphenation ) ); + xParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( _autohyphenation ) ); } ::sal_Int32 SAL_CALL SwVbaDocument::getHyphenationZone() throw (uno::RuntimeException) @@ -353,7 +353,7 @@ void SAL_CALL SwVbaDocument::setHyphenationZone( ::sal_Int32 /*_hyphenationzone* //TODO sal_Int16 nHyphensLimit = 0; uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->getPropertyValue( OUString("ParaHyphenationMaxHyphens") ) >>= nHyphensLimit; + xParaProps->getPropertyValue("ParaHyphenationMaxHyphens") >>= nHyphensLimit; return nHyphensLimit; } @@ -361,7 +361,7 @@ void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutiv { sal_Int16 nHyphensLimit = static_cast< sal_Int16 >( _consecutivehyphenslimit ); uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue( OUString("ParaHyphenationMaxHyphens"), uno::makeAny( nHyphensLimit ) ); + xParaProps->setPropertyValue("ParaHyphenationMaxHyphens", uno::makeAny( nHyphensLimit ) ); } void SAL_CALL SwVbaDocument::Protect( ::sal_Int32 /*Type*/, const uno::Any& /*NOReset*/, const uno::Any& /*Password*/, const uno::Any& /*UseIRM*/, const uno::Any& /*EnforceStyleLock*/ ) throw (uno::RuntimeException) @@ -459,7 +459,7 @@ SwVbaDocument::getValue( const OUString& aPropertyName ) throw (beans::UnknownPr uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( OUString( "ooo.vba.ControlProvider" ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); return uno::makeAny( xControl ); } diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index cab3aca7bfe0..b1ecddafeecc 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -338,7 +338,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() ); @@ -350,7 +350,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUString _text ) throw (uno::RuntimeException) { - uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( OUString("com.sun.star.text.TextField.FileName") ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextField > xTextField( mxMSF->createInstance("com.sun.star.text.TextField.FileName"), uno::UNO_QUERY_THROW ); sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT; if( !_text.isEmpty() ) { @@ -375,7 +375,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUS } uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString("FileFormat"), uno::makeAny( nFileFormat ) ); + xProps->setPropertyValue("FileFormat", uno::makeAny( nFileFormat ) ); return xTextField; } @@ -463,7 +463,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const } else if( sFieldService.isEmpty() ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW ); @@ -472,7 +472,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const { uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); OUString sDocPropertyName( aDocProperty ); - xProps->setPropertyValue( OUString("Name"), uno::makeAny( sDocPropertyName ) ); + xProps->setPropertyValue("Name", uno::makeAny( sDocPropertyName ) ); } return xTextField; diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index bc6deacf8680..060ce939f0a1 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -192,20 +192,20 @@ uno::Any SAL_CALL SwVbaFind::getReplacement() throw (uno::RuntimeException) void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } ::sal_Bool SAL_CALL SwVbaFind::getForward() throw (uno::RuntimeException) { sal_Bool bBackward = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchBackwards") ) >>= bBackward; + mxPropertyReplace->getPropertyValue("SearchBackwards") >>= bBackward; return !bBackward; } void SAL_CALL SwVbaFind::setForward( ::sal_Bool _forward ) throw (uno::RuntimeException) { sal_Bool bBackward = !_forward; - mxPropertyReplace->setPropertyValue( OUString("SearchBackwards"), uno::makeAny( bBackward ) ); + mxPropertyReplace->setPropertyValue("SearchBackwards", uno::makeAny( bBackward ) ); } ::sal_Int32 SAL_CALL SwVbaFind::getWrap() throw (uno::RuntimeException) @@ -233,76 +233,76 @@ void SAL_CALL SwVbaFind::setFormat( ::sal_Bool _format ) throw (uno::RuntimeExce ::sal_Bool SAL_CALL SwVbaFind::getMatchCase() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchCaseSensitive") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchCaseSensitive") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchCase( ::sal_Bool _matchcase ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( OUString("SearchCaseSensitive"), uno::makeAny( _matchcase ) ); + mxPropertyReplace->setPropertyValue("SearchCaseSensitive", uno::makeAny( _matchcase ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchWords") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchWords") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWholeWord( ::sal_Bool _matchwholeword ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( OUString("SearchWords"), uno::makeAny( _matchwholeword ) ); + mxPropertyReplace->setPropertyValue("SearchWords", uno::makeAny( _matchwholeword ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchRegularExpression") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchRegularExpression") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWildcards( ::sal_Bool _matchwildcards ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( OUString("SearchRegularExpression"), uno::makeAny( _matchwildcards ) ); + mxPropertyReplace->setPropertyValue("SearchRegularExpression", uno::makeAny( _matchwildcards ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchSimilarity") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchSoundsLike( ::sal_Bool _matchsoundslike ) throw (uno::RuntimeException) { // seems not accurate - mxPropertyReplace->setPropertyValue( OUString("SearchSimilarity"), uno::makeAny( _matchsoundslike ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::makeAny( _matchsoundslike ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchSimilarity") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; if( value ) - mxPropertyReplace->getPropertyValue( OUString("SearchSimilarityRelax") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchSimilarityRelax") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchAllWordForms( ::sal_Bool _matchallwordforms ) throw (uno::RuntimeException) { // seems not accurate - mxPropertyReplace->setPropertyValue( OUString("SearchSimilarity"), uno::makeAny( _matchallwordforms ) ); - mxPropertyReplace->setPropertyValue( OUString("SearchSimilarityRelax"), uno::makeAny( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::makeAny( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarityRelax", uno::makeAny( _matchallwordforms ) ); } uno::Any SAL_CALL SwVbaFind::getStyle() throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } sal_Bool SAL_CALL diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx index 7384dd6a120a..f8e86c210594 100644 --- a/sw/source/ui/vba/vbaformfield.cxx +++ b/sw/source/ui/vba/vbaformfield.cxx @@ -67,7 +67,7 @@ OUString SAL_CALL SwVbaFormField::getResult() throw ( uno::RuntimeException ) } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return sResult; } @@ -87,7 +87,7 @@ void SAL_CALL SwVbaFormField::setResult( const OUString& result ) throw ( uno::R } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index 23d9551d9a84..4072b16ba56e 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -104,7 +104,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XMo { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); sal_Bool isShared = sal_False; - xStyleProps->getPropertyValue( OUString("HeaderIsShared")) >>= isShared; + xStyleProps->getPropertyValue("HeaderIsShared") >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); @@ -169,7 +169,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); sal_Bool isShared = sal_False; - xStyleProps->getPropertyValue( OUString("FooterIsShared")) >>= isShared; + xStyleProps->getPropertyValue("FooterIsShared") >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index bfb58d413e5c..9cd8f49ea24d 100644 --- a/sw/source/ui/vba/vbalistformat.cxx +++ b/sw/source/ui/vba/vbalistformat.cxx @@ -68,17 +68,17 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor if( isFirstElement ) { sal_Bool isNumberingRestart = !bContinuePreviousList; - xProps->setPropertyValue( OUString("ParaIsNumberingRestart"), uno::makeAny( isNumberingRestart ) ); + xProps->setPropertyValue("ParaIsNumberingRestart", uno::makeAny( isNumberingRestart ) ); if( isNumberingRestart ) { sal_Int16 nStartValue = 1; - xProps->setPropertyValue( OUString("NumberingStartValue"), uno::makeAny( nStartValue ) ); + xProps->setPropertyValue("NumberingStartValue", uno::makeAny( nStartValue ) ); } isFirstElement = sal_False; } else { - xProps->setPropertyValue( OUString("ParaIsNumberingRestart"), uno::makeAny( sal_False ) ); + xProps->setPropertyValue("ParaIsNumberingRestart", uno::makeAny( sal_False ) ); } pListTemplate->applyListTemplate( xProps ); } @@ -86,7 +86,7 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) throw (css::uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } OUString diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx index 37ce9015bef2..8d05b7f20028 100644 --- a/sw/source/ui/vba/vbalistgalleries.cxx +++ b/sw/source/ui/vba/vbalistgalleries.cxx @@ -62,7 +62,7 @@ uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::A || nIndex == word::WdListGalleryType::wdOutlineNumberGallery ) return uno::makeAny( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) ); } - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 8cd6c854f62e..837397eb6aea 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -82,25 +82,25 @@ void SwVbaListHelper::Init() throw( css::uno::RuntimeException ) // get the numbering style uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW ); - mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName(OUString( "NumberingStyles" ) ), uno::UNO_QUERY_THROW ); + mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName("NumberingStyles"), uno::UNO_QUERY_THROW ); OSL_TRACE("SwVbaListHelper::Init: numbering style name: %s", OUStringToOString( msStyleName, RTL_TEXTENCODING_UTF8 ).getStr() ); if( mxStyleFamily->hasByName( msStyleName ) ) { mxStyleProps.set( mxStyleFamily->getByName( msStyleName ), uno::UNO_QUERY_THROW ); - mxNumberingRules.set( mxStyleProps->getPropertyValue( OUString( "NumberingRules" ) ), uno::UNO_QUERY_THROW ); + mxNumberingRules.set( mxStyleProps->getPropertyValue("NumberingRules"), uno::UNO_QUERY_THROW ); } else { // create new numbering style uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW ); - mxStyleProps.set( xDocMSF->createInstance( OUString( "com.sun.star.style.NumberingStyle" ) ), uno::UNO_QUERY_THROW ); + mxStyleProps.set( xDocMSF->createInstance("com.sun.star.style.NumberingStyle"), uno::UNO_QUERY_THROW ); // insert this style into style family, or the property NumberingRules doesn't exist. mxStyleFamily->insertByName( msStyleName, uno::makeAny( mxStyleProps ) ); - mxStyleProps->getPropertyValue( OUString( "NumberingRules" ) ) >>= mxNumberingRules; + mxStyleProps->getPropertyValue("NumberingRules") >>= mxNumberingRules; CreateListTemplate(); - mxStyleProps->setPropertyValue( OUString( "NumberingRules" ) , uno::makeAny( mxNumberingRules ) ); + mxStyleProps->setPropertyValue("NumberingRules", uno::makeAny( mxNumberingRules ) ); } } @@ -680,7 +680,7 @@ void SwVbaListHelper::setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; setOrAppendPropertyValue( aPropertyValues, sName, aValue ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); - mxStyleProps->setPropertyValue( OUString( "NumberingRules" ) , uno::makeAny( mxNumberingRules ) ); + mxStyleProps->setPropertyValue("NumberingRules", uno::makeAny( mxNumberingRules ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index 0166b254baa0..72ea2fb902d4 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -95,12 +95,12 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno: uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaListLevel::setFont( const uno::Reference< ::ooo::vba::word::XFont >& /*_font*/ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getIndex() throw (uno::RuntimeException) @@ -212,7 +212,7 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } return nNumberingType; @@ -285,7 +285,7 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx index 81ff8a67c387..a53b6db6a975 100644 --- a/sw/source/ui/vba/vbalistlevels.cxx +++ b/sw/source/ui/vba/vbalistlevels.cxx @@ -63,7 +63,7 @@ uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any& if( ( Index1 >>= nIndex ) == sal_False ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); return uno::makeAny( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) ); } diff --git a/sw/source/ui/vba/vbalisttemplate.cxx b/sw/source/ui/vba/vbalisttemplate.cxx index 122ba191a9b0..d62f5962e8f9 100644 --- a/sw/source/ui/vba/vbalisttemplate.cxx +++ b/sw/source/ui/vba/vbalisttemplate.cxx @@ -45,7 +45,7 @@ SwVbaListTemplate::ListLevels( const uno::Any& index ) throw (uno::RuntimeExcept void SwVbaListTemplate::applyListTemplate( uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException) { uno::Reference< container::XIndexReplace > xNumberingRules = pListHelper->getNumberingRules(); - xProps->setPropertyValue( OUString("NumberingRules") , uno::makeAny( xNumberingRules ) ); + xProps->setPropertyValue("NumberingRules", uno::makeAny( xNumberingRules ) ); } OUString diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx index b7ba7fe1256b..d2db3e81cfa1 100644 --- a/sw/source/ui/vba/vbalisttemplates.cxx +++ b/sw/source/ui/vba/vbalisttemplates.cxx @@ -57,7 +57,7 @@ uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::A if( ( Index1 >>= nIndex ) == sal_False ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); return uno::makeAny( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) ); } diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index b7d3d140c4b8..190d12298e9f 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -59,9 +59,9 @@ void SAL_CALL SwVbaPageSetup::setGutter( double _gutter ) throw (uno::RuntimeExc double SAL_CALL SwVbaPageSetup::getHeaderDistance() throw (uno::RuntimeException) { sal_Bool isHeaderOn = sal_False; - mxPageProps->getPropertyValue( OUString("HeaderIsOn")) >>= isHeaderOn; + mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue( OUString("HeaderIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("HeaderIsOn", uno::makeAny( sal_True ) ); return VbaPageSetupBase::getHeaderMargin(); } @@ -82,29 +82,29 @@ void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) throw sal_Int32 aktSpacing = 0; sal_Int32 aktHeaderHeight = 0; - mxPageProps->getPropertyValue( OUString("HeaderIsOn")) >>= isHeaderOn; + mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue( OUString("HeaderIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("HeaderIsOn", uno::makeAny( sal_True ) ); - mxPageProps->getPropertyValue( OUString("TopMargin")) >>= aktTopMargin; - mxPageProps->getPropertyValue( OUString("HeaderBodyDistance")) >>= aktSpacing; - mxPageProps->getPropertyValue( OUString("HeaderHeight")) >>= aktHeaderHeight; + mxPageProps->getPropertyValue("TopMargin") >>= aktTopMargin; + mxPageProps->getPropertyValue("HeaderBodyDistance") >>= aktSpacing; + mxPageProps->getPropertyValue("HeaderHeight") >>= aktHeaderHeight; sal_Int32 newSpacing = aktSpacing - ( newHeaderDistance - aktTopMargin ); sal_Int32 height = aktHeaderHeight - aktSpacing; sal_Int32 newHeaderHeight = newSpacing + height; - mxPageProps->setPropertyValue( OUString("TopMargin"), uno::makeAny( newHeaderDistance ) ); - mxPageProps->setPropertyValue( OUString("HeaderBodyDistance"), uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue( OUString("HeaderHeight"), uno::makeAny( newHeaderHeight ) ); + mxPageProps->setPropertyValue("TopMargin", uno::makeAny( newHeaderDistance ) ); + mxPageProps->setPropertyValue("HeaderBodyDistance", uno::makeAny( newSpacing ) ); + mxPageProps->setPropertyValue("HeaderHeight", uno::makeAny( newHeaderHeight ) ); } double SAL_CALL SwVbaPageSetup::getFooterDistance() throw (uno::RuntimeException) { sal_Bool isFooterOn = sal_False; - mxPageProps->getPropertyValue( OUString("FooterIsOn")) >>= isFooterOn; + mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue( OUString("FooterIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("FooterIsOn", uno::makeAny( sal_True ) ); return VbaPageSetupBase::getFooterMargin(); } @@ -116,21 +116,21 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw sal_Int32 aktSpacing = 0; sal_Int32 aktFooterHeight = 0; - mxPageProps->getPropertyValue( OUString("FooterIsOn")) >>= isFooterOn; + mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue( OUString("FooterIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("FooterIsOn", uno::makeAny( sal_True ) ); - mxPageProps->getPropertyValue( OUString("BottomMargin")) >>= aktBottomMargin; - mxPageProps->getPropertyValue( OUString("FooterBodyDistance")) >>= aktSpacing; - mxPageProps->getPropertyValue( OUString("FooterHeight")) >>= aktFooterHeight; + mxPageProps->getPropertyValue("BottomMargin") >>= aktBottomMargin; + mxPageProps->getPropertyValue("FooterBodyDistance") >>= aktSpacing; + mxPageProps->getPropertyValue("FooterHeight") >>= aktFooterHeight; sal_Int32 newSpacing = aktSpacing - ( newFooterDistance - aktBottomMargin ); sal_Int32 height = aktFooterHeight - aktSpacing; sal_Int32 newFooterHeight = newSpacing + height; - mxPageProps->setPropertyValue( OUString("BottomMargin"), uno::makeAny( newFooterDistance ) ); - mxPageProps->setPropertyValue( OUString("FooterBodyDistance"), uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue( OUString("FooterHeight"), uno::makeAny( newFooterHeight ) ); + mxPageProps->setPropertyValue("BottomMargin", uno::makeAny( newFooterDistance ) ); + mxPageProps->setPropertyValue("FooterBodyDistance", uno::makeAny( newSpacing ) ); + mxPageProps->setPropertyValue("FooterHeight", uno::makeAny( newFooterHeight ) ); } sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException) @@ -155,26 +155,26 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); sal_Int32 nTopMargin = 0; - xStyleProps->getPropertyValue( OUString("TopMargin")) >>= nTopMargin; + xStyleProps->getPropertyValue("TopMargin") >>= nTopMargin; sal_Int32 nBottomMargin = 0; - xStyleProps->getPropertyValue( OUString("BottomMargin")) >>= nBottomMargin; + xStyleProps->getPropertyValue("BottomMargin") >>= nBottomMargin; sal_Int32 nLeftMargin = 0; - xStyleProps->getPropertyValue( OUString("LeftMargin")) >>= nLeftMargin; + xStyleProps->getPropertyValue("LeftMargin") >>= nLeftMargin; sal_Int32 nRightMargin = 0; - xStyleProps->getPropertyValue( OUString("RightMargin")) >>= nRightMargin; + xStyleProps->getPropertyValue("RightMargin") >>= nRightMargin; sal_Int32 nHeaderHeight = 0; - xStyleProps->getPropertyValue( OUString("HeaderHeight")) >>= nHeaderHeight; + xStyleProps->getPropertyValue("HeaderHeight") >>= nHeaderHeight; sal_Int32 nFooterHeight = 0; - xStyleProps->getPropertyValue( OUString("FooterHeight")) >>= nFooterHeight; + xStyleProps->getPropertyValue("FooterHeight") >>= nFooterHeight; sal_Bool isHeaderOn = sal_False; - xStyleProps->getPropertyValue( OUString("HeaderIsOn")) >>= isHeaderOn; + xStyleProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( isHeaderOn ) { nTopMargin += nHeaderHeight; nBottomMargin += nFooterHeight; - xStyleProps->setPropertyValue( OUString("HeaderIsOn"), uno::makeAny( sal_False ) ); - xStyleProps->setPropertyValue( OUString("FooterIsOn"), uno::makeAny( sal_False ) ); + xStyleProps->setPropertyValue("HeaderIsOn", uno::makeAny( sal_False ) ); + xStyleProps->setPropertyValue("FooterIsOn", uno::makeAny( sal_False ) ); } uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW ); if( xPageCursor->getPage() != 1 ) @@ -183,21 +183,21 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status } uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( OUString("TextTable") ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue("TextTable"), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->setPropertyValue( OUString("PageDescName"), uno::makeAny( newStyle ) ); + xTableProps->setPropertyValue("PageDescName", uno::makeAny( newStyle ) ); } else { - xCursorProps->setPropertyValue( OUString("PageDescName"), uno::makeAny( newStyle ) ); + xCursorProps->setPropertyValue("PageDescName", uno::makeAny( newStyle ) ); } uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); - xFirstPageProps->setPropertyValue( OUString("TopMargin"), uno::makeAny( nTopMargin ) ); - xFirstPageProps->setPropertyValue( OUString("BottomMargin"), uno::makeAny( nBottomMargin ) ); - xFirstPageProps->setPropertyValue( OUString("LeftMargin"), uno::makeAny( nLeftMargin ) ); - xFirstPageProps->setPropertyValue( OUString("RightMargin"), uno::makeAny( nRightMargin ) ); + xFirstPageProps->setPropertyValue("TopMargin", uno::makeAny( nTopMargin ) ); + xFirstPageProps->setPropertyValue("BottomMargin", uno::makeAny( nBottomMargin ) ); + xFirstPageProps->setPropertyValue("LeftMargin", uno::makeAny( nLeftMargin ) ); + xFirstPageProps->setPropertyValue("RightMargin", uno::makeAny( nRightMargin ) ); } OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException) @@ -210,14 +210,14 @@ OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException) } uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( OUString("TextTable") ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue("TextTable"), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->getPropertyValue( OUString("PageDescName") ) >>= styleFirstPage; + xTableProps->getPropertyValue("PageDescName") >>= styleFirstPage; } else { - xCursorProps->getPropertyValue( OUString("PageDescName") ) >>= styleFirstPage; + xCursorProps->getPropertyValue("PageDescName") >>= styleFirstPage; } return styleFirstPage; } diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index da478a8ac2f3..abcb5484caba 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -100,7 +100,7 @@ public: while( xParEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.Paragraph") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.Paragraph") ) { nCount++; } @@ -116,7 +116,7 @@ public: while( xParEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.Paragraph") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.Paragraph") ) { if( Index == nCount ) return uno::makeAny( xServiceInfo ); diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 5f42c697c41c..196240e49ab9 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -48,33 +48,33 @@ SwVbaParagraphFormat::~SwVbaParagraphFormat() sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() throw (uno::RuntimeException) { style::ParagraphAdjust aParaAdjust = style::ParagraphAdjust_LEFT; - mxParaProps->getPropertyValue( OUString("ParaAdjust") ) >>= aParaAdjust; + mxParaProps->getPropertyValue("ParaAdjust") >>= aParaAdjust; return getMSWordAlignment( aParaAdjust ); } void SAL_CALL SwVbaParagraphFormat::setAlignment( sal_Int32 _alignment ) throw (uno::RuntimeException) { style::ParagraphAdjust aParaAdjust = ( style::ParagraphAdjust ) getOOoAlignment( _alignment ); - mxParaProps->setPropertyValue( OUString("ParaAdjust"), uno::makeAny( aParaAdjust ) ); + mxParaProps->setPropertyValue("ParaAdjust", uno::makeAny( aParaAdjust ) ); } float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() throw (uno::RuntimeException) { sal_Int32 indent = 0; - mxParaProps->getPropertyValue( OUString("ParaFirstLineIndent") ) >>= indent; + mxParaProps->getPropertyValue("ParaFirstLineIndent") >>= indent; return (float)( Millimeter::getInPoints( indent ) ); } void SAL_CALL SwVbaParagraphFormat::setFirstLineIndent( float _firstlineindent ) throw (uno::RuntimeException) { sal_Int32 indent = Millimeter::getInHundredthsOfOneMillimeter( _firstlineindent ); - mxParaProps->setPropertyValue( OUString("ParaFirstLineIndent"), uno::makeAny( indent ) ); + mxParaProps->setPropertyValue("ParaFirstLineIndent", uno::makeAny( indent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() throw (uno::RuntimeException) { sal_Bool bKeep = sal_False; - mxParaProps->getPropertyValue( OUString("ParaKeepTogether") ) >>= bKeep; + mxParaProps->getPropertyValue("ParaKeepTogether") >>= bKeep; return uno::makeAny ( bKeep ); } @@ -83,7 +83,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth sal_Bool bKeep = sal_False; if( _keeptogether >>= bKeep ) { - mxParaProps->setPropertyValue( OUString("ParaKeepTogether"), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue("ParaKeepTogether", uno::makeAny( bKeep ) ); } else { @@ -94,7 +94,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth uno::Any SAL_CALL SwVbaParagraphFormat::getKeepWithNext() throw (uno::RuntimeException) { sal_Bool bKeep = sal_False; - mxParaProps->getPropertyValue( OUString("ParaSplit") ) >>= bKeep; + mxParaProps->getPropertyValue("ParaSplit") >>= bKeep; return uno::makeAny ( bKeep ); } @@ -103,7 +103,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne sal_Bool bKeep = sal_False; if( _keepwithnext >>= bKeep ) { - mxParaProps->setPropertyValue( OUString("ParaSplit"), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue("ParaSplit", uno::makeAny( bKeep ) ); } else { @@ -114,7 +114,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne uno::Any SAL_CALL SwVbaParagraphFormat::getHyphenation() throw (uno::RuntimeException) { sal_Bool bHypn = sal_False; - mxParaProps->getPropertyValue( OUString("ParaIsHyphenation") ) >>= bHypn; + mxParaProps->getPropertyValue("ParaIsHyphenation") >>= bHypn; return uno::makeAny ( bHypn ); } @@ -123,7 +123,7 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation sal_Bool bHypn = sal_False; if( _hyphenation >>= bHypn ) { - mxParaProps->setPropertyValue( OUString("ParaIsHyphenation"), uno::makeAny( bHypn ) ); + mxParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( bHypn ) ); } else { @@ -134,35 +134,35 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation float SAL_CALL SwVbaParagraphFormat::getLineSpacing() throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; return getMSWordLineSpacing( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacing( float _linespacing ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; aLineSpacing = getOOoLineSpacing( _linespacing, aLineSpacing.Mode ); - mxParaProps->setPropertyValue( OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue("ParaLineSpacing", uno::makeAny( aLineSpacing ) ); } sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; return getMSWordLineSpacingRule( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingrule ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing = getOOoLineSpacingFromRule( _linespacingrule ); - mxParaProps->setPropertyValue( OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue("ParaLineSpacing", uno::makeAny( aLineSpacing ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() throw (uno::RuntimeException) { sal_Bool noLineNum = sal_False; - mxParaProps->getPropertyValue( OUString("ParaLineNumberCount") ) >>= noLineNum; + mxParaProps->getPropertyValue("ParaLineNumberCount") >>= noLineNum; return uno::makeAny ( noLineNum ); } @@ -171,7 +171,7 @@ void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumb sal_Bool noLineNum = sal_False; if( _nolinenumber >>= noLineNum ) { - mxParaProps->setPropertyValue( OUString("ParaLineNumberCount"), uno::makeAny( noLineNum ) ); + mxParaProps->setPropertyValue("ParaLineNumberCount", uno::makeAny( noLineNum ) ); } else { @@ -184,7 +184,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() throw (uno::RuntimeEx sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText; OUString aHeading; const OUString HEADING = OUString("Heading"); - mxParaProps->getPropertyValue( OUString("ParaStyleName") ) >>= aHeading; + mxParaProps->getPropertyValue("ParaStyleName") >>= aHeading; if( aHeading.indexOf( HEADING ) == 0 ) { // get the sub string after "Heading" @@ -204,7 +204,7 @@ void SAL_CALL SwVbaParagraphFormat::setOutlineLevel( sal_Int32 _outlinelevel ) t uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() throw (uno::RuntimeException) { style::BreakType aBreakType; - mxParaProps->getPropertyValue( OUString("BreakType") ) >>= aBreakType; + mxParaProps->getPropertyValue("BreakType") >>= aBreakType; sal_Bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH ); return uno::makeAny( bBreakBefore ); } @@ -215,7 +215,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe if( _breakbefore >>= bBreakBefore ) { style::BreakType aBreakType; - mxParaProps->getPropertyValue( OUString("BreakType") ) >>= aBreakType; + mxParaProps->getPropertyValue("BreakType") >>= aBreakType; if( bBreakBefore ) { if( aBreakType == style::BreakType_NONE ) @@ -230,7 +230,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe else if ( aBreakType == style::BreakType_PAGE_BEFORE ) aBreakType = style::BreakType_PAGE_AFTER; } - mxParaProps->setPropertyValue( OUString("BreakType"), uno::makeAny( aBreakType ) ); + mxParaProps->setPropertyValue("BreakType", uno::makeAny( aBreakType ) ); } else { @@ -241,53 +241,53 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe float SAL_CALL SwVbaParagraphFormat::getSpaceBefore() throw (uno::RuntimeException) { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue( OUString("ParaTopMargin") ) >>= nSpace; + mxParaProps->getPropertyValue("ParaTopMargin") >>= nSpace; return (float)( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceBefore( float _space ) throw (uno::RuntimeException) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue( OUString("ParaTopMargin"), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue("ParaTopMargin", uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() throw (uno::RuntimeException) { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue( OUString("ParaBottomMargin") ) >>= nSpace; + mxParaProps->getPropertyValue("ParaBottomMargin") >>= nSpace; return (float)( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceAfter( float _space ) throw (uno::RuntimeException) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue( OUString("ParaBottomMargin"), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue("ParaBottomMargin", uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getLeftIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( OUString("ParaLeftMargin") ) >>= nIndent; + mxParaProps->getPropertyValue("ParaLeftMargin") >>= nIndent; return (float)( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setLeftIndent( float _leftindent ) throw (uno::RuntimeException) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _leftindent ); - mxParaProps->setPropertyValue( OUString("ParaLeftMargin"), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue("ParaLeftMargin", uno::makeAny( nIndent ) ); } float SAL_CALL SwVbaParagraphFormat::getRightIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( OUString("ParaRightMargin") ) >>= nIndent; + mxParaProps->getPropertyValue("ParaRightMargin") >>= nIndent; return (float)( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setRightIndent( float _rightindent ) throw (uno::RuntimeException) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _rightindent ); - mxParaProps->setPropertyValue( OUString("ParaRightMargin"), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue("ParaRightMargin", uno::makeAny( nIndent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeException) @@ -297,15 +297,15 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeExcepti void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException) { sal_Int8 nWidow = 0; - mxParaProps->getPropertyValue( OUString("ParaWidows") ) >>= nWidow; + mxParaProps->getPropertyValue("ParaWidows") >>= nWidow; sal_Int8 nOrphan = 0; - mxParaProps->getPropertyValue( OUString("ParaOrphans") ) >>= nOrphan; + mxParaProps->getPropertyValue("ParaOrphans") >>= nOrphan; // if the amount of single lines on one page > 1 and the same of start and end of the paragraph, // true is retured. sal_Bool bWidow = ( nWidow > 1 && nOrphan == nWidow ); @@ -320,8 +320,8 @@ void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontr if( _widowcontrol >>= bWidow ) { sal_Int8 nControl = bWidow? 2:1; - mxParaProps->setPropertyValue( OUString("ParaWidows"), uno::makeAny( nControl ) ); - mxParaProps->setPropertyValue( OUString("ParaOrphans"), uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue("ParaWidows", uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue("ParaOrphans", uno::makeAny( nControl ) ); } else { @@ -477,7 +477,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing& rL sal_Int16 SwVbaParagraphFormat::getCharHeight() throw (uno::RuntimeException) { float fCharHeight = 0.0; - mxParaProps->getPropertyValue( OUString("CharHeight") ) >>= fCharHeight; + mxParaProps->getPropertyValue("CharHeight") >>= fCharHeight; return (sal_Int16)( Millimeter::getInHundredthsOfOneMillimeter( fCharHeight ) ); } diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 95f275006680..86bbf607bb1e 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -72,7 +72,7 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText ); if( !mxTextCursor.is() ) - throw uno::RuntimeException( OUString("Fails to create text cursor"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Fails to create text cursor", uno::Reference< uno::XInterface >() ); mxTextCursor->collapseToStart(); if( rEnd.is() ) @@ -207,7 +207,7 @@ void SAL_CALL SwVbaRange::InsertBreak( const uno::Any& _breakType ) throw (uno:: } uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue( OUString("BreakType"), uno::makeAny( eBreakType ) ); + xProp->setPropertyValue("BreakType", uno::makeAny( eBreakType ) ); } } @@ -252,17 +252,17 @@ SwVbaRange::getParagraphFormat() throw ( uno::RuntimeException ) void SAL_CALL SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) throw ( uno::RuntimeException ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) throw ( uno::RuntimeException ) { uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - if( ( xProp->getPropertyValue( OUString("CharStyleName") ) >>= aStyleName ) && !aStyleName.isEmpty() ) + if( ( xProp->getPropertyValue("CharStyleName") >>= aStyleName ) && !aStyleName.isEmpty() ) { aStyleType = OUString("CharacterStyles"); } - else if( ( xProp->getPropertyValue( OUString("ParaStyleName") ) >>= aStyleName ) && !aStyleName.isEmpty() ) + else if( ( xProp->getPropertyValue("ParaStyleName") >>= aStyleName ) && !aStyleName.isEmpty() ) { aStyleType = OUString("ParagraphStyles"); } @@ -323,10 +323,10 @@ SwVbaRange::PageSetup( ) throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW ); uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xParaProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xParaProps->getPropertyValue("PageStyleName") >>= aPageStyleName; uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( OUString("PageStyles") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) ); } diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx index 5d3b0eec555b..19868dd7eeaa 100644 --- a/sw/source/ui/vba/vbarow.cxx +++ b/sw/source/ui/vba/vbarow.cxx @@ -47,7 +47,7 @@ uno::Any SAL_CALL SwVbaRow::getHeight() throw (css::uno::RuntimeException) return uno::makeAny( sal_Int32( word::WdConstants::wdUndefined ) ); sal_Int32 nHeight = 0; - mxRowProps->getPropertyValue( OUString("Height") ) >>= nHeight; + mxRowProps->getPropertyValue("Height") >>= nHeight; return uno::makeAny( (float)Millimeter::getInPoints( nHeight ) ); } @@ -57,20 +57,20 @@ void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) throw (css::uno::Ru _height >>= height; sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( height ); - mxRowProps->setPropertyValue( OUString("Height"), uno::makeAny( nHeight ) ); + mxRowProps->setPropertyValue("Height", uno::makeAny( nHeight ) ); } ::sal_Int32 SAL_CALL SwVbaRow::getHeightRule() throw (css::uno::RuntimeException) { sal_Bool isAutoHeight = sal_False; - mxRowProps->getPropertyValue( OUString("IsAutoHeight") ) >>= isAutoHeight; + mxRowProps->getPropertyValue("IsAutoHeight") >>= isAutoHeight; return isAutoHeight ? word::WdRowHeightRule::wdRowHeightAuto : word::WdRowHeightRule::wdRowHeightExactly; } void SAL_CALL SwVbaRow::setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException) { sal_Bool isAutoHeight = ( _heightrule == word::WdRowHeightRule::wdRowHeightAuto ); - mxRowProps->setPropertyValue( OUString("IsAutoHeight"), uno::makeAny( isAutoHeight ) ); + mxRowProps->setPropertyValue("IsAutoHeight", uno::makeAny( isAutoHeight ) ); } void SAL_CALL diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index 7933f7c2093a..4b51ffb1b72f 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -79,7 +79,7 @@ SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const u { sal_Int16 nAlignment = text::HoriOrientation::LEFT; uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->getPropertyValue( OUString("HoriOrient") ) >>= nAlignment; + xTableProps->getPropertyValue("HoriOrient") >>= nAlignment; sal_Int32 nRet = 0; switch( nAlignment ) { @@ -122,7 +122,7 @@ void SAL_CALL SwVbaRows::setAlignment( ::sal_Int32 _alignment ) throw (uno::Runt } } uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->setPropertyValue( OUString("HoriOrient"), uno::makeAny( nAlignment ) ); + xTableProps->setPropertyValue("HoriOrient", uno::makeAny( nAlignment ) ); } uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() throw (uno::RuntimeException) @@ -133,7 +133,7 @@ uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() throw (uno::RuntimeExcep { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); sal_Bool bSplit = sal_False; - xRowProps->getPropertyValue( OUString("IsSplitAllowed") ) >>= bSplit; + xRowProps->getPropertyValue("IsSplitAllowed") >>= bSplit; if( index == 0 ) { bAllowBreak = bSplit; @@ -155,7 +155,7 @@ void SAL_CALL SwVbaRows::setAllowBreakAcrossPages( const uno::Any& _allowbreakac for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index ) { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); - xRowProps->setPropertyValue( OUString("IsSplitAllowed"), uno::makeAny( bAllowBreak ) ); + xRowProps->setPropertyValue("IsSplitAllowed", uno::makeAny( bAllowBreak ) ); } } @@ -166,8 +166,8 @@ float SAL_CALL SwVbaRows::getSpaceBetweenColumns() throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( 0, mnStartRowIndex ), uno::UNO_QUERY_THROW ); sal_Int32 nLeftBorderDistance = 0; sal_Int32 nRightBorderDistance = 0; - xCellProps->getPropertyValue( OUString("LeftBorderDistance") ) >>= nLeftBorderDistance; - xCellProps->getPropertyValue( OUString("RightBorderDistance") ) >>= nRightBorderDistance; + xCellProps->getPropertyValue("LeftBorderDistance") >>= nLeftBorderDistance; + xCellProps->getPropertyValue("RightBorderDistance") >>= nRightBorderDistance; return static_cast< float >( Millimeter::getInPoints( nLeftBorderDistance + nRightBorderDistance ) ); } @@ -183,8 +183,8 @@ void SAL_CALL SwVbaRows::setSpaceBetweenColumns( float _spacebetweencolumns ) th for( sal_Int32 column = 0; column < nColumns; ++column ) { uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( column, row ), uno::UNO_QUERY_THROW ); - xCellProps->setPropertyValue( OUString("LeftBorderDistance"), uno::makeAny( nSpace ) ); - xCellProps->setPropertyValue( OUString("RightBorderDistance"), uno::makeAny( nSpace ) ); + xCellProps->setPropertyValue("LeftBorderDistance", uno::makeAny( nSpace ) ); + xCellProps->setPropertyValue("RightBorderDistance", uno::makeAny( nSpace ) ); } } } @@ -231,9 +231,9 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE { uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nMargin = 0; - xTableProps->getPropertyValue( OUString("LeftMargin") ) >>= nMargin; + xTableProps->getPropertyValue("LeftMargin") >>= nMargin; nMargin += indent; - xTableProps->setPropertyValue( OUString("LeftMargin"), uno::makeAny( nMargin ) ); + xTableProps->setPropertyValue("LeftMargin", uno::makeAny( nMargin ) ); } void SwVbaRows::setIndentWithAdjustFirstColumn( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException) @@ -255,7 +255,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // calculate the new width and get the proportion between old and new uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nWidth = 0; - xTableProps->getPropertyValue( OUString("Width") ) >>= nWidth; + xTableProps->getPropertyValue("Width") >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; if ((nNewWidth <= 0) || (nWidth <= 0)) { @@ -280,7 +280,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue( OUString("Width"), uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue("Width", uno::makeAny( nNewWidth ) ); } void SwVbaRows::setIndentWithAdjustSameWidth( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException) @@ -288,7 +288,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // calculate the new width and get the width of all columns uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nWidth = 0; - xTableProps->getPropertyValue( OUString("Width") ) >>= nWidth; + xTableProps->getPropertyValue("Width") >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; // get all columns, calculate and set the new width of the columns @@ -303,7 +303,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue( OUString("Width"), uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue("Width", uno::makeAny( nNewWidth ) ); } void SAL_CALL SwVbaRows::Select( ) throw (uno::RuntimeException) @@ -323,11 +323,11 @@ uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() ); } return uno::makeAny( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index 2c9823b980d9..18ef74a5812e 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -65,7 +65,7 @@ public: { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName( OUString("PageStyles") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); sal_Int32 nCount = xPageStyles->getCount(); for( sal_Int32 index = 0; index < nCount; ++index ) { @@ -148,7 +148,7 @@ SwVbaSections::PageSetup( ) throw (uno::RuntimeException) uno::Reference< word::XSection > xSection( m_xIndexAccess->getByIndex( 0 ), uno::UNO_QUERY_THROW ); return xSection->PageSetup(); } - throw uno::RuntimeException( OUString("There is no section"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("There is no section", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index d564c43a0343..0bcc9aee8fed 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -81,7 +81,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un { uno::Reference< text::XTextRange > xTextRange; uno::Reference< lang::XServiceInfo > xServiceInfo( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.TextRanges") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.TextRanges") ) { uno::Reference< container::XIndexAccess > xTextRanges( xServiceInfo, uno::UNO_QUERY_THROW ); if( xTextRanges->getCount() > 0 ) @@ -92,7 +92,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return xTextRange; } @@ -154,7 +154,7 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -189,7 +189,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -215,7 +215,7 @@ SwVbaSelection::Delete( const uno::Any& _unit, const uno::Any& _count ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -258,7 +258,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW ); if( eDirection == word::MOVE_UP ) @@ -271,7 +271,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } if( word::gotoSelectedObjectAnchor( mxModel ) ) { @@ -287,7 +287,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( xTextTable.is() ) { uno::Reference< text::XTextRange > xRange( xTextTable->getCellByName( xTextTableCursor->getRangeName()), uno::UNO_QUERY_THROW ); @@ -311,7 +311,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< text::XParagraphCursor > xParagraphCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -326,7 +326,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< text::XWordCursor > xWordCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -343,7 +343,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -353,8 +353,8 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, word::E_DIRECTION eDirection ) uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; uno::Reference< table::XCell > xCell; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; - xCursorProps->getPropertyValue( OUString("Cell") ) >>= xCell; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; + xCursorProps->getPropertyValue("Cell") >>= xCell; if( !xTextTable.is() || !xCell.is() ) { DebugHelper::exception(SbERR_BAD_ARGUMENT, OUString()); @@ -362,7 +362,7 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, word::E_DIRECTION eDirection ) } uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW ); OUString aCellName; - xCellProps->getPropertyValue( OUString("CellName") ) >>= aCellName; + xCellProps->getPropertyValue("CellName") >>= aCellName; uno::Reference< text::XTextTableCursor > xTextTableCursor = xTextTable->createCursorByCellName( aCellName ); // move the table cursor switch( eDirection ) @@ -648,11 +648,11 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w if( nPage != 0 ) xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) ); else - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); break; } default: - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return getRange(); } @@ -691,7 +691,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( xTextTable.is() ) result = uno::makeAny( sal_True ); else @@ -735,7 +735,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xCursorProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xCursorProps->getPropertyValue("PageStyleName") >>= aPageStyleName; bool bFirstPage = false; if ( aPageStyleName == "First Page" ) bFirstPage = true; @@ -764,7 +764,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run break; } default: - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return result; } @@ -792,7 +792,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( xTextTable.is() ) { uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW ); @@ -955,7 +955,7 @@ uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() throw( uno::R { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; return xTextTable; } @@ -981,7 +981,7 @@ void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( !xTextTable.is() ) throw uno::RuntimeException( ); @@ -998,13 +998,13 @@ void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName if( sTLName.isEmpty() ) { uno::Reference< table::XCell > xCell; - xCursorProps->getPropertyValue( OUString("Cell") ) >>= xCell; + xCursorProps->getPropertyValue("Cell") >>= xCell; if( !xCell.is() ) { throw uno::RuntimeException( ); } uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW ); - xCellProps->getPropertyValue( OUString("CellName") ) >>= sTLName; + xCellProps->getPropertyValue("CellName") >>= sTLName; } } diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index ce5cd906af0f..bcf6be337ed0 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -51,14 +51,14 @@ SwVbaStyle::getName() throw (uno::RuntimeException) sal_Int32 SwVbaStyle::getLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps ) throw (uno::RuntimeException) { lang::Locale aLocale; - xTCProps->getPropertyValue( OUString("CharLocale") ) >>= aLocale; + xTCProps->getPropertyValue("CharLocale") >>= aLocale; return LanguageTag( aLocale ).getLanguageType( false); } void SwVbaStyle::setLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (uno::RuntimeException) { lang::Locale aLocale = LanguageTag( static_cast<LanguageType>(_languageid) ).getLocale(); - xTCProps->setPropertyValue( OUString("CharLocale"), uno::makeAny( aLocale ) ) ; + xTCProps->setPropertyValue("CharLocale", uno::makeAny( aLocale ) ) ; } ::sal_Int32 SAL_CALL SwVbaStyle::getLanguageID() throw (uno::RuntimeException) @@ -75,9 +75,9 @@ void SAL_CALL SwVbaStyle::setLanguageID( ::sal_Int32 _languageid ) throw (uno::R { sal_Int32 nType = word::WdStyleType::wdStyleTypeParagraph; uno::Reference< lang::XServiceInfo > xServiceInfo( mxStyle, uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.style.ParagraphStyle") ) ) + if( xServiceInfo->supportsService("com.sun.star.style.ParagraphStyle") ) nType = word::WdStyleType::wdStyleTypeParagraph; - else if( xServiceInfo->supportsService( OUString("com.sun.star.style.CharacterStyle") ) ) + else if( xServiceInfo->supportsService("com.sun.star.style.CharacterStyle") ) nType = word::WdStyleType::wdStyleTypeCharacter; else nType = word::WdStyleType::wdStyleTypeList; @@ -106,7 +106,7 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro if( !sStyle.isEmpty() ) { - xParaProps->setPropertyValue( OUString("ParaStyleName"), uno::makeAny( sStyle ) ); + xParaProps->setPropertyValue("ParaStyleName", uno::makeAny( sStyle ) ); return; } @@ -116,13 +116,13 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro OUString SAL_CALL SwVbaStyle::getNameLocal() throw (uno::RuntimeException) { OUString sNameLocal; - mxStyleProps->getPropertyValue( OUString("DisplayName") ) >>= sNameLocal; + mxStyleProps->getPropertyValue("DisplayName") >>= sNameLocal; return sNameLocal; } void SAL_CALL SwVbaStyle::setNameLocal( const OUString& _namelocal ) throw (uno::RuntimeException) { - mxStyleProps->setPropertyValue( OUString("DisplayName"), uno::makeAny( _namelocal ) ); + mxStyleProps->setPropertyValue("DisplayName", uno::makeAny( _namelocal ) ); } uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat() throw (uno::RuntimeException) @@ -141,20 +141,20 @@ uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat ::sal_Bool SAL_CALL SwVbaStyle::getAutomaticallyUpdate() throw (uno::RuntimeException) { sal_Bool isAutoUpdate = sal_False; - mxStyleProps->getPropertyValue( OUString("IsAutoUpdate") ) >>= isAutoUpdate; + mxStyleProps->getPropertyValue("IsAutoUpdate") >>= isAutoUpdate; return isAutoUpdate; } void SAL_CALL SwVbaStyle::setAutomaticallyUpdate( ::sal_Bool _automaticallyupdate ) throw (uno::RuntimeException) { - mxStyleProps->setPropertyValue( OUString("IsAutoUpdate"), uno::makeAny( _automaticallyupdate ) ); + mxStyleProps->setPropertyValue("IsAutoUpdate", uno::makeAny( _automaticallyupdate ) ); } uno::Any SAL_CALL SwVbaStyle::getBaseStyle() throw (uno::RuntimeException) { // ParentStyle OUString sBaseStyle; - mxStyleProps->getPropertyValue( OUString("ParentStyle") ) >>= sBaseStyle; + mxStyleProps->getPropertyValue("ParentStyle") >>= sBaseStyle; if( !sBaseStyle.isEmpty() ) { uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) ); @@ -173,7 +173,7 @@ void SAL_CALL SwVbaStyle::setBaseStyle( const uno::Any& _basestyle ) throw (uno: if( xStyle.is() ) { OUString sBaseStyle = xStyle->getName(); - mxStyleProps->setPropertyValue( OUString("ParentStyle"), uno::makeAny( sBaseStyle ) ); + mxStyleProps->setPropertyValue("ParentStyle", uno::makeAny( sBaseStyle ) ); } else { @@ -185,7 +185,7 @@ uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() throw (uno::RuntimeExcepti { //FollowStyle OUString sFollowStyle; - mxStyleProps->getPropertyValue( OUString("FollowStyle") ) >>= sFollowStyle; + mxStyleProps->getPropertyValue("FollowStyle") >>= sFollowStyle; if( !sFollowStyle.isEmpty() ) { uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) ); @@ -204,7 +204,7 @@ void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphs if( xStyle.is() ) { OUString sFollowStyle = xStyle->getName(); - mxStyleProps->setPropertyValue( OUString("FollowStyle"), uno::makeAny( sFollowStyle ) ); + mxStyleProps->setPropertyValue("FollowStyle", uno::makeAny( sFollowStyle ) ); } else { @@ -215,7 +215,7 @@ void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphs ::sal_Int32 SAL_CALL SwVbaStyle::getListLevelNumber() throw (uno::RuntimeException) { sal_Int16 nNumberingLevel = 0; - mxStyleProps->getPropertyValue( OUString("NumberingLevel") ) >>= nNumberingLevel; + mxStyleProps->getPropertyValue("NumberingLevel") >>= nNumberingLevel; return nNumberingLevel; } diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index 8c3d66ca1b3c..728dcea48965 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -171,7 +171,7 @@ public: // we only concern about the Paragraph styles uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( _xModel, uno::UNO_QUERY_THROW); uno::Reference< container::XNameAccess > xStyleFamilies = xStyleSupplier->getStyleFamilies(); - mxParaStyles.set( xStyleFamilies->getByName( OUString("ParagraphStyles") ), uno::UNO_QUERY_THROW ); + mxParaStyles.set( xStyleFamilies->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW ); } // XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return style::XStyle::static_type(0); } @@ -243,7 +243,7 @@ public: // XEnumerationAccess virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } }; @@ -333,14 +333,14 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno:: // set the property "NumberingStyleName" if it is a listbullet if( pTable->wdStyleType == word::WdStyleType::wdStyleTypeList ) { - xStyleProps->setPropertyValue( OUString("NumberingStyleName"), uno::makeAny( aStyleName ) ); + xStyleProps->setPropertyValue("NumberingStyleName", uno::makeAny( aStyleName ) ); } return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProps ) ) ); } else { OSL_TRACE("SwVbaStyles::Item: the builtin style type is not implemented"); - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 6953bfad1743..b6402bda3af9 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -118,7 +118,7 @@ uno::Any PrivateProfileStringListener::getValueEvent() return uno::makeAny( sValue ); #else - throw uno::RuntimeException( OUString("Only support on Windows"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Only support on Windows", uno::Reference< uno::XInterface >() ); #endif } @@ -161,7 +161,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) } return; #else - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); #endif } @@ -229,7 +229,7 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) break; } default: - throw uno::RuntimeException( OUString("Unknown value for Cursor pointer"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Unknown value for Cursor pointer", uno::Reference< uno::XInterface >() ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so } diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 04baf9f5c4df..81c640ea6842 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -125,14 +125,14 @@ sal_Int32 SwVbaTableHelper::getTableWidth( ) throw (uno::RuntimeException) sal_Int32 nWidth = 0; sal_Bool isWidthRelatvie = sal_False; uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->getPropertyValue( OUString("IsWidthRelative") ) >>= isWidthRelatvie; + xTableProps->getPropertyValue("IsWidthRelative") >>= isWidthRelatvie; if( isWidthRelatvie ) { - xTableProps->getPropertyValue( OUString("RelativeWidth") ) >>= nWidth; + xTableProps->getPropertyValue("RelativeWidth") >>= nWidth; } else { - xTableProps->getPropertyValue( OUString("Width") ) >>= nWidth; + xTableProps->getPropertyValue("Width") >>= nWidth; } return nWidth; } diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx index 9e34d29f3a0a..fda2e0e95acf 100644 --- a/sw/source/ui/vba/vbatableofcontents.cxx +++ b/sw/source/ui/vba/vbatableofcontents.cxx @@ -38,13 +38,13 @@ SwVbaTableOfContents::~SwVbaTableOfContents() ::sal_Int32 SAL_CALL SwVbaTableOfContents::getLowerHeadingLevel() throw (uno::RuntimeException) { sal_Int16 nLevel = 0; - mxTocProps->getPropertyValue(OUString("Level") ) >>= nLevel; + mxTocProps->getPropertyValue("Level") >>= nLevel; return nLevel; } void SAL_CALL SwVbaTableOfContents::setLowerHeadingLevel( ::sal_Int32 _lowerheadinglevel ) throw (uno::RuntimeException) { - mxTocProps->setPropertyValue( OUString("Level"), uno::makeAny( sal_Int8( _lowerheadinglevel ) ) ); + mxTocProps->setPropertyValue("Level", uno::makeAny( sal_Int8( _lowerheadinglevel ) ) ); } ::sal_Int32 SAL_CALL SwVbaTableOfContents::getTabLeader() throw (uno::RuntimeException) @@ -61,25 +61,25 @@ void SAL_CALL SwVbaTableOfContents::setTabLeader( ::sal_Int32 /*_tableader*/ ) t ::sal_Bool SAL_CALL SwVbaTableOfContents::getUseFields() throw (css::uno::RuntimeException) { sal_Bool bUseFields = sal_False; - mxTocProps->getPropertyValue(OUString("CreateFromMarks") ) >>= bUseFields; + mxTocProps->getPropertyValue("CreateFromMarks") >>= bUseFields; return bUseFields; } void SAL_CALL SwVbaTableOfContents::setUseFields( ::sal_Bool _useFields ) throw (css::uno::RuntimeException) { - mxTocProps->setPropertyValue( OUString("CreateFromMarks"), uno::makeAny( _useFields ) ); + mxTocProps->setPropertyValue("CreateFromMarks", uno::makeAny( _useFields ) ); } ::sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() throw (css::uno::RuntimeException) { sal_Bool bUseOutlineLevels = sal_False; - mxTocProps->getPropertyValue(OUString("CreateFromOutline") ) >>= bUseOutlineLevels; + mxTocProps->getPropertyValue("CreateFromOutline") >>= bUseOutlineLevels; return bUseOutlineLevels; } void SAL_CALL SwVbaTableOfContents::setUseOutlineLevels( ::sal_Bool _useOutlineLevels ) throw (css::uno::RuntimeException) { - mxTocProps->setPropertyValue( OUString("CreateFromOutline"), uno::makeAny( _useOutlineLevels ) ); + mxTocProps->setPropertyValue("CreateFromOutline", uno::makeAny( _useOutlineLevels ) ); } void SAL_CALL SwVbaTableOfContents::Delete( ) throw (uno::RuntimeException) diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index ac7215b5bac7..f08b965044bd 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -177,7 +177,7 @@ SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& N uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange(); uno::Reference< text::XTextTable > xTable; - xTable.set( xMsf->createInstance( OUString("com.sun.star.text.TextTable") ), uno::UNO_QUERY_THROW ); + xTable.set( xMsf->createInstance("com.sun.star.text.TextTable"), uno::UNO_QUERY_THROW ); xTable->initialize( nRows, nCols ); uno::Reference< text::XText > xText = xTextRange->getText(); diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index 656259e6887a..cf6e36d4961f 100644 --- a/sw/source/ui/vba/vbatablesofcontents.cxx +++ b/sw/source/ui/vba/vbatablesofcontents.cxx @@ -112,11 +112,11 @@ uno::Reference< word::XTableOfContents > SAL_CALL SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const uno::Any& /*UseHeadingStyles*/, const uno::Any& /*UpperHeadingLevel*/, const uno::Any& LowerHeadingLevel, const uno::Any& UseFields, const uno::Any& /*TableID*/, const uno::Any& /*RightAlignPageNumbers*/, const uno::Any& /*IncludePageNumbers*/, const uno::Any& /*AddedStyles*/, const uno::Any& /*UseHyperlinks*/, const uno::Any& /*HidePageNumbersInWeb*/, const uno::Any& /*UseOutlineLevels*/ ) throw (uno::RuntimeException) { uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW ); - uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance( OUString("com.sun.star.text.ContentIndex") ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance("com.sun.star.text.ContentIndex"), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xTocProps( xDocumentIndex, uno::UNO_QUERY_THROW ); sal_Bool isProtected = sal_False; - xTocProps->setPropertyValue( OUString("IsProtected"), uno::makeAny( isProtected ) ); + xTocProps->setPropertyValue("IsProtected", uno::makeAny( isProtected ) ); uno::Reference< word::XTableOfContents > xToc( new SwVbaTableOfContents( this, mxContext, mxTextDocument, xDocumentIndex ) ); diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index 0af68076fccc..bdacbe2908ff 100644 --- a/sw/source/ui/vba/vbatabstops.cxx +++ b/sw/source/ui/vba/vbatabstops.cxx @@ -28,13 +28,13 @@ using namespace ::com::sun::star; static uno::Sequence< style::TabStop > lcl_getTabStops( const uno::Reference< beans::XPropertySet >& xParaProps ) throw (uno::RuntimeException) { uno::Sequence< style::TabStop > aSeq; - xParaProps->getPropertyValue( OUString("ParaTabStops") ) >>= aSeq; + xParaProps->getPropertyValue("ParaTabStops") >>= aSeq; return aSeq; } static void lcl_setTabStops( const uno::Reference< beans::XPropertySet >& xParaProps, const uno::Sequence< style::TabStop >& aSeq ) throw (uno::RuntimeException) { - xParaProps->setPropertyValue( OUString("ParaTabStops"), uno::makeAny( aSeq ) ); + xParaProps->setPropertyValue("ParaTabStops", uno::makeAny( aSeq ) ); } typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > TabStopCollectionHelper_Base; diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 9abe53aebcee..18f5be8e8d1f 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -105,7 +105,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep } else { - throw uno::RuntimeException( OUString("Auto Text Entry doesn't exist"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Auto Text Entry doesn't exist", uno::Reference< uno::XInterface >() ); } uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) ); diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index 780bb08fadfc..0f2ef343533a 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -44,7 +44,7 @@ SwVbaVariable::getName() throw ( css::uno::RuntimeException ) void SAL_CALL SwVbaVariable::setName( const OUString& ) throw ( css::uno::RuntimeException ) { - throw uno::RuntimeException( OUString(" Fail to set name"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 483254bd9f10..8a3fa43f7a13 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -71,7 +71,7 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException) uno::Reference< text::XText > xCurrentText = mxViewCursor->getText(); uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextContent > xTextContent; - while( xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextContent ) + while( xCursorProps->getPropertyValue("TextTable") >>= xTextContent ) { xCurrentText = xTextContent->getAnchor()->getText(); xCursorProps.set( xCurrentText->createTextCursor(), uno::UNO_QUERY_THROW ); @@ -105,7 +105,7 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException) } else if ( aImplName == "SwXFootnote" ) { - if( xServiceInfo->supportsService( OUString("com.sun.star.text.Endnote") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.Endnote") ) return word::WdSeekView::wdSeekEndnotes; else return word::WdSeekView::wdSeekFootnotes; @@ -193,14 +193,14 @@ SwVbaView::setSplitSpecial( ::sal_Int32/* _splitspecial */) throw (css::uno::Run SwVbaView::getTableGridLines() throw (css::uno::RuntimeException) { sal_Bool bShowTableGridLine = sal_False; - mxViewSettings->getPropertyValue( OUString("ShowTableBoundaries")) >>= bShowTableGridLine; + mxViewSettings->getPropertyValue("ShowTableBoundaries") >>= bShowTableGridLine; return bShowTableGridLine; } void SAL_CALL SwVbaView::setTableGridLines( ::sal_Bool _tablegridlines ) throw (css::uno::RuntimeException) { - mxViewSettings->setPropertyValue( OUString("ShowTableBoundaries"), uno::makeAny( _tablegridlines ) ); + mxViewSettings->setPropertyValue("ShowTableBoundaries", uno::makeAny( _tablegridlines ) ); } ::sal_Int32 SAL_CALL @@ -208,7 +208,7 @@ SwVbaView::getType() throw (css::uno::RuntimeException) { // FIXME: handle wdPrintPreview type sal_Bool bOnlineLayout = sal_False; - mxViewSettings->getPropertyValue( OUString("ShowOnlineLayout")) >>= bOnlineLayout; + mxViewSettings->getPropertyValue("ShowOnlineLayout") >>= bOnlineLayout; return bOnlineLayout ? word::WdViewType::wdWebView : word::WdViewType::wdPrintView; } @@ -221,12 +221,12 @@ SwVbaView::setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException) case word::WdViewType::wdPrintView: case word::WdViewType::wdNormalView: { - mxViewSettings->setPropertyValue( OUString("ShowOnlineLayout"), uno::makeAny( sal_False ) ); + mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::makeAny( sal_False ) ); break; } case word::WdViewType::wdWebView: { - mxViewSettings->setPropertyValue( OUString("ShowOnlineLayout"), uno::makeAny( sal_True ) ); + mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::makeAny( sal_True ) ); break; } case word::WdViewType::wdPrintPreview: @@ -303,7 +303,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) // an even page number uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xCursorProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xCursorProps->getPropertyValue("PageStyleName") >>= aPageStyleName; if ( aPageStyleName == "First Page" ) { // go to the beginning of where the next style is used diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index 611299a19c05..9649402606f1 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -108,7 +108,7 @@ SwVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE else if (nwindowState == word::WdWindowState::wdWindowStateNormal) pWork -> Restore(); else - throw uno::RuntimeException( OUString( "Invalid Parameter" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid Parameter", uno::Reference< uno::XInterface >() ); } } diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index efd8c282e861..eabbd835ac00 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -62,13 +62,13 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) case word::WdWrapType::wdWrapSquare: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue( OUString("SurroundContour"), uno::makeAny( sal_False ) ); + m_xPropertySet->setPropertyValue("SurroundContour", uno::makeAny( sal_False ) ); break; } case word::WdWrapType::wdWrapTight: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue( OUString("SurroundContour"), uno::makeAny( sal_True ) ); + m_xPropertySet->setPropertyValue("SurroundContour", uno::makeAny( sal_True ) ); break; } default: @@ -77,14 +77,14 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) } } } - m_xPropertySet->setPropertyValue( OUString("TextWrap"), uno::makeAny( eTextMode ) ); + m_xPropertySet->setPropertyValue("TextWrap", uno::makeAny( eTextMode ) ); } ::sal_Int32 SAL_CALL SwVbaWrapFormat::getType() throw (uno::RuntimeException) { sal_Int32 nType = word::WdWrapType::wdWrapSquare; text::WrapTextMode eTextMode; - m_xPropertySet->getPropertyValue( OUString("TextWrap")) >>= eTextMode; + m_xPropertySet->getPropertyValue("TextWrap") >>= eTextMode; switch( eTextMode ) { case text::WrapTextMode_NONE: @@ -100,7 +100,7 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) case text::WrapTextMode_PARALLEL: { sal_Bool bContour = sal_False; - m_xPropertySet->getPropertyValue( OUString("SurroundContour")) >>= bContour; + m_xPropertySet->getPropertyValue("SurroundContour") >>= bContour; if( bContour ) nType = word::WdWrapType::wdWrapTight; else @@ -132,7 +132,7 @@ void SAL_CALL SwVbaWrapFormat::setType( ::sal_Int32 _type ) throw (uno::RuntimeE { sal_Int32 nSide = word::WdWrapSideType::wdWrapBoth; text::WrapTextMode eTextMode; - m_xPropertySet->getPropertyValue( OUString("TextWrap")) >>= eTextMode; + m_xPropertySet->getPropertyValue("TextWrap") >>= eTextMode; switch( eTextMode ) { case text::WrapTextMode_LEFT: diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index 28d714b3b079..910ac525adce 100644 --- a/sw/source/ui/vba/wordvbahelper.cxx +++ b/sw/source/ui/vba/wordvbahelper.cxx @@ -73,10 +73,10 @@ uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException) { OUString aPageStyleName; - xProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xProps->getPropertyValue("PageStyleName") >>= aPageStyleName; uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( OUString("PageStyles") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); uno::Reference< style::XStyle > xStyle( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW ); return xStyle; @@ -93,8 +93,8 @@ uno::Reference< style::XStyle > getDefaultParagraphStyle( const uno::Reference< { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName( OUString("ParagraphStyles") ), uno::UNO_QUERY_THROW ); - uno::Reference< style::XStyle > xStyle( xParaStyles->getByName( OUString("Standard") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW ); + uno::Reference< style::XStyle > xStyle( xParaStyles->getByName("Standard"), uno::UNO_QUERY_THROW ); return xStyle; } @@ -108,7 +108,7 @@ uno::Reference< text::XTextRange > getFirstObjectPosition( const uno::Reference< if( xParaEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParaEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.TextTable") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.TextTable") ) { uno::Reference< table::XCellRange > xCellRange( xServiceInfo, uno::UNO_QUERY_THROW ); uno::Reference< text::XText> xFirstCellText( xCellRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW ); @@ -149,14 +149,14 @@ uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XMod //catch exception "no text selection" } uno::Reference< beans::XPropertySet > xVCProps( xTextRange, uno::UNO_QUERY_THROW ); - while( xVCProps->getPropertyValue( OUString("TextTable") ) >>= xTextContent ) + while( xVCProps->getPropertyValue("TextTable") >>= xTextContent ) { xText = xTextContent->getAnchor()->getText(); xVCProps.set( xText->createTextCursor(), uno::UNO_QUERY_THROW ); } if( !xText.is() ) - throw uno::RuntimeException( OUString( "no text selection" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("no text selection", uno::Reference< uno::XInterface >() ); return xText; } |