diff options
Diffstat (limited to 'sw')
80 files changed, 453 insertions, 453 deletions
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index f8cebfe4249f..80e34e6d1216 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -2130,7 +2130,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO { try { - aBaseline = xSet->getPropertyValue( OUString( "BaseLine" ) ); + aBaseline = xSet->getPropertyValue("BaseLine"); } catch ( uno::Exception& ) { diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index d0b1b4daa2ab..d204c4ab2694 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -359,7 +359,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const String& rShort, const String& , OUString aMime ( "text/xml" ); Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream(); uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY); xSrc->setOutputStream(xOut); @@ -478,7 +478,7 @@ void SwXMLTextBlocks::WriteInfo( void ) OUString aMime ( "text/xml" ); Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream(); uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY); xSrc->setOutputStream(xOut); @@ -548,7 +548,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable( OUString aMime( "text/xml" ); Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); uno::Reference < io::XOutputStream > xOutputStream = xDocStream->getOutputStream(); // get XML writer diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 856c2f8a7771..8e6324b5639c 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -439,7 +439,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, uno::RuntimeException) { // nothing to set here - throw lang::IllegalArgumentException( OUString("Property is read-only: ") + throw lang::IllegalArgumentException("Property is read-only: " + PropertyName, static_cast< cppu::OWeakObject * >(this), 0 ); } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 3527b89809f5..d046ba854c99 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -111,7 +111,7 @@ public: try { uno::Reference< beans::XPropertySet > xProps( mpDocShell->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xLibContainer( xProps->getPropertyValue( OUString("BasicLibraries") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xLibContainer( xProps->getPropertyValue("BasicLibraries"), uno::UNO_QUERY_THROW ); OUString sProjectName( "Standard"); if ( !mpDocShell->GetBasicManager()->GetName().isEmpty() ) { diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index f2b3a5d51a99..deeb5ba397d1 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1182,7 +1182,7 @@ void makeRedline( SwPaM& rPaM, //todo: what about REDLINE_FMTCOLL? comphelper::SequenceAsHashMap aPropMap( rRedlineProperties ); uno::Any aAuthorValue; - aAuthorValue = aPropMap.getUnpackedValueOrDefault( OUString("RedlineAuthor"), aAuthorValue); + aAuthorValue = aPropMap.getUnpackedValueOrDefault("RedlineAuthor", aAuthorValue); sal_uInt16 nAuthor = 0; OUString sAuthor; if( aAuthorValue >>= sAuthor ) @@ -1190,7 +1190,7 @@ void makeRedline( SwPaM& rPaM, OUString sComment; uno::Any aCommentValue; - aCommentValue = aPropMap.getUnpackedValueOrDefault( OUString("RedlineComment"), aCommentValue); + aCommentValue = aPropMap.getUnpackedValueOrDefault("RedlineComment", aCommentValue); SwRedlineData aRedlineData( eType, nAuthor ); if( aCommentValue >>= sComment ) @@ -1198,7 +1198,7 @@ void makeRedline( SwPaM& rPaM, ::util::DateTime aStamp; uno::Any aDateTimeValue; - aDateTimeValue = aPropMap.getUnpackedValueOrDefault( OUString("RedlineDateTime"), aDateTimeValue); + aDateTimeValue = aPropMap.getUnpackedValueOrDefault("RedlineDateTime", aDateTimeValue); if( aDateTimeValue >>= aStamp ) { aRedlineData.SetTimeStamp( diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 6fb4cfb0e346..70b65282efab 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1107,7 +1107,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); //mit Layout kann der Anker umgesetzt werden, ohne dass sich die Position aendert if(pFmt) { @@ -1828,7 +1828,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName ) if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw uno::RuntimeException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pFmt) { const SfxItemSet& rSet = pFmt->GetAttrSet(); @@ -1922,7 +1922,7 @@ void SwXShape::addPropertyChangeListener( uno::RuntimeException ) { if ( !xShapeAgg.is() ) - throw uno::RuntimeException( OUString( "no shape aggregate" ), *this ); + throw uno::RuntimeException("no shape aggregate", *this ); // must be handled by the aggregate uno::Reference< beans::XPropertySet > xShapeProps; @@ -1937,7 +1937,7 @@ void SwXShape::removePropertyChangeListener( uno::RuntimeException ) { if ( !xShapeAgg.is() ) - throw uno::RuntimeException( OUString( "no shape aggregate" ), *this ); + throw uno::RuntimeException("no shape aggregate", *this ); // must be handled by the aggregate uno::Reference< beans::XPropertySet > xShapeProps; @@ -2366,9 +2366,9 @@ awt::Point SwXShape::_GetAttrPosition() { awt::Point aAttrPos; - uno::Any aHoriPos( getPropertyValue( OUString("HoriOrientPosition") ) ); + uno::Any aHoriPos( getPropertyValue("HoriOrientPosition") ); aHoriPos >>= aAttrPos.X; - uno::Any aVertPos( getPropertyValue( OUString("VertOrientPosition") ) ); + uno::Any aVertPos( getPropertyValue("VertOrientPosition") ); aVertPos >>= aAttrPos.Y; // #i35798# - fallback, if attribute position is (0,0) // and no anchor position is applied to the drawing object diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 6a202bf4cbdb..a6e0554bdf2f 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2046,7 +2046,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pField) { diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 0273a1edbf4c..a667b3750d20 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -842,7 +842,7 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD // Get the style families uno::Reference < XNameAccess > xFamilies = xFamilySupplier->getStyleFamilies(); // Get the Frame family (and keep it for later) - const ::uno::Any aAny = xFamilies->getByName ( OUString( "FrameStyles" ) ); + const ::uno::Any aAny = xFamilies->getByName ("FrameStyles"); aAny >>= mxStyleFamily; // In the derived class, we'll ask mxStyleFamily for the relevant default style // mxStyleFamily is initialised in the SwXFrame constructor @@ -850,21 +850,21 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD { case FLYCNTTYPE_FRM: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "Frame" ) ); + uno::Any aAny2 = mxStyleFamily->getByName ("Frame"); aAny2 >>= mxStyleData; pProps = new SwFrameProperties_Impl( ); } break; case FLYCNTTYPE_GRF: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "Graphics" ) ); + uno::Any aAny2 = mxStyleFamily->getByName ("Graphics"); aAny2 >>= mxStyleData; pProps = new SwGraphicProperties_Impl( ); } break; case FLYCNTTYPE_OLE: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "OLE" ) ); + uno::Any aAny2 = mxStyleFamily->getByName ("OLE"); aAny2 >>= mxStyleData; pProps = new SwOLEProperties_Impl( ); } @@ -1023,7 +1023,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: { bool bNextFrame = false; if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pFmt->GetDoc(); if ( ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID)) || @@ -1903,7 +1903,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw uno::RuntimeException( OUString( "setPropertyToDefault: property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("setPropertyToDefault: property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); bool bNextFrame; if( pEntry->nWID && diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index e221f80ecfa7..4386311abfc4 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -465,7 +465,7 @@ void SAL_CALL SwXTextPortion::SetPropertyValues_Impl( if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); SwUnoCursorHelper::SetPropertyValue( *pUnoCrsr, *m_pPropSet, pPropertyNames[nProp], pValues[nProp]); @@ -510,11 +510,11 @@ uno::Sequence< uno::Any > SwXTextPortion::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 6f2e620b54fe..403407fc9d4a 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1223,7 +1223,7 @@ void SAL_CALL SwXMeta::setParent(uno::Reference< uno::XInterface > const& /*xParent*/) throw (uno::RuntimeException, lang::NoSupportException) { - throw lang::NoSupportException(OUString("setting parent not supported"), *this); + throw lang::NoSupportException("setting parent not supported", *this); } // XElementAccess diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 749b53d823af..88e5f0d4b796 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1290,12 +1290,12 @@ throw (uno::RuntimeException) } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString("Unknown property exception caught"), + throw uno::RuntimeException("Unknown property exception caught", static_cast<cppu::OWeakObject *>(this)); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString("WrappedTargetException caught"), + throw uno::RuntimeException("WrappedTargetException caught", static_cast<cppu::OWeakObject *>(this)); } diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 68b135c2a605..4f8e08375bbf 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -331,7 +331,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwFtnInfo aFtnInfo(pDoc->GetFtnInfo()); switch(pEntry->nWID) { @@ -642,7 +642,7 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwEndNoteInfo aEndInfo(pDoc->GetEndNoteInfo()); switch(pEntry->nWID) { @@ -874,7 +874,7 @@ void SwXLineNumberingProperties::setPropertyValue( if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwLineNumberInfo aInfo(pDoc->GetLineNumberInfo()); switch(pEntry->nWID) { @@ -2512,7 +2512,7 @@ void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& if (!pEntry) throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch(pEntry->nWID) { diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index a57b4d5075af..a3b7ca557818 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -549,7 +549,7 @@ void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::A if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); sal_Bool bVal = sal_False; if(aValue.getValueType() == ::getBooleanCppuType()) bVal = *(sal_Bool*)aValue.getValue(); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index a7d3b1764680..1eaa460e8597 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1261,7 +1261,7 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) : case SFX_STYLE_FAMILY_CHAR: { nMapId = PROPERTY_MAP_CHAR_STYLE; - aAny = xFamilies->getByName ( OUString( "CharacterStyles" ) ); + aAny = xFamilies->getByName ("CharacterStyles"); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; } @@ -1269,20 +1269,20 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) : case SFX_STYLE_FAMILY_PARA: { nMapId = bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : PROPERTY_MAP_PARA_STYLE; - aAny = xFamilies->getByName ( OUString( "ParagraphStyles" ) ); + aAny = xFamilies->getByName ("ParagraphStyles"); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; - aAny = mxStyleFamily->getByName ( OUString( "Standard" ) ); + aAny = mxStyleFamily->getByName ("Standard"); aAny >>= mxStyleData; } break; case SFX_STYLE_FAMILY_PAGE: { nMapId = PROPERTY_MAP_PAGE_STYLE; - aAny = xFamilies->getByName ( OUString( "PageStyles" ) ); + aAny = xFamilies->getByName ("PageStyles"); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; - aAny = mxStyleFamily->getByName ( OUString( "Standard" ) ); + aAny = mxStyleFamily->getByName ("Standard"); aAny >>= mxStyleData; } break; @@ -2111,7 +2111,7 @@ void SAL_CALL SwXStyle::SetPropertyValues_Impl( (!bIsConditional && pNames[nProp].equalsAsciiL(SW_PROP_NAME(UNO_NAME_PARA_STYLE_CONDITIONS)))) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(aBaseImpl.mxNewBase.is()) { lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, @@ -2456,11 +2456,11 @@ uno::Sequence< uno::Any > SwXStyle::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; @@ -2707,9 +2707,9 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >& if( !pEntry ) throw beans::UnknownPropertyException ( OUString( "Property is unknown: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nWID == FN_UNO_FOLLOW_STYLE || pEntry->nWID == FN_UNO_NUM_RULES ) - throw uno::RuntimeException ( OUString( "Cannot reset: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException ("Cannot reset: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY ) - throw uno::RuntimeException( OUString( "setPropertiesToDefault: property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("setPropertiesToDefault: property is read-only: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if( pEntry->nWID == RES_PARATR_OUTLINELEVEL ) static_cast<SwTxtFmtColl*>(pTargetFmt)->DeleteAssignmentToListLevelOfOutlineStyle(); @@ -3023,7 +3023,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(GetBasePool()) { @@ -3466,11 +3466,11 @@ uno::Sequence< uno::Any > SwXPageStyle::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; @@ -3992,11 +3992,11 @@ uno::Sequence< uno::Any > SwXAutoStyle::getPropertyValues ( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 49fc1a3b6ee1..8110f66fbf41 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1351,7 +1351,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch(pEntry->nWID) { @@ -1724,7 +1724,7 @@ sal_Bool SwXTextTableCursor::splitRange(sal_Int16 Count, sal_Bool Horizontal) th { SolarMutexGuard aGuard; if (Count <= 0) - throw uno::RuntimeException( OUString( "Illegal first argument: needs to be > 0" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Illegal first argument: needs to be > 0", static_cast < cppu::OWeakObject * > ( this ) ); sal_Bool bRet = sal_False; SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) @@ -1772,7 +1772,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); pTblCrsr->MakeBoxSels(); SwDoc* pDoc = pUnoCrsr->GetDoc(); switch(pEntry->nWID ) @@ -2293,7 +2293,7 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex { // attachToRange must only be called once if(!bIsDescriptor) /* already attached ? */ - throw uno::RuntimeException( OUString( "SwXTextTable: already attached to range." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("SwXTextTable: already attached to range.", static_cast < cppu::OWeakObject * > ( this ) ); uno::Reference<XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; @@ -3037,7 +3037,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, if(pFmt) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(0xFF == pEntry->nMemberId) { @@ -3860,7 +3860,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pTblCrsr->GetDoc(); { diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 07b60035c1aa..441e7142eca1 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2537,7 +2537,7 @@ throw (uno::RuntimeException) if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { if ( !aPam.GetNode()->GetTxtNode() ) - throw uno::RuntimeException( OUString("Invalid text range"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid text range", uno::Reference< uno::XInterface >() ); SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 4f3432c20feb..a70bbce6e49c 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -137,14 +137,14 @@ void SwApplet_Impl::CreateApplet( const OUString& rCode, const OUString& rName, uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( OUString("AppletCode"), uno::makeAny( rCode ) ); - xSet->setPropertyValue( OUString("AppletName"), uno::makeAny( rName ) ); - xSet->setPropertyValue( OUString("AppletIsScript"), uno::makeAny( sal_Bool(bMayScript) ) ); - xSet->setPropertyValue( OUString("AppletDocBase"), uno::makeAny( sDocBase ) ); + xSet->setPropertyValue("AppletCode", uno::makeAny( rCode ) ); + xSet->setPropertyValue("AppletName", uno::makeAny( rName ) ); + xSet->setPropertyValue("AppletIsScript", uno::makeAny( sal_Bool(bMayScript) ) ); + xSet->setPropertyValue("AppletDocBase", uno::makeAny( sDocBase ) ); if ( !rCodeBase.isEmpty() ) - xSet->setPropertyValue( OUString("AppletCodeBase"), uno::makeAny( rCodeBase ) ); + xSet->setPropertyValue("AppletCodeBase", uno::makeAny( rCodeBase ) ); else - xSet->setPropertyValue( OUString("AppletCodeBase"), uno::makeAny( sDocBase ) ); + xSet->setPropertyValue("AppletCodeBase", uno::makeAny( sDocBase ) ); } } #ifdef SOLAR_JAVA @@ -185,7 +185,7 @@ void SwApplet_Impl::FinishApplet() { uno::Sequence < beans::PropertyValue > aProps; aCommandList.FillSequence( aProps ); - xSet->setPropertyValue( OUString("AppletCommands"), uno::makeAny( aProps ) ); + xSet->setPropertyValue("AppletCommands", uno::makeAny( aProps ) ); } } diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index ec85cccaf179..1f553615cd6d 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -623,25 +623,25 @@ static void lcl_html_setFixedFontProperty( DEFAULTFONT_FLAGS_ONLYONE ) ); Any aTmp; aTmp <<= OUString( aFixedFont.GetName() ); - rPropSet->setPropertyValue( OUString("FontName"), aTmp ); + rPropSet->setPropertyValue("FontName", aTmp ); aTmp <<= OUString( aFixedFont.GetStyleName() ); - rPropSet->setPropertyValue( OUString("FontStyleName"), + rPropSet->setPropertyValue("FontStyleName", aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetFamily(); - rPropSet->setPropertyValue( OUString("FontFamily"), aTmp ); + rPropSet->setPropertyValue("FontFamily", aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetCharSet(); - rPropSet->setPropertyValue( OUString("FontCharset"), + rPropSet->setPropertyValue("FontCharset", aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetPitch(); - rPropSet->setPropertyValue( OUString("FontPitch"), aTmp ); + rPropSet->setPropertyValue("FontPitch", aTmp ); float fVal(10.); aTmp.setValue( &fVal, ::getCppuType(&fVal )); - rPropSet->setPropertyValue( OUString("FontHeight"), aTmp ); + rPropSet->setPropertyValue("FontHeight", aTmp ); } class SwHTMLFormPendingStackData_Impl: public SwPendingStackData @@ -1408,7 +1408,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) Any aTmp; aTmp <<= OUString(sName); - xFormPropSet->setPropertyValue( OUString("Name"), aTmp ); + xFormPropSet->setPropertyValue("Name", aTmp ); if( aAction.Len() ) { @@ -1421,12 +1421,12 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) aAction = aURLObj.GetPartBeforeLastName(); } aTmp <<= OUString(aAction); - xFormPropSet->setPropertyValue( OUString("TargetURL"), + xFormPropSet->setPropertyValue("TargetURL", aTmp ); FormSubmitMethod eMethod = (FormSubmitMethod)nMethod; aTmp.setValue( &eMethod, ::getCppuType((const FormSubmitMethod*)0) ); - xFormPropSet->setPropertyValue( OUString("SubmitMethod"), + xFormPropSet->setPropertyValue("SubmitMethod", aTmp ); FormSubmitEncoding eEncType = (FormSubmitEncoding)nEncType; @@ -1705,21 +1705,21 @@ void SwHTMLParser::InsertInput() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString("Name"), aTmp ); + xPropSet->setPropertyValue("Name", aTmp ); if( HTML_IT_HIDDEN != eType ) { if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16) (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString("TabIndex"), aTmp ); + xPropSet->setPropertyValue("TabIndex", aTmp ); } if( bDisabled ) { sal_Bool bFalse = sal_False; aTmp.setValue(&bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Enabled"), aTmp ); + xPropSet->setPropertyValue("Enabled", aTmp ); } } @@ -1736,10 +1736,10 @@ void SwHTMLParser::InsertInput() { if( !bValue ) aTmp <<= OUString( OOO_STRING_SVTOOLS_HTML_on ); - xPropSet->setPropertyValue( OUString("RefValue"), + xPropSet->setPropertyValue("RefValue", aTmp ); aTmp <<= OUString(); - xPropSet->setPropertyValue( OUString("Label"), + xPropSet->setPropertyValue("Label", aTmp ); // Beim RadioButton darf die DefaultChecked-Property // erst gesetzt werden, wenn das Control angelegt und ein @@ -1781,7 +1781,7 @@ void SwHTMLParser::InsertInput() OUString("ButtonType"), aTmp ); aTmp <<= (sal_Int16) 0 ; - xPropSet->setPropertyValue( OUString("Border"), + xPropSet->setPropertyValue("Border", aTmp ); } break; @@ -1810,7 +1810,7 @@ void SwHTMLParser::InsertInput() ; } aTmp <<= OUString(sText); - xPropSet->setPropertyValue( OUString("Label"), + xPropSet->setPropertyValue("Label", aTmp ); aTmp.setValue( &eButtonType, @@ -1842,7 +1842,7 @@ void SwHTMLParser::InsertInput() if( HTML_IT_PASSWORD == eType ) { aTmp <<= (sal_Int16)'*' ; - xPropSet->setPropertyValue( OUString("EchoChar"), + xPropSet->setPropertyValue("EchoChar", aTmp ); } @@ -1855,7 +1855,7 @@ void SwHTMLParser::InsertInput() break; case HTML_IT_HIDDEN: - xPropSet->setPropertyValue( OUString("HiddenValue"), + xPropSet->setPropertyValue("HiddenValue", aTmp ); bHidden = sal_True; break; @@ -1936,7 +1936,7 @@ void SwHTMLParser::InsertInput() if( HTML_IT_RADIO == eType ) { aTmp <<= (sal_Int16) nChecked ; - xPropSet->setPropertyValue( OUString("DefaultState"), aTmp ); + xPropSet->setPropertyValue("DefaultState", aTmp ); } if( HTML_IT_IMAGE == eType ) @@ -1945,7 +1945,7 @@ void SwHTMLParser::InsertInput() // Download der Grafik erst dann am XModel anmelden kann, // wenn das Control eingefuegt ist. aTmp <<= OUString( URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), sImgSrc, Link(), false)); - xPropSet->setPropertyValue( OUString("ImageURL"), + xPropSet->setPropertyValue("ImageURL", aTmp ); } @@ -2107,15 +2107,15 @@ void SwHTMLParser::NewTextArea() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString("Name"), aTmp ); + xPropSet->setPropertyValue("Name", aTmp ); sal_Bool bTrue = sal_True; aTmp.setValue( &bTrue, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("MultiLine"), + xPropSet->setPropertyValue("MultiLine", aTmp ); - xPropSet->setPropertyValue( OUString("VScroll"), aTmp ); + xPropSet->setPropertyValue("VScroll", aTmp ); if( HTML_WM_OFF == nWrap ) - xPropSet->setPropertyValue( OUString("HScroll"), + xPropSet->setPropertyValue("HScroll", aTmp ); if( HTML_WM_HARD == nWrap ) xPropSet->setPropertyValue( @@ -2124,7 +2124,7 @@ void SwHTMLParser::NewTextArea() if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString("TabIndex"), + xPropSet->setPropertyValue("TabIndex", aTmp ); } @@ -2134,7 +2134,7 @@ void SwHTMLParser::NewTextArea() { sal_Bool bFalse = sal_False; aTmp.setValue( &bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Enabled"), + xPropSet->setPropertyValue("Enabled", aTmp ); } @@ -2202,7 +2202,7 @@ void SwHTMLParser::EndTextArea() Any aTmp; aTmp <<= OUString(pFormImpl->GetText()); - rPropSet->setPropertyValue( OUString("DefaultText"), + rPropSet->setPropertyValue("DefaultText", aTmp ); pFormImpl->EraseText(); @@ -2385,12 +2385,12 @@ void SwHTMLParser::NewSelect() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString("Name"), aTmp ); + xPropSet->setPropertyValue("Name", aTmp ); if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString("TabIndex"), + xPropSet->setPropertyValue("TabIndex", aTmp ); } @@ -2398,7 +2398,7 @@ void SwHTMLParser::NewSelect() { sal_Bool bFalse = sal_False; aTmp.setValue( &bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Enabled"), + xPropSet->setPropertyValue("Enabled", aTmp ); } @@ -2408,7 +2408,7 @@ void SwHTMLParser::NewSelect() { sal_Bool bTrue = sal_True; aTmp.setValue( &bTrue, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Dropdown"), + xPropSet->setPropertyValue("Dropdown", aTmp ); } else @@ -2519,7 +2519,7 @@ void SwHTMLParser::EndSelect() aAny.setValue( &aValueList, ::getCppuType((uno::Sequence<OUString>*)0) ); - rPropSet->setPropertyValue( OUString("ListSource"), + rPropSet->setPropertyValue("ListSource", aAny ); size_t nSelCnt = pFormImpl->GetSelectedList().size(); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 79afa49ea834..d976e1a7a53e 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -974,7 +974,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, append('=').append(TypeNames[eType]); } - aTmp = xPropSet->getPropertyValue( OUString("Name") ); + aTmp = xPropSet->getPropertyValue("Name"); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -986,7 +986,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, sOut.append('\"'); } - aTmp = xPropSet->getPropertyValue( OUString("Enabled") ); + aTmp = xPropSet->getPropertyValue("Enabled"); if( aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue() ) { @@ -1314,7 +1314,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } else if( TYPE_CHECKBOX == eType || TYPE_RADIO == eType ) { - aTmp = xPropSet->getPropertyValue(OUString("Label")); + aTmp = xPropSet->getPropertyValue("Label"); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 6e5235f4ded2..d6f1a3a7df9f 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -417,15 +417,15 @@ void SwHTMLParser::InsertEmbed() if ( xSet.is() ) { if( bHasURL ) - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", uno::makeAny( OUString( aURL ) ) ); if( bHasType ) - xSet->setPropertyValue( OUString("PluginMimeType"), + xSet->setPropertyValue("PluginMimeType", uno::makeAny( OUString( aType ) ) ); uno::Sequence < beans::PropertyValue > aProps; aCmdLst.FillSequence( aProps ); - xSet->setPropertyValue( OUString("PluginCommands"), uno::makeAny( aProps ) ); + xSet->setPropertyValue("PluginCommands", uno::makeAny( aProps ) ); } } @@ -887,23 +887,23 @@ void SwHTMLParser::InsertFloatingFrame() sal_Bool bHasBorder = aFrameDesc.HasFrameBorder(); Size aMargin = aFrameDesc.GetMargin(); - xSet->setPropertyValue( OUString("FrameURL"), uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); - xSet->setPropertyValue( OUString("FrameName"), uno::makeAny( aName ) ); + xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); + xSet->setPropertyValue("FrameName", uno::makeAny( aName ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( OUString("FrameIsAutoScroll"), + xSet->setPropertyValue("FrameIsAutoScroll", uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( OUString("FrameIsScrollingMode"), + xSet->setPropertyValue("FrameIsScrollingMode", uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); - xSet->setPropertyValue( OUString("FrameIsBorder"), + xSet->setPropertyValue("FrameIsBorder", uno::makeAny( bHasBorder ) ); - xSet->setPropertyValue( OUString("FrameMarginWidth"), + xSet->setPropertyValue("FrameMarginWidth", uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( OUString("FrameMarginHeight"), + xSet->setPropertyValue("FrameMarginHeight", uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } @@ -1023,7 +1023,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, OUString aStr; String aURL; - aAny = xSet->getPropertyValue( OUString("PluginURL") ); + aAny = xSet->getPropertyValue("PluginURL"); if( (aAny >>= aStr) && !aStr.isEmpty() ) { aURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(), @@ -1040,7 +1040,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, } OUString aType; - aAny = xSet->getPropertyValue( OUString("PluginMimeType") ); + aAny = xSet->getPropertyValue("PluginMimeType"); if( (aAny >>= aType) && !aType.isEmpty() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type) @@ -1072,7 +1072,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // CODEBASE OUString aCd; - aAny = xSet->getPropertyValue( OUString("AppletCodeBase") ); + aAny = xSet->getPropertyValue("AppletCodeBase"); if( (aAny >>= aCd) && !aCd.isEmpty() ) { String sCodeBase( URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(), aCd) ); @@ -1088,7 +1088,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // CODE OUString aClass; - aAny = xSet->getPropertyValue( OUString("AppletCode") ); + aAny = xSet->getPropertyValue("AppletCode"); aAny >>= aClass; sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_code) .append("=\""); @@ -1098,7 +1098,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // NAME OUString aAppletName; - aAny = xSet->getPropertyValue( OUString("AppletName") ); + aAny = xSet->getPropertyValue("AppletName"); aAny >>= aAppletName; if( !aAppletName.isEmpty() ) { @@ -1110,7 +1110,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, } sal_Bool bScript = sal_False; - aAny = xSet->getPropertyValue( OUString("AppletIsScript") ); + aAny = xSet->getPropertyValue("AppletIsScript"); aAny >>= bScript; if( bScript ) sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_mayscript); @@ -1149,7 +1149,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // und ein </APPLET> schreiben uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("AppletCommands") ); + aAny = xSet->getPropertyValue("AppletCommands"); aAny >>= aProps; SvCommandList aCommands; @@ -1208,7 +1208,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // fuer Plugins die Parameter als Optionen schreiben uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("PluginCommands") ); + aAny = xSet->getPropertyValue("PluginCommands"); aAny >>= aProps; SvCommandList aCommands; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index d8a4faf258d2..c628862df1dc 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -408,7 +408,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, OUString aMime("application/binary"); uno::Any aAny2; aAny2 <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny2 ); + xSet->setPropertyValue("MediaType", aAny2 ); pDoc->WriteLayoutCache( *pStream ); } @@ -522,7 +522,7 @@ bool SwXMLWriter::WriteThroughComponent( OUString aMime("text/xml"); uno::Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); OUString aUseCommonPassPropName("UseCommonStoragePasswordEncryption"); diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index fca627d3af85..84ab0971bf98 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -414,7 +414,7 @@ void SwXMLExport::GetConfigurationSettings( Sequence < PropertyValue >& rProps) Reference< XMultiServiceFactory > xFac( GetModel(), UNO_QUERY ); if( xFac.is() ) { - Reference< XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY ); + Reference< XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY ); if( xProps.is() ) SvXMLUnitConverter::convertPropertySet( rProps, xProps ); } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 2be3074a4004..c5f20d05c0b1 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1088,7 +1088,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if( !xFac.is() ) return; - Reference< XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY ); + Reference< XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY ); if( !xProps.is() ) return; diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 54217e8d2e4b..3e7703538952 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -297,35 +297,35 @@ static void lcl_addFrameProperties( return; OUString aURL; - Any aAny = xSet->getPropertyValue( OUString("FrameURL") ); + Any aAny = xSet->getPropertyValue("FrameURL"); aAny >>= aURL; OUString aName; - aAny = xSet->getPropertyValue( OUString("FrameName")); + aAny = xSet->getPropertyValue("FrameName"); aAny >>= aName; sal_Bool bIsAutoScroll = sal_False, bIsScrollingMode; - aAny = xSet->getPropertyValue( OUString("FrameIsAutoScroll")); + aAny = xSet->getPropertyValue("FrameIsAutoScroll"); aAny >>= bIsAutoScroll; if ( !bIsAutoScroll ) { - aAny = xSet->getPropertyValue( OUString("FrameIsScrollingMode") ); + aAny = xSet->getPropertyValue("FrameIsScrollingMode"); aAny >>= bIsScrollingMode; } sal_Bool bIsBorderSet, bIsAutoBorder = sal_False; - aAny = xSet->getPropertyValue( OUString("FrameIsAutoBorder") ); + aAny = xSet->getPropertyValue("FrameIsAutoBorder"); aAny >>= bIsAutoBorder; if ( !bIsAutoBorder ) { - aAny = xSet->getPropertyValue( OUString("FrameIsBorder") ); + aAny = xSet->getPropertyValue("FrameIsBorder"); aAny >>= bIsBorderSet; } sal_Int32 nWidth, nHeight; - aAny = xSet->getPropertyValue( OUString("FrameMarginWidth") ); + aAny = xSet->getPropertyValue("FrameMarginWidth"); aAny >>= nWidth; - aAny = xSet->getPropertyValue( OUString("FrameMarginHeight") ); + aAny = xSet->getPropertyValue("FrameMarginHeight"); aAny >>= nHeight; if( !bIsAutoScroll ) @@ -547,27 +547,27 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); OUString aStr; - Any aAny2 = xSet->getPropertyValue( OUString("AppletCodeBase") ); + Any aAny2 = xSet->getPropertyValue("AppletCodeBase"); aAny2 >>= aStr; if (!aStr.isEmpty() ) lcl_addURL(rXMLExport, aStr); - aAny2 = xSet->getPropertyValue( OUString("AppletName") ); + aAny2 = xSet->getPropertyValue("AppletName"); aAny2 >>= aStr; if (!aStr.isEmpty()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr ); - aAny2 = xSet->getPropertyValue( OUString("AppletCode") ); + aAny2 = xSet->getPropertyValue("AppletCode"); aAny2 >>= aStr; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr ); sal_Bool bScript = sal_False; - aAny2 = xSet->getPropertyValue( OUString("AppletIsScript") ); + aAny2 = xSet->getPropertyValue("AppletIsScript"); aAny2 >>= bScript; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bScript ? XML_TRUE : XML_FALSE ); uno::Sequence < beans::PropertyValue > aProps; - aAny2 = xSet->getPropertyValue( OUString("AppletCommands") ); + aAny2 = xSet->getPropertyValue("AppletCommands"); aAny2 >>= aProps; sal_Int32 i = aProps.getLength(); @@ -594,11 +594,11 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); OUString aStr; - Any aAny2 = xSet->getPropertyValue( OUString("PluginURL") ); + Any aAny2 = xSet->getPropertyValue("PluginURL"); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( OUString("PluginMimeType") ); + aAny2 = xSet->getPropertyValue("PluginMimeType"); aAny2 >>= aStr; if (!aStr.isEmpty()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr ); @@ -613,12 +613,12 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); OUString aStr; - Any aAny2 = xSet->getPropertyValue( OUString("FrameURL") ); + Any aAny2 = xSet->getPropertyValue("FrameURL"); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( OUString("FrameName") ); + aAny2 = xSet->getPropertyValue("FrameName"); aAny2 >>= aStr; if (!aStr.isEmpty()) @@ -663,7 +663,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("AppletCommands") ); + aAny = xSet->getPropertyValue("AppletCommands"); aAny >>= aProps; sal_Int32 i = aProps.getLength(); @@ -689,7 +689,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("PluginCommands") ); + aAny = xSet->getPropertyValue("PluginCommands"); aAny >>= aProps; sal_Int32 i = aProps.getLength(); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index a84f99c57a77..717c5949b604 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -716,10 +716,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( if ( xSet.is() ) { if( bValidURL ) - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", makeAny( OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); if( bValidMimeType ) - xSet->setPropertyValue( OUString("PluginMimeType"), + xSet->setPropertyValue("PluginMimeType", makeAny( OUString( rMimeType ) ) ); } @@ -846,31 +846,31 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( OUString("FrameURL"), + xSet->setPropertyValue("FrameURL", makeAny( OUString( URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ) ); - xSet->setPropertyValue( OUString("FrameName"), + xSet->setPropertyValue("FrameName", makeAny( OUString( rName ) ) ); if ( eScrollMode == ScrollingAuto ) - xSet->setPropertyValue( OUString("FrameIsAutoScroll"), + xSet->setPropertyValue("FrameIsAutoScroll", makeAny( sal_True ) ); else - xSet->setPropertyValue( OUString("FrameIsScrollingMode"), + xSet->setPropertyValue("FrameIsScrollingMode", makeAny( (sal_Bool) (eScrollMode == ScrollingYes) ) ); if ( bIsBorderSet ) - xSet->setPropertyValue( OUString("FrameIsBorder"), + xSet->setPropertyValue("FrameIsBorder", makeAny( bHasBorder ) ); else - xSet->setPropertyValue( OUString("FrameIsAutoBorder"), + xSet->setPropertyValue("FrameIsAutoBorder", makeAny( sal_True ) ); - xSet->setPropertyValue( OUString("FrameMarginWidth"), + xSet->setPropertyValue("FrameMarginWidth", makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( OUString("FrameMarginHeight"), + xSet->setPropertyValue("FrameMarginHeight", makeAny( sal_Int32( aMargin.Height() ) ) ); } diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index d8a5cbfbd654..e4045107a16c 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -638,7 +638,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) // TODO/MBA: testing uno::Reference < beans::XPropertySet > xSet( rMedium.GetStorage(), uno::UNO_QUERY ); if ( xSet.is() ) - xSet->setPropertyValue( OUString("MediaType"), uno::makeAny( OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) ); + xSet->setPropertyValue("MediaType", uno::makeAny( OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) ); } catch (const uno::Exception&) { diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index bdb823ae5874..92c06c40b36e 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -309,7 +309,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) uno::Reference< beans::XPropertySet > xInfo; xStyles->getByName( pNameItem->GetValue() ) >>= xInfo; OUString aUIName; - xInfo->getPropertyValue( OUString("DisplayName") ) >>= aUIName; + xInfo->getPropertyValue("DisplayName") >>= aUIName; if ( !aUIName.isEmpty() ) rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) ); } diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 8de8676fd7e2..c5f8ca32f0d9 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -278,7 +278,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, Any aCol = xCols->getByName(pColNames[n]); Reference <XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(OUString("Type")); + Any aType = xCol->getPropertyValue("Type"); sal_Int32 eDataType = 0; aType >>= eDataType; switch(eDataType) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 1199d7a0bb10..7870d63c9730 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1551,7 +1551,7 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName, Any aCol = xCols->getByName(rColNm); uno::Reference<XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(OUString("Type")); + Any aType = xCol->getPropertyValue("Type"); aType >>= nRet; } if(bDispose) diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 49bcc64d0eba..f03fc874fbce 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -230,7 +230,7 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa if( xTransferableProperties.is() ) { OUString sURL; - xTransferableProperties->getPropertyValue( OUString("URL") ) >>= sURL; + xTransferableProperties->getPropertyValue("URL") >>= sURL; if(!sURL.isEmpty()) SWUnoHelper::UCB_DeleteFile( sURL ); } diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx index 61624c9f3394..c6cf2c4b7f69 100644 --- a/sw/source/ui/fldui/xfldui.cxx +++ b/sw/source/ui/fldui/xfldui.cxx @@ -125,7 +125,7 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName Any aCol = xCols->getByName(rFldName); Reference <XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(OUString("Type")); + Any aType = xCol->getPropertyValue("Type"); sal_Int32 eDataType = 0; aType >>= eDataType; switch(eDataType) diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx index 7438965838ec..9fd57e491171 100644 --- a/sw/source/ui/shells/textdrw.cxx +++ b/sw/source/ui/shells/textdrw.cxx @@ -108,7 +108,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con { // #105638# OJ aTmp <<= sal_True; - xPropSet->setPropertyValue( OUString( "DispatchURLInternal" ), aTmp ); + xPropSet->setPropertyValue("DispatchURLInternal", aTmp ); } } diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 2b5c607ebac3..096209b1c529 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -237,7 +237,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", uno::makeAny( OUString( url.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); } } @@ -288,7 +288,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) try { if ( sClassLocation.Len() ) - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", uno::makeAny( OUString( URIHelper::SmartRel2Abs( @@ -298,7 +298,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if ( aCommandList.size() ) { aCommandList.FillSequence( aSeq ); - xSet->setPropertyValue( OUString("PluginCommands"), uno::makeAny( aSeq ) ); + xSet->setPropertyValue("PluginCommands", uno::makeAny( aSeq ) ); } } catch (const uno::Exception&) @@ -348,27 +348,27 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aMargin = pMarginItem->GetSize(); if ( pURLItem ) - xSet->setPropertyValue( OUString("FrameURL"), uno::makeAny( OUString( pURLItem->GetValue() ) ) ); + xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( pURLItem->GetValue() ) ) ); if ( pNameItem ) - xSet->setPropertyValue( OUString("FrameName"), uno::makeAny( OUString( pNameItem->GetValue() ) ) ); + xSet->setPropertyValue("FrameName", uno::makeAny( OUString( pNameItem->GetValue() ) ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( OUString("FrameIsAutoScroll"), + xSet->setPropertyValue("FrameIsAutoScroll", uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( OUString("FrameIsScrollingMode"), + xSet->setPropertyValue("FrameIsScrollingMode", uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); if ( pBorderItem ) - xSet->setPropertyValue( OUString("FrameIsBorder"), + xSet->setPropertyValue("FrameIsBorder", uno::makeAny( (sal_Bool) pBorderItem->GetValue() ) ); if ( pMarginItem ) { - xSet->setPropertyValue( OUString("FrameMarginWidth"), + xSet->setPropertyValue("FrameMarginWidth", uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( OUString("FrameMarginHeight"), + xSet->setPropertyValue("FrameMarginHeight", uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index de5399bf180f..10deb9ff15e4 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -208,7 +208,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue( OUString("Size") ) + if( xDialogProps->getPropertyValue("Size") >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -220,7 +220,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) aSwRect = pFlyFrmFmt->GetAnchoredObj()->GetObjRectWithSpaces(); Rectangle aRect( aSwRect.SVRect() ); Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect ); - xDialogProps->setPropertyValue( OUString("Position"), + xDialogProps->setPropertyValue("Position", uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 080f3b722cf8..88af1dd55388 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -308,7 +308,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException ) { if (rInfo.mnAttributes & PropertyAttribute::READONLY) - throw PropertyVetoException ( OUString( "Property is read-only: " ) + OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); + throw PropertyVetoException ("Property is read-only: " + OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); switch( rInfo.mnHandle ) { diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 566a1f692348..ec5142bc188b 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -460,7 +460,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( else if (rName.equalsAscii( GetPropName( UNO_NAME_CONNECTION ) )) bOK = rValue >>= xCurConnection; else if (rName.equalsAscii( GetPropName( UNO_NAME_MODEL ) )) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rName, static_cast < cppu::OWeakObject * > ( this ) ); else if (rName.equalsAscii( GetPropName( UNO_NAME_DATA_SOURCE_NAME ) )) bOK = rValue >>= aCurDataSourceName; else if (rName.equalsAscii( GetPropName( UNO_NAME_DAD_COMMAND ) )) @@ -472,7 +472,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( bOK = rValue >>= aCurDocumentURL; if (!aCurDocumentURL.isEmpty() && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, false )) - throw RuntimeException( OUString( "Failed to create document from URL: " ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to create document from URL: " + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); } else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) )) { @@ -480,9 +480,9 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (!aCurOutputURL.isEmpty()) { if (!UCB_IsDirectory(aCurOutputURL)) - throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL does not point to a directory: " + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (UCB_IsReadOnlyFileName(aCurOutputURL)) - throw IllegalArgumentException( OUString( "URL is read-only: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL is read-only: " + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); } } else if (rName.equalsAscii( GetPropName( UNO_NAME_FILE_NAME_PREFIX ) )) @@ -533,7 +533,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( throw UnknownPropertyException( OUString( "Property is unknown: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); if (!bOK) - throw IllegalArgumentException( OUString( "Property type mismatch or property not set: " ) + rName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("Property type mismatch or property not set: " + rName, static_cast < cppu::OWeakObject * > ( this ), 0 ); } // need to translate the selection: the API here requires a sequence of bookmarks, but the MergeNew @@ -601,7 +601,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() ) { OSL_FAIL("PropertyValues missing or unset"); - throw IllegalArgumentException( OUString( "Either the ResultSet or DataSourceName and DataCommand must be set." ), static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("Either the ResultSet or DataSourceName and DataCommand must be set.", static_cast < cppu::OWeakObject * > ( this ), 0 ); } // @@ -699,7 +699,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( else // default empty document without URL { if (aCurOutputURL.isEmpty()) - throw RuntimeException( OUString( "OutputURL is not set and can not be obtained." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("OutputURL is not set and can not be obtained.", static_cast < cppu::OWeakObject * > ( this ) ); } aURLObj.SetSmartURL( aCurOutputURL ); @@ -728,7 +728,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( { pMgr->SetEMailColumn( sAddressFromColumn ); if(sAddressFromColumn.isEmpty()) - throw RuntimeException( OUString( "Mail address column not set." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Mail address column not set.", static_cast < cppu::OWeakObject * > ( this ) ); aMergeDesc.sSaveToFilter = sAttachmentFilter; aMergeDesc.sSubject = sSubject; aMergeDesc.sMailBody = sMailBody; @@ -746,7 +746,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( xInService, sInServerPassword, sOutServerPassword ); if( !aMergeDesc.xSmtpServer.is() || !aMergeDesc.xSmtpServer->isConnected()) - throw RuntimeException( OUString( "Failed to connect to mail server." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to connect to mail server.", static_cast < cppu::OWeakObject * > ( this ) ); } } @@ -772,7 +772,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( } } if ( !bStoredAsTemporary ) - throw RuntimeException( OUString( "Failed to save temporary file." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to save temporary file.", static_cast < cppu::OWeakObject * > ( this ) ); pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc. const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc(); @@ -793,7 +793,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( // (in case it wasn't a temporary model, it will be closed in the dtor, at the latest) if (!bSucc) - throw Exception( OUString( "Mail merge failed. Sorry, no further information available." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw Exception("Mail merge failed. Sorry, no further information available.", static_cast < cppu::OWeakObject * > ( this ) ); //de-initialize services if(xInService.is() && xInService->isConnected()) @@ -917,7 +917,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( bOK = rValue >>= aText; if (!aText.isEmpty() && !LoadFromURL_impl( xModel, xDocSh, aText, true )) - throw RuntimeException( OUString( "Failed to create document from URL: " ) + aText, static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to create document from URL: " + aText, static_cast < cppu::OWeakObject * > ( this ) ); aDocumentURL = aText; } else if (pData == &aOutputURL) @@ -927,9 +927,9 @@ void SAL_CALL SwXMailMerge::setPropertyValue( if (!aText.isEmpty()) { if (!UCB_IsDirectory(aText)) - throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL does not point to a directory: " + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (UCB_IsReadOnlyFileName(aText)) - throw IllegalArgumentException( OUString( "URL is read-only: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL is read-only: " + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); } aOutputURL = aText; } @@ -984,7 +984,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( bChanged = true; } if (!bOK) - throw IllegalArgumentException( OUString( "Property type mismatch or property not set: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("Property type mismatch or property not set: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (bChanged) { diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 5dd294390dd2..beefaf1e196d 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -3165,7 +3165,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( const bool bComplex = 0 != (nScriptTypes & nComplex); if (nScriptTypes < nLatin || nScriptTypes > (nLatin | nAsian | nComplex)) - throw IllegalArgumentException(OUString("nScriptTypes ranges from 1 to 7!"), Reference< XInterface >(), 1); + throw IllegalArgumentException("nScriptTypes ranges from 1 to 7!", Reference< XInterface >(), 1); if (!pDocShell) throw DisposedException(); SwDoc* pDoc = pDocShell->GetDoc(); diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 98adb3a5f67f..f1f6dea9bdc1 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -945,7 +945,7 @@ void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -968,7 +968,7 @@ void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -992,7 +992,7 @@ sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); const SwWrtShell& rSh = m_pView->GetWrtShell(); bRet = !rSh.HasSelection(); @@ -1010,7 +1010,7 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( un if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, sal_True ); @@ -1027,7 +1027,7 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( u if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, sal_True ); @@ -1047,7 +1047,7 @@ void SwXTextViewCursor::gotoRange( if(m_pView && xRange.is()) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc()); if (!::sw::XTextRangeToSwPaM(rDestPam, xRange)) @@ -1186,7 +1186,7 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().SttDoc( bExpand ); } @@ -1200,7 +1200,7 @@ void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().EndDoc( bExpand ); } @@ -1358,7 +1358,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1377,7 +1377,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1396,7 +1396,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno:: if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1415,7 +1415,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); ShellModes eSelMode = m_pView->GetShellMode(); switch(eSelMode) @@ -1445,7 +1445,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); ShellModes eSelMode = m_pView->GetShellMode(); switch(eSelMode) @@ -1603,7 +1603,7 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( un if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Down( bExpand, 1, sal_True ); @@ -1620,7 +1620,7 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno: if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Up( bExpand, 1, sal_True ); @@ -1637,7 +1637,7 @@ sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); bRet = m_pView->GetWrtShell().IsAtLeftMargin(); } @@ -1653,7 +1653,7 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); bRet = m_pView->GetWrtShell().IsAtRightMargin(sal_True); } @@ -1668,7 +1668,7 @@ void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeExcep if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().RightMargin(bExpand, sal_True); } @@ -1682,7 +1682,7 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeExc if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().LeftMargin(bExpand, sal_True); } 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; } diff --git a/sw/source/ui/wrtsh/navmgr.cxx b/sw/source/ui/wrtsh/navmgr.cxx index c140ade33f40..cb4fc1b6cd07 100644 --- a/sw/source/ui/wrtsh/navmgr.cxx +++ b/sw/source/ui/wrtsh/navmgr.cxx @@ -207,7 +207,7 @@ bool SwNavigationMgr::addEntry(const SwPosition& rPos) { if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" ) ); + css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if (xLayoutManager.is()) diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 87e126b98a61..7ad48a33a788 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -481,7 +481,7 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF { try { - xSet->setPropertyValue( OUString("Formula"), uno::makeAny( OUString( aMathData ) ) ); + xSet->setPropertyValue("Formula", uno::makeAny( OUString( aMathData ) ) ); bActivate = sal_False; } catch (const uno::Exception&) @@ -534,12 +534,12 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); if ( xProps.is() && - ( xProps->getPropertyValue( OUString( "DisableDataTableDialog" ) ) >>= bDisableDataTableDialog ) && + ( xProps->getPropertyValue("DisableDataTableDialog") >>= bDisableDataTableDialog ) && bDisableDataTableDialog ) { - xProps->setPropertyValue( OUString( "DisableDataTableDialog" ), + xProps->setPropertyValue("DisableDataTableDialog", uno::makeAny( sal_False ) ); - xProps->setPropertyValue( OUString( "DisableComplexChartTypes" ), + xProps->setPropertyValue("DisableComplexChartTypes", uno::makeAny( sal_False ) ); uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); if ( xModifiable.is() ) |