diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /sw | |
parent | WaE: Potentially uninitialized local variable (diff) | |
download | core-8b27d78b4afaa9c47ca0fda144c8060f2f14046b.tar.gz core-8b27d78b4afaa9c47ca0fda144c8060f2f14046b.zip |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sw')
137 files changed, 975 insertions, 986 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 0a705ee9713e..9bfad8414fc6 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -102,7 +102,7 @@ class SwNoteProps: public utl::ConfigItem bool bIsShowAnchor; public: SwNoteProps() - : ConfigItem(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Notes"))) + : ConfigItem(::rtl::OUString("Office.Writer/Notes")) , bIsShowAnchor(false) { const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames(); @@ -124,7 +124,7 @@ class SwNoteProps: public utl::ConfigItem { aNames.realloc(1); ::rtl::OUString* pNames = aNames.getArray(); - pNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowAnkor")); + pNames[0] = ::rtl::OUString("ShowAnkor"); } return aNames; } diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index be89e34d3747..78b195f3855a 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -200,9 +200,9 @@ bool UCB_GetFileListOfFolder( const String& rURL, sal_uInt16 nSeqSize = pDateTimeList ? 2 : 1; ::com::sun::star::uno::Sequence < rtl::OUString > aProps( nSeqSize ); rtl::OUString* pProps = aProps.getArray(); - pProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + pProps[ 0 ] = rtl::OUString("Title"); if( pDateTimeList ) - pProps[ 1 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")); + pProps[ 1 ] = rtl::OUString("DateModified"); try { diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index ccec95703a1f..365425fcdc93 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -242,7 +242,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) UnoActionContext aCont(m_pImpl->m_pDoc); if (m_pImpl->m_sMarkName.isEmpty()) { - m_pImpl->m_sMarkName = OUString(RTL_CONSTASCII_USTRINGPARAM("Bookmark")); + m_pImpl->m_sMarkName = OUString("Bookmark"); } if ((eType == IDocumentMarkAccess::BOOKMARK) && ::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_pImpl->m_sMarkName)) @@ -378,7 +378,7 @@ throw (uno::RuntimeException) OUString SAL_CALL SwXBookmark::getImplementationName() throw (uno::RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXBookmark")); + return OUString("SwXBookmark"); } static char const*const g_ServicesBookmark[] = @@ -440,8 +440,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, uno::RuntimeException) { // nothing to set here - throw lang::IllegalArgumentException( ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + throw lang::IllegalArgumentException( ::rtl::OUString("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 cdd89eed79d3..a55f2fb56753 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -113,7 +113,7 @@ public: try { uno::Reference< beans::XPropertySet > xProps( mpDocShell->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xLibContainer( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xLibContainer( xProps->getPropertyValue( rtl::OUString("BasicLibraries") ), uno::UNO_QUERY_THROW ); rtl::OUString sProjectName( "Standard"); if ( !mpDocShell->GetBasicManager()->GetName().isEmpty() ) { @@ -612,7 +612,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 { uno::Sequence< uno::Any > aArgs(1); aArgs[ 0 ] <<= pDoc->GetDocShell()->GetModel(); - aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals")), aArgs ); + aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString("ooo.vba.word.Globals"), aArgs ); pDoc->GetDocShell()->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs ); } aGlobs >>= xRet; @@ -1607,18 +1607,18 @@ uno::Reference< XTextSection > SwXTextSections::GetObject( SwSectionFmt& rFmt ) OUString SwXBookmarks::getImplementationName(void) throw( RuntimeException ) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXBookmarks")); + return OUString("SwXBookmarks"); } sal_Bool SwXBookmarks::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmarks")) == rServiceName; + return OUString("com.sun.star.text.Bookmarks") == rServiceName; } Sequence< OUString > SwXBookmarks::getSupportedServiceNames(void) throw( RuntimeException ) { Sequence< OUString > aRet(1); - aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmarks")); + aRet[0] = OUString("com.sun.star.text.Bookmarks"); return aRet; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index ef6251cfa673..28ab19a9bfac 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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineAuthor")), aAuthorValue); + aAuthorValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString("RedlineAuthor"), aAuthorValue); sal_uInt16 nAuthor = 0; ::rtl::OUString sAuthor; if( aAuthorValue >>= sAuthor ) @@ -1190,7 +1190,7 @@ void makeRedline( SwPaM& rPaM, ::rtl::OUString sComment; uno::Any aCommentValue; - aCommentValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineComment")), aCommentValue); + aCommentValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString("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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineDateTime")), aDateTimeValue); + aDateTimeValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString("RedlineDateTime"), aDateTimeValue); if( aDateTimeValue >>= aStamp ) { aRedlineData.SetTimeStamp( diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 907d2e21f558..b6755a58361a 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1108,7 +1108,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ( rtl::OUString( "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) { @@ -1541,7 +1541,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) { // get property <::drawing::Shape::Transformation> // without conversion to layout direction as below - aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation")) ); + aRet = _getPropAtAggrObj( rtl::OUString("Transformation") ); } else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID ) { @@ -1552,13 +1552,13 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) { // get property <::drawing::Shape::StartPosition> // without conversion to layout direction as below - aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition")) ); + aRet = _getPropAtAggrObj( rtl::OUString("StartPosition") ); } else if ( FN_SHAPE_ENDPOSITION_IN_HORI_L2R == pEntry->nWID ) { // get property <::drawing::Shape::EndPosition> // without conversion to layout direction as below - aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition")) ); + aRet = _getPropAtAggrObj( rtl::OUString("EndPosition") ); } else { @@ -1618,7 +1618,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) { // get property <::drawing::Shape::Transformation> // without conversion to layout direction as below - aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation")) ); + aRet = _getPropAtAggrObj( rtl::OUString("Transformation") ); } break; case FN_SHAPE_POSITION_LAYOUT_DIR: @@ -1631,14 +1631,14 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) { // get property <::drawing::Shape::StartPosition> // without conversion to layout direction as below - aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition")) ); + aRet = _getPropAtAggrObj( rtl::OUString("StartPosition") ); } break; case FN_SHAPE_ENDPOSITION_IN_HORI_L2R: { // get property <::drawing::Shape::StartPosition> // without conversion to layout direction as below - aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition")) ); + aRet = _getPropAtAggrObj( rtl::OUString("EndPosition") ); } break; } @@ -1829,7 +1829,7 @@ void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName ) if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw uno::RuntimeException( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( rtl::OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pFmt) { const SfxItemSet& rSet = pFmt->GetAttrSet(); @@ -1923,7 +1923,7 @@ void SwXShape::addPropertyChangeListener( uno::RuntimeException ) { if ( !xShapeAgg.is() ) - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no shape aggregate" ) ), *this ); + throw uno::RuntimeException( ::rtl::OUString( "no shape aggregate" ), *this ); // must be handled by the aggregate uno::Reference< beans::XPropertySet > xShapeProps; @@ -1938,7 +1938,7 @@ void SwXShape::removePropertyChangeListener( uno::RuntimeException ) { if ( !xShapeAgg.is() ) - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no shape aggregate" ) ), *this ); + throw uno::RuntimeException( ::rtl::OUString( "no shape aggregate" ), *this ); // must be handled by the aggregate uno::Reference< beans::XPropertySet > xShapeProps; @@ -2367,9 +2367,9 @@ awt::Point SwXShape::_GetAttrPosition() { awt::Point aAttrPos; - uno::Any aHoriPos( getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")) ) ); + uno::Any aHoriPos( getPropertyValue( rtl::OUString("HoriOrientPosition") ) ); aHoriPos >>= aAttrPos.X; - uno::Any aVertPos( getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")) ) ); + uno::Any aVertPos( getPropertyValue( rtl::OUString("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 2ec74e74015a..6a4bfee16da0 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -566,7 +566,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName, if( USHRT_MAX != nMId ) pType->PutValue( rValue, nMId ); else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } } else if(!pType && m_pDoc && @@ -701,7 +701,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName, } break; default: - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } } } @@ -809,7 +809,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName) } } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else { @@ -878,7 +878,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName) } break; default: - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } if( pStr ) @@ -1921,9 +1921,9 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An const SfxItemPropertySimpleEntry* pEntry = _pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pField) { @@ -2080,7 +2080,7 @@ uno::Any SwXTextField::getPropertyValue(const OUString& rPropertyName) pEntry = _pParaPropSet->getPropertyMap().getByName(rPropertyName); } if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch( pEntry->nWID ) { diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 443f37653f7f..0990c4fc9890 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -840,7 +840,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 ( RTL_CONSTASCII_USTRINGPARAM ( "FrameStyles" ) ) ); + const ::uno::Any aAny = xFamilies->getByName ( OUString( "FrameStyles" ) ); aAny >>= mxStyleFamily; // In the derived class, we'll ask mxStyleFamily for the relevant default style // mxStyleFamily is initialised in the SwXFrame constructor @@ -848,21 +848,21 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD { case FLYCNTTYPE_FRM: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Frame" ) ) ); + uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "Frame" ) ); aAny2 >>= mxStyleData; pProps = new SwFrameProperties_Impl( ); } break; case FLYCNTTYPE_GRF: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Graphics" ) ) ); + uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "Graphics" ) ); aAny2 >>= mxStyleData; pProps = new SwGraphicProperties_Impl( ); } break; case FLYCNTTYPE_OLE: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "OLE" ) ) ); + uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "OLE" ) ); aAny2 >>= mxStyleData; pProps = new SwOLEProperties_Impl( ); } @@ -1015,13 +1015,13 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: const :: SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pFmt) { bool bNextFrame = false; if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pFmt->GetDoc(); if ( ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID)) || @@ -1482,7 +1482,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) SwFrmFmt* pFmt = GetFrmFmt(); const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(FN_UNO_ANCHOR_TYPES == pEntry->nWID) { @@ -1842,7 +1842,7 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates( { const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(pNames[i]); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); if(pEntry->nWID == FN_UNO_ANCHOR_TYPES|| pEntry->nWID == FN_PARAM_LINK_DISPLAY_NAME|| @@ -1899,9 +1899,9 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) { const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertyToDefault: property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "setPropertyToDefault: property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); bool bNextFrame; if( pEntry->nWID && @@ -2005,7 +2005,7 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName ) } } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else if(!IsDescriptor()) throw uno::RuntimeException(); @@ -2324,7 +2324,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan if( !aClassName.MakeId( aCLSID ) ) { lang::IllegalArgumentException aExcept; - aExcept.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID invalid")); + aExcept.Message = OUString("CLSID invalid"); throw aExcept; } diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 148062bd30d7..0e9ef54b7856 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -82,8 +82,8 @@ public: SwFmtFtn const& GetFootnoteFormatOrThrow() { SwFmtFtn const*const pFootnote( GetFootnoteFormat() ); if (!pFootnote) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "SwXFootnote: disposed or invalid")), 0); + throw uno::RuntimeException(OUString( + "SwXFootnote: disposed or invalid"), 0); } return *pFootnote; } diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index b38c7d8054f1..03a8c9216b15 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -366,8 +366,8 @@ public: : 0)); if (!pTOXSection) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "SwXDocumentIndex: disposed or invalid")), 0); + throw uno::RuntimeException(OUString( + "SwXDocumentIndex: disposed or invalid"), 0); } return *pTOXSection; } @@ -560,14 +560,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { throw beans::PropertyVetoException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: " )) + OUString("Property is read-only: " ) + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } @@ -876,7 +876,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast< cppu::OWeakObject * >(this)); } @@ -2093,14 +2093,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { throw beans::PropertyVetoException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + OUString("Property is read-only: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } @@ -2218,7 +2218,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } @@ -3003,7 +3003,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[nCurrentElement].Name = "TokenType"; pArr[nCurrentElement++].Value <<= - OUString(RTL_CONSTASCII_USTRINGPARAM("TokenEntryNumber")); + OUString("TokenEntryNumber"); pArr[nCurrentElement].Name = "CharacterStyleName"; pArr[nCurrentElement++].Value <<= aProgCharStyle; @@ -3042,7 +3042,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = "TokenType"; - pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenEntryText")); + pArr[0].Value <<= OUString("TokenEntryText"); pArr[1].Name = "CharacterStyleName"; pArr[1].Value <<= aProgCharStyle; @@ -3054,7 +3054,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = "TokenType"; - pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenTabStop")); + pArr[0].Value <<= OUString("TokenTabStop"); if(SVX_TAB_ADJUST_END == aToken.eTabAlign) { @@ -3085,7 +3085,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = "TokenType"; - pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenText")); + pArr[0].Value <<= OUString("TokenText"); pArr[1].Name = "CharacterStyleName"; pArr[1].Value <<= aProgCharStyle; @@ -3100,7 +3100,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = "TokenType"; - pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenPageNumber")); + pArr[0].Value <<= OUString("TokenPageNumber"); pArr[1].Name = "CharacterStyleName"; pArr[1].Value <<= aProgCharStyle; @@ -3112,7 +3112,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = "TokenType"; - pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenChapterInfo")); + pArr[0].Value <<= OUString("TokenChapterInfo"); pArr[1].Name = "CharacterStyleName"; pArr[1].Value <<= aProgCharStyle; @@ -3150,7 +3150,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[0].Name = "TokenType"; pArr[0].Value <<= - OUString(RTL_CONSTASCII_USTRINGPARAM("TokenHyperlinkStart")); + OUString("TokenHyperlinkStart"); pArr[1].Name = "CharacterStyleName"; pArr[1].Value <<= aProgCharStyle; } @@ -3162,7 +3162,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[0].Name = "TokenType"; pArr[0].Value <<= - OUString(RTL_CONSTASCII_USTRINGPARAM("TokenHyperlinkEnd")); + OUString("TokenHyperlinkEnd"); } break; case TOKEN_AUTHORITY: @@ -3172,7 +3172,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[0].Name = "TokenType"; pArr[0].Value <<= - OUString(RTL_CONSTASCII_USTRINGPARAM("TokenBibliographyDataField")); + OUString("TokenBibliographyDataField"); pArr[1].Name = "CharacterStyleName"; pArr[1].Value <<= aProgCharStyle; diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index f7762ab13dac..75b7f0b7c206 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -746,8 +746,8 @@ public: SwUnoCrsr & GetCursorOrThrow() { SwUnoCrsr *const pUnoCursor( GetCursor() ); if (!pUnoCursor) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "SwXTextCursor: disposed or invalid")), 0); + throw uno::RuntimeException(OUString( + "SwXTextCursor: disposed or invalid"), 0); } return *pUnoCursor; } @@ -1829,7 +1829,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(0)); } @@ -1976,7 +1976,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) else { throw beans::UnknownPropertyException( - OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pNames[i], static_cast<cppu::OWeakObject *>(0)); } @@ -2100,14 +2100,14 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(0)); } if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "setPropertyToDefault: property is read-only: ")) + throw uno::RuntimeException(OUString( + "setPropertyToDefault: property is read-only: ") + rPropertyName, 0); } @@ -2141,7 +2141,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(0)); } @@ -2418,15 +2418,15 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) continue; } throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pNames[i], static_cast<cppu::OWeakObject *>(this)); } if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { throw uno::RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM( - "setPropertiesToDefault: property is read-only: ")) + OUString( + "setPropertiesToDefault: property is read-only: ") + pNames[i], static_cast<cppu::OWeakObject *>(this)); } @@ -2490,7 +2490,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, continue; } throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pNames[i], static_cast<cppu::OWeakObject *>(0)); } @@ -2977,7 +2977,7 @@ SwXTextCursor::getAvailableServiceNames() throw (uno::RuntimeException) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextContent")); + pArray[0] = OUString("com.sun.star.text.TextContent"); return aRet; } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 851ef6851ff6..d40071ef5ef5 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -907,7 +907,7 @@ throw (uno::RuntimeException) OUString SAL_CALL SwXTextRange::getImplementationName() throw (uno::RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXTextRange")); + return OUString("SwXTextRange"); } static char const*const g_ServicesTextRange[] = @@ -1366,7 +1366,7 @@ SwXTextRange::getAvailableServiceNames() throw (uno::RuntimeException) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextContent")); + pArray[0] = OUString("com.sun.star.text.TextContent"); return aRet; } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index d0d7c8071297..550b7b7d8959 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -142,8 +142,8 @@ public: SwTxtNode & GetTxtNodeOrThrow() { SwTxtNode *const pTxtNode( GetTxtNode() ); if (!pTxtNode) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "SwXParagraph: disposed or invalid")), 0); + throw uno::RuntimeException(OUString( + "SwXParagraph: disposed or invalid"), 0); } return *pTxtNode; } @@ -397,14 +397,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pPropertyNames[nProp], static_cast< cppu::OWeakObject * >(&m_rThis)); } if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { throw beans::PropertyVetoException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + OUString("Property is read-only: ") + pPropertyNames[nProp], static_cast< cppu::OWeakObject * >(&m_rThis)); } @@ -457,7 +457,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pPropertyNames[nProp], static_cast< cppu::OWeakObject * >(&m_rThis)); } @@ -491,14 +491,14 @@ throw (uno::RuntimeException) } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unknown property exception caught")), + throw uno::RuntimeException(OUString( + "Unknown property exception caught"), static_cast<cppu::OWeakObject *>(this)); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "WrappedTargetException caught")), + throw uno::RuntimeException(OUString( + "WrappedTargetException caught"), static_cast<cppu::OWeakObject *>(this)); } @@ -919,7 +919,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } @@ -953,7 +953,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + *pNames, static_cast<cppu::OWeakObject *>(this)); } @@ -996,7 +996,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } @@ -1004,7 +1004,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { throw uno::RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + OUString("Property is read-only: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } @@ -1066,7 +1066,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 831ef2940b13..4d66549a8670 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -428,7 +428,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXTextPortion::GetPropertyValues_Impl( GetPropertyValue( pValues[nProp], *pEntry, pUnoCrsr, pSet ); } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); } delete pSet; } @@ -463,9 +463,9 @@ void SAL_CALL SwXTextPortion::SetPropertyValues_Impl( { const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(pPropertyNames[nProp]); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ( OUString( "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 ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property exception caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "WrappedTargetException caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "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 e606b1c00717..52e34cd9afd0 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1586,7 +1586,7 @@ getPrefixAndSuffix( throw; } catch (const uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPrefixAndSuffix: exception")), + ::rtl::OUString("getPrefixAndSuffix: exception"), 0, uno::makeAny(e)); } } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 1467955cd0cb..88e2b3f2e896 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -140,8 +140,8 @@ public: SwSectionFmt & GetSectionFmtOrThrow() const { SwSectionFmt *const pFmt( GetSectionFmt() ); if (!pFmt) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "SwXTextSection: disposed or invalid")), 0); + throw uno::RuntimeException(OUString( + "SwXTextSection: disposed or invalid"), 0); } return *pFmt; } @@ -585,14 +585,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pPropertyNames[nProperty], static_cast<cppu::OWeakObject *>(& m_rThis)); } if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { throw beans::PropertyVetoException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + OUString("Property is read-only: ") + pPropertyNames[nProperty], static_cast<cppu::OWeakObject *>(& m_rThis)); } @@ -988,7 +988,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pPropertyNames[nProperty], static_cast<cppu::OWeakObject *>(& m_rThis)); } @@ -1291,14 +1291,12 @@ throw (uno::RuntimeException) } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( - RTL_CONSTASCII_USTRINGPARAM("Unknown property exception caught")), + throw uno::RuntimeException(OUString("Unknown property exception caught"), static_cast<cppu::OWeakObject *>(this)); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( - RTL_CONSTASCII_USTRINGPARAM("WrappedTargetException caught")), + throw uno::RuntimeException(OUString("WrappedTargetException caught"), static_cast<cppu::OWeakObject *>(this)); } @@ -1415,7 +1413,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + pNames[i], static_cast< cppu::OWeakObject* >(this)); } switch (pEntry->nWID) @@ -1491,13 +1489,13 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast< cppu::OWeakObject* >(this)); } if (pEntry->nFlags & beans::PropertyAttribute::READONLY) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "setPropertyToDefault: property is read-only: ")) + throw uno::RuntimeException(OUString( + "setPropertyToDefault: property is read-only: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } @@ -1634,7 +1632,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if (!pEntry) { throw beans::UnknownPropertyException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + OUString("Unknown property: ") + rPropertyName, static_cast<cppu::OWeakObject *>(this)); } diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 061fd05814df..48771155d6f5 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 ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwFtnInfo aFtnInfo(pDoc->GetFtnInfo()); switch(pEntry->nWID) { @@ -437,7 +437,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons pDoc->SetFtnInfo(aFtnInfo); } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else throw uno::RuntimeException(); @@ -557,7 +557,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName) } } else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else throw uno::RuntimeException(); @@ -642,7 +642,7 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwEndNoteInfo aEndInfo(pDoc->GetEndNoteInfo()); switch(pEntry->nWID) { @@ -705,7 +705,7 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const pDoc->SetEndNoteInfo(aEndInfo); } else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } } @@ -792,7 +792,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName) } } else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } return aRet; } @@ -874,7 +874,7 @@ void SwXLineNumberingProperties::setPropertyValue( if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwLineNumberInfo aInfo(pDoc->GetLineNumberInfo()); switch(pEntry->nWID) { @@ -976,7 +976,7 @@ void SwXLineNumberingProperties::setPropertyValue( pDoc->SetLineNumberInfo(aInfo); } else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else throw uno::RuntimeException(); @@ -1079,7 +1079,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName) } } else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else throw uno::RuntimeException(); @@ -2510,9 +2510,9 @@ void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& { const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pEntry) - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch(pEntry->nWID) { @@ -2585,7 +2585,7 @@ Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName ) { const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pEntry) - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); Any aRet; switch(pEntry->nWID) diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 0c929cb60f35..a57b4d5075af 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 ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); sal_Bool bVal = sal_False; if(aValue.getValueType() == ::getBooleanCppuType()) bVal = *(sal_Bool*)aValue.getValue(); @@ -570,7 +570,7 @@ void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::A }; } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } uno::Any SwXTextSearch::getPropertyValue(const OUString& rPropertyName) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) @@ -606,7 +606,7 @@ SET_UINT16: }; } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); return aRet; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 6bb99d715d93..77303cb6251d 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -996,7 +996,7 @@ uno::Any SAL_CALL SwXStyleFamily::getPropertyValue( const ::rtl::OUString& sProp } else { - throw beans::UnknownPropertyException( OUString( RTL_CONSTASCII_USTRINGPARAM("unknown property: ") ) + sPropertyName, static_cast<OWeakObject *>(this) ); + throw beans::UnknownPropertyException( OUString("unknown property: ") + sPropertyName, static_cast<OWeakObject *>(this) ); } return aRet; @@ -1262,7 +1262,7 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) : case SFX_STYLE_FAMILY_CHAR: { nMapId = PROPERTY_MAP_CHAR_STYLE; - aAny = xFamilies->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "CharacterStyles" ) ) ); + aAny = xFamilies->getByName ( OUString( "CharacterStyles" ) ); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; } @@ -1270,20 +1270,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 ( RTL_CONSTASCII_USTRINGPARAM ( "ParagraphStyles" ) ) ); + aAny = xFamilies->getByName ( OUString( "ParagraphStyles" ) ); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; - aAny = mxStyleFamily->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Standard" ) ) ); + aAny = mxStyleFamily->getByName ( OUString( "Standard" ) ); aAny >>= mxStyleData; } break; case SFX_STYLE_FAMILY_PAGE: { nMapId = PROPERTY_MAP_PAGE_STYLE; - aAny = xFamilies->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "PageStyles" ) ) ); + aAny = xFamilies->getByName ( OUString( "PageStyles" ) ); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; - aAny = mxStyleFamily->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Standard" ) ) ); + aAny = mxStyleFamily->getByName ( OUString( "Standard" ) ); aAny >>= mxStyleData; } break; @@ -2110,9 +2110,9 @@ void SAL_CALL SwXStyle::SetPropertyValues_Impl( if(!pEntry || (!bIsConditional && pNames[nProp].equalsAsciiL(SW_PROP_NAME(UNO_NAME_PARA_STYLE_CONDITIONS)))) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(aBaseImpl.mxNewBase.is()) { lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, @@ -2198,7 +2198,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, sal_Int8 nBin = 0; aRet >>= nBin; if ( nBin == -1 ) - aRet <<= OUString ( RTL_CONSTASCII_USTRINGPARAM ( "[From printer settings]" ) ); + aRet <<= OUString( "[From printer settings]" ); else { SfxPrinter *pPrinter = pDoc->getPrinter( false ); @@ -2378,7 +2378,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl( const SfxItemPropertySimpleEntry* pEntry = rMap.getByName( pNames[nProp]); if(!pEntry || (!bIsConditional && pNames[nProp].equalsAsciiL(SW_PROP_NAME(UNO_NAME_PARA_STYLE_CONDITIONS)))) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(pBasePool) { if(!pBase) @@ -2431,7 +2431,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl( if (bExcept ) { uno::RuntimeException aExcept; - aExcept.Message = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "No default value for: " ) ) + pNames[nProp]; + aExcept.Message = OUString( "No default value for: " ) + pNames[nProp]; throw aExcept; } } @@ -2457,11 +2457,11 @@ uno::Sequence< uno::Any > SwXStyle::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property exception caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "WrappedTargetException caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; @@ -2585,7 +2585,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates( const String& rPropName = pNames[i]; const SfxItemPropertySimpleEntry* pEntry = rMap.getByName( rPropName); if(!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropName, static_cast < cppu::OWeakObject * > ( this ) ); if( FN_UNO_NUM_RULES == pEntry->nWID || FN_UNO_FOLLOW_STYLE == pEntry->nWID ) { @@ -2706,11 +2706,11 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >& { const SfxItemPropertySimpleEntry* pEntry = rMap.getByName( pNames[nProp] ); if( !pEntry ) - throw beans::UnknownPropertyException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is unknown: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + 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 ( RTL_CONSTASCII_USTRINGPARAM ( "Cannot reset: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException ( OUString( "Cannot reset: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY ) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertiesToDefault: property is read-only: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "setPropertiesToDefault: property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if( pEntry->nWID == RES_PARATR_OUTLINELEVEL ) static_cast<SwTxtFmtColl*>(pTargetFmt)->DeleteAssignmentToListLevelOfOutlineStyle(); @@ -2869,7 +2869,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::getPropertyDefaults( const uno::Seq { const SfxItemPropertySimpleEntry* pEntry = rMap.getByName( pNames[i] ); if ( !pEntry ) - throw beans::UnknownPropertyException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException ( OUString( "Unknown property: " ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); if (pEntry->nWID >= RES_UNKNOWNATR_END) { @@ -3022,9 +3022,9 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( { const SfxItemPropertySimpleEntry* pEntry = rMap.getByName( pNames[nProp] ); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(GetBasePool()) { @@ -3258,7 +3258,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( { const SfxItemPropertySimpleEntry* pEntry = rMap.getByName( pNames[nProp] ); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(GetBasePool()) { @@ -3467,11 +3467,11 @@ uno::Sequence< uno::Any > SwXPageStyle::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property exception caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "WrappedTargetException caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; @@ -3967,7 +3967,7 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl( const String& rPropName = pNames[i]; const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rPropName); if(!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropName, static_cast < cppu::OWeakObject * > ( this ) ); else if ( RES_TXTATR_AUTOFMT == pEntry->nWID || RES_AUTO_STYLE == pEntry->nWID ) { OUString sName(StylePool::nameOf( pSet )); @@ -3993,11 +3993,11 @@ uno::Sequence< uno::Any > SwXAutoStyle::getPropertyValues ( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property exception caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "WrappedTargetException caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; @@ -4080,7 +4080,7 @@ uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates( const String& rPropName = pNames[i]; const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(rPropName); if(!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropName, static_cast < cppu::OWeakObject * > ( this ) ); pStates[i] = pPropSet->getPropertyState(*pEntry, rSet ); } return aRet; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index b0e8b042b171..02eaaaaefd50 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1349,9 +1349,9 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, m_pPropSet->getPropertyMap().getByName(rPropertyName); SwDoc* pDoc = pFmt->GetDoc(); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch(pEntry->nWID) { @@ -1408,7 +1408,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw( const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + 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( RTL_CONSTASCII_USTRINGPARAM( "Illegal first argument: needs to be > 0" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "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 ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); pTblCrsr->MakeBoxSels(); SwDoc* pDoc = pUnoCrsr->GetDoc(); switch(pEntry->nWID ) @@ -1813,7 +1813,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, } } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } } @@ -1872,7 +1872,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName) } } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } return aRet; } @@ -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 ( RTL_CONSTASCII_USTRINGPARAM ( "SwXTextTable: already attached to range." ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "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 ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(0xFF == pEntry->nMemberId) { @@ -3279,7 +3279,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be if(pFmt) { if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + 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 ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pTblCrsr->GetDoc(); { @@ -3959,7 +3959,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, } } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } } @@ -4040,7 +4040,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be } } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } return aRet; } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 0aafea97bd45..8d3b8c93b76a 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2527,7 +2527,7 @@ throw (uno::RuntimeException) if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { if ( !aPam.GetNode()->GetTxtNode() ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid text range") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Invalid text range"), uno::Reference< uno::XInterface >() ); SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); @@ -2626,8 +2626,8 @@ public: SwFrmFmt & GetHeadFootFmtOrThrow() { SwFrmFmt *const pFmt( GetHeadFootFmt() ); if (!pFmt) { - throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "SwXHeadFootText: disposed or invalid")), 0); + throw uno::RuntimeException(OUString( + "SwXHeadFootText: disposed or invalid"), 0); } return *pFmt; } diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 8c062b656c65..0db34bb5748f 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -285,7 +285,7 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for paper tray bDefaultVal = rDefaultPrintData.IsPaperFromSetup(); vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt; - aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) ); + aPaperTrayOpt.maGroupHint = rtl::OUString( "OptionsPageOptGroup" ); m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("printpaperfromsetup", aLocalizedStrings.GetString( 11 ), ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox", "PrintPaperFromSetup", @@ -294,7 +294,7 @@ SwPrintUIOptions::SwPrintUIOptions( // print range selection vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; - aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); + aPrintRangeOpt.maGroupHint = rtl::OUString( "PrintRange" ); aPrintRangeOpt.mbInternalOnly = sal_True; m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", rtl::OUString(aLocalizedStrings.GetString(26)), rtl::OUString(), @@ -308,15 +308,15 @@ SwPrintUIOptions::SwPrintUIOptions( uno::Sequence< rtl::OUString > aWidgetIds( 3 ); aChoices[0] = aLocalizedStrings.GetString( 27 ); aChoicesDisabled[0] = sal_False; - aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) ); + aHelpIds[0] = rtl::OUString( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ); aWidgetIds[0] = "printallpages"; aChoices[1] = aLocalizedStrings.GetString( 28 ); aChoicesDisabled[1] = sal_False; - aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) ); + aHelpIds[1] = rtl::OUString( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ); aWidgetIds[1] = "printpages"; aChoices[2] = aLocalizedStrings.GetString( 29 ); aChoicesDisabled[2] = sal_Bool(! bHasSelection); - aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) ); + aHelpIds[2] = rtl::OUString( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ); aWidgetIds[2] = "printselection"; m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(), aHelpIds, aPrintRangeName, @@ -331,7 +331,7 @@ SwPrintUIOptions::SwPrintUIOptions( aPageRangeOpt); // print content selection vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; - aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) ); + aContentsOpt.maGroupHint = rtl::OUString( "JobPage" ); m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("extrawriterprintoptions", rtl::OUString(aLocalizedStrings.GetString(12)), rtl::OUString(), aContentsOpt); // create a list box for notes content @@ -342,14 +342,14 @@ SwPrintUIOptions::SwPrintUIOptions( aChoices[2] = aLocalizedStrings.GetString( 15 ); aChoices[3] = aLocalizedStrings.GetString( 16 ); aHelpIds.realloc( 2 ); - aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText" ) ); - aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox" ) ); - vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False ); + aHelpIds[0] = rtl::OUString( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText" ); + aHelpIds[1] = rtl::OUString( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox" ); + vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( "PrintProspect" ), 0, sal_False ); aAnnotOpt.mbEnabled = bHasPostIts; m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments", aLocalizedStrings.GetString( 17 ), aHelpIds, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), + rtl::OUString( "PrintAnnotationMode" ), aChoices, nPrintPostIts, uno::Sequence< sal_Bool >(), @@ -357,7 +357,7 @@ SwPrintUIOptions::SwPrintUIOptions( // create subsection for Page settings vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt; - aPageSetOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); + aPageSetOpt.maGroupHint = rtl::OUString( "LayoutPage" ); if (!bWeb) { @@ -368,7 +368,7 @@ SwPrintUIOptions::SwPrintUIOptions( aRLChoices[1] = aLocalizedStrings.GetString( 20 ); aRLChoices[2] = aLocalizedStrings.GetString( 21 ); uno::Sequence< rtl::OUString > aRLHelp( 1 ); - aRLHelp[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintLeftRightPages:ListBox" ) ); + aRLHelp[0] = rtl::OUString( ".HelpID:vcl:PrintDialog:PrintLeftRightPages:ListBox" ); // create a choice option for all/left/right pages // 0 : all pages (left & right) // 1 : left pages @@ -405,8 +405,8 @@ SwPrintUIOptions::SwPrintUIOptions( aBRTLChoices[1] = aLocalizedStrings.GetString( 25 ); vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True ); uno::Sequence< rtl::OUString > aBRTLHelpIds( 1 ); - aBRTLHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" ) ); - aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); + aBRTLHelpIds[0] = rtl::OUString( ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" ); + aBrochureRTLOpt.maGroupHint = rtl::OUString( "LayoutPage" ); // RTL brochure choices // 0 : left-to-right // 1 : right-to-left @@ -414,7 +414,7 @@ SwPrintUIOptions::SwPrintUIOptions( m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("scriptdirection", rtl::OUString(), aBRTLHelpIds, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ), + rtl::OUString( "PrintProspectRTL" ), aBRTLChoices, nBRTLChoice, uno::Sequence< sal_Bool >(), @@ -501,7 +501,7 @@ bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< bea bool bChanged = processProperties( i_rNewProp ); uno::Reference< awt::XDevice > xRenderDevice; - uno::Any aVal( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) ); + uno::Any aVal( getValue( rtl::OUString( "RenderDevice" ) ) ); aVal >>= xRenderDevice; OutputDevice* pOut = 0; diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 7a477c7bd709..3058f06f45b9 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -135,7 +135,7 @@ sal_Bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < co try { sal_uLong nStgFmtId = SotStorage::GetFormatID( rStg ); - bRet = rStg->isStreamElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")) ); + bRet = rStg->isStreamElement( ::rtl::OUString("content.xml") ); if ( bRet ) bRet = ( nStgFmtId && ( rFilter.GetFormat() == nStgFmtId ) ); } diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 4c4e8cccf50c..2a8ae2e5c77c 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -137,14 +137,14 @@ void SwApplet_Impl::CreateApplet( const ::rtl::OUString& rCode, const ::rtl::OUS uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")), uno::makeAny( rCode ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")), uno::makeAny( rName ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")), uno::makeAny( sal_Bool(bMayScript) ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletDocBase")), uno::makeAny( sDocBase ) ); + xSet->setPropertyValue( ::rtl::OUString("AppletCode"), uno::makeAny( rCode ) ); + xSet->setPropertyValue( ::rtl::OUString("AppletName"), uno::makeAny( rName ) ); + xSet->setPropertyValue( ::rtl::OUString("AppletIsScript"), uno::makeAny( sal_Bool(bMayScript) ) ); + xSet->setPropertyValue( ::rtl::OUString("AppletDocBase"), uno::makeAny( sDocBase ) ); if ( !rCodeBase.isEmpty() ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")), uno::makeAny( rCodeBase ) ); + xSet->setPropertyValue( ::rtl::OUString("AppletCodeBase"), uno::makeAny( rCodeBase ) ); else - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")), uno::makeAny( sDocBase ) ); + xSet->setPropertyValue( ::rtl::OUString("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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aProps ) ); + xSet->setPropertyValue( ::rtl::OUString("AppletCommands"), uno::makeAny( aProps ) ); } } diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index a167fc8c670d..e68f00782f81 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -114,7 +114,7 @@ void SwHTMLParser::EndScript() if( aBasicLib.Len() ) aLibName = aBasicLib; else - aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")); + aLibName = ::rtl::OUString("Standard"); // get module library container Reference< script::XLibraryContainer > xModLibContainer( pDocSh->GetBasicContainer(), UNO_QUERY ); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 2973f6144cf4..42e925a754e6 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -476,7 +476,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, uno::Reference< beans::XPropertySet > xFormPropSet( rFormComps, uno::UNO_QUERY ); uno::Any aTmp = xFormPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ); + OUString("Name") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -488,7 +488,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } aTmp = xFormPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")) ); + OUString("TargetURL") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -501,7 +501,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } aTmp = xFormPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitMethod")) ); + OUString("SubmitMethod") ); if( aTmp.getValueType() == ::getCppuType((const form::FormSubmitMethod*)0) ) { form::FormSubmitMethod eMethod = @@ -514,7 +514,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } } aTmp = xFormPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitEncoding")) ); + OUString("SubmitEncoding") ); if( aTmp.getValueType()==::getCppuType((const form::FormSubmitEncoding*)0) ) { form::FormSubmitEncoding eEncType = @@ -540,7 +540,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } aTmp = xFormPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("TargetFrame")) ); + OUString("TargetFrame") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&& !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -596,7 +596,7 @@ void SwHTMLWriter::OutHiddenControls( *(uno::Reference< form::XFormComponent > *)aTmp.getValue(); uno::Reference< beans::XPropertySet > xPropSet( xFC, uno::UNO_QUERY ); - OUString sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId")); + OUString sPropName = OUString("ClassId"); if( !xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) ) continue; @@ -615,7 +615,7 @@ void SwHTMLWriter::OutHiddenControls( .append(OOO_STRING_SVTOOLS_HTML_IT_hidden); aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ); + OUString("Name") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -627,7 +627,7 @@ void SwHTMLWriter::OutHiddenControls( sOut.append('\"'); } aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenValue")) ); + OUString("HiddenValue") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -753,7 +753,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, rtl::OStringBuffer sOptions; sal_Bool bEmptyValue = sal_False; uno::Any aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId")) ); + OUString("ClassId") ); sal_Int16 nClassId = *(sal_Int16*) aTmp.getValue(); sal_uInt32 nFrmOpts = HTML_FRMOPTS_CONTROL; switch( nClassId ) @@ -763,7 +763,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, eType = (form::FormComponentType::CHECKBOX == nClassId ? TYPE_CHECKBOX : TYPE_RADIO); aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")) ); + OUString("DefaultState") ); if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) && STATE_NOCHECK != *(sal_Int16*) aTmp.getValue() ) { @@ -771,7 +771,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("RefValue")) ); + OUString("RefValue") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) ) { @@ -787,7 +787,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, { form::FormButtonType eButtonType = form::FormButtonType_PUSH; aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonType")) ); + OUString("ButtonType") ); if( aTmp.getValueType() == ::getCppuType((const form::FormButtonType*)0) ) eButtonType = *( form::FormButtonType*)aTmp.getValue(); @@ -806,7 +806,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ); + OUString("Label") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -820,7 +820,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, rHTMLWrt.OutNewLine( sal_True ); eTag = TAG_SELECT; aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("Dropdown")) ); + OUString("Dropdown") ); if( aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue() ) { @@ -835,7 +835,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("MultiSelection")) ); + OUString("MultiSelection") ); if( aTmp.getValueType() == ::getBooleanCppuType() && *(sal_Bool*)aTmp.getValue() ) { @@ -878,14 +878,14 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("HScroll")) ); + OUString("HScroll") ); if( aTmp.getValueType() == ::getVoidCppuType() || (aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue()) ) { const sal_Char *pWrapStr = 0; aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("HardLineBreaks")) ); + OUString("HardLineBreaks") ); pWrapStr = (aTmp.getValueType() == ::getBooleanCppuType() && *(sal_Bool*)aTmp.getValue()) ? OOO_STRING_SVTOOLS_HTML_WW_hard @@ -913,7 +913,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")) ); + OUString("MaxTextLen") ); if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) && *(sal_Int16*) aTmp.getValue() != 0 ) { @@ -975,7 +975,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, append('=').append(TypeNames[eType]); } - aTmp = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ); + aTmp = xPropSet->getPropertyValue( OUString("Name") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -987,7 +987,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, sOut.append('\"'); } - aTmp = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")) ); + aTmp = xPropSet->getPropertyValue( OUString("Enabled") ); if( aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue() ) { @@ -1008,7 +1008,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( TYPE_IMAGE == eType ) { aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("ImageURL")) ); + OUString("ImageURL") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -1050,7 +1050,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")) ); + OUString("TabIndex") ); if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) ) { sal_Int16 nTabIndex = *(sal_Int16*) aTmp.getValue(); @@ -1097,7 +1097,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxBrushItem( aCol, RES_CHRATR_BACKGROUND ) ); } } - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("TextColor")); + sPropName = OUString("TextColor"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1107,7 +1107,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxColorItem( aColor, RES_CHRATR_COLOR ) ); } } - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight")); + sPropName = OUString("FontHeight"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1119,7 +1119,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxFontHeightItem( sal_Int16(nHeight * 20.), 100, RES_CHRATR_FONTSIZE ) ); } } - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontName")); + sPropName = OUString("FontName"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1133,7 +1133,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( !bEdit || aFName != aFixedFont.GetName() ) { FontFamily eFamily = FAMILY_DONTKNOW; - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily")); + sPropName = OUString("FontFamily"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1145,7 +1145,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } } } - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontWeight")); + sPropName = OUString("FontWeight"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1157,7 +1157,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxWeightItem( eWeight, RES_CHRATR_WEIGHT ) ); } } - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontSlant")); + sPropName = OUString("FontSlant"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1168,7 +1168,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxPostureItem( eItalic, RES_CHRATR_POSTURE ) ); } } - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontUnderline")); + sPropName = OUString("FontUnderline"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1181,7 +1181,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxUnderlineItem( eUnderline, RES_CHRATR_UNDERLINE ) ); } } - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStrikeout")); + sPropName = OUString("FontStrikeout"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1208,7 +1208,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( TAG_SELECT == eTag ) { aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("StringItemList")) ); + OUString("StringItemList") ); if( aTmp.getValueType() == ::getCppuType((uno::Sequence<OUString>*)0) ) { rHTMLWrt.IncIndentLevel(); // der Inhalt von Select darf @@ -1220,7 +1220,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, const OUString *pValues = 0; sal_Int32 nValCnt = 0; aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("ListSource")) ); + OUString("ListSource") ); uno::Sequence<OUString> aValList; if( aTmp.getValueType() == ::getCppuType((uno::Sequence<OUString>*)0) ) { @@ -1230,7 +1230,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } uno::Any aSelTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSelection")) ); + OUString("DefaultSelection") ); const sal_Int16 *pSels = 0; sal_Int32 nSel = 0; sal_Int32 nSelCnt = 0; @@ -1292,7 +1292,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, // werden! String sVal; aTmp = xPropSet->getPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")) ); + OUString("DefaultText") ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&& !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -1315,7 +1315,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } else if( TYPE_CHECKBOX == eType || TYPE_RADIO == eType ) { - aTmp = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Label"))); + aTmp = xPropSet->getPropertyValue(OUString("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 91a48450dc46..319a12c1b41f 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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), + xSet->setPropertyValue( ::rtl::OUString("PluginURL"), uno::makeAny( ::rtl::OUString( aURL ) ) ); if( bHasType ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")), + xSet->setPropertyValue( ::rtl::OUString("PluginMimeType"), uno::makeAny( ::rtl::OUString( aType ) ) ); uno::Sequence < beans::PropertyValue > aProps; aCmdLst.FillSequence( aProps ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aProps ) ); + xSet->setPropertyValue( ::rtl::OUString("PluginCommands"), uno::makeAny( aProps ) ); } } @@ -887,23 +887,23 @@ void SwHTMLParser::InsertFloatingFrame() sal_Bool bHasBorder = aFrameDesc.HasFrameBorder(); Size aMargin = aFrameDesc.GetMargin(); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), uno::makeAny( ::rtl::OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), uno::makeAny( aName ) ); + xSet->setPropertyValue( ::rtl::OUString("FrameURL"), uno::makeAny( ::rtl::OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); + xSet->setPropertyValue( ::rtl::OUString("FrameName"), uno::makeAny( aName ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsAutoScroll"), uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsScrollingMode"), uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsBorder"), uno::makeAny( bHasBorder ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")), + xSet->setPropertyValue( ::rtl::OUString("FrameMarginWidth"), uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")), + xSet->setPropertyValue( ::rtl::OUString("FrameMarginHeight"), uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } @@ -1023,7 +1023,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, ::rtl::OUString aStr; String aURL; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("PluginURL") ); if( (aAny >>= aStr) && !aStr.isEmpty() ) { aURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(), @@ -1040,7 +1040,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, } ::rtl::OUString aType; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("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 ::rtl::OUString aCd; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("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 ::rtl::OUString aClass; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("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 ::rtl::OUString aAppletName; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("PluginCommands") ); aAny >>= aProps; SvCommandList aCommands; diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 83b4acabd85b..d5d46ac144f6 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -361,7 +361,7 @@ sal_Int32 ReadThroughComponent( uno::Reference <beans::XPropertySet > xProps( xStream, uno::UNO_QUERY ); Any aAny = xProps->getPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) ); + OUString("Encrypted") ); bool bEncrypted = aAny.getValueType() == ::getBooleanCppuType() && *(sal_Bool *)aAny.getValue(); @@ -699,7 +699,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con Reference< container::XNameAccess > xLateInitSettings( document::NamedPropertyValues::create(xContext), UNO_QUERY_THROW ); beans::NamedValue aLateInitSettings( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LateInitSettings" ) ), + ::rtl::OUString( "LateInitSettings" ), makeAny( xLateInitSettings ) ); @@ -732,19 +732,19 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con OUString *pSeq = aFamiliesSeq.getArray(); if( aOpt.IsFrmFmts() ) // SFX_STYLE_FAMILY_FRAME; - *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("FrameStyles")); + *pSeq++ = OUString("FrameStyles"); if( aOpt.IsPageDescs() ) // SFX_STYLE_FAMILY_PAGE; - *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("PageStyles")); + *pSeq++ = OUString("PageStyles"); if( aOpt.IsTxtFmts() ) { // (SFX_STYLE_FAMILY_CHAR|SFX_STYLE_FAMILY_PARA); - *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterStyles")); - *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles")); + *pSeq++ = OUString("CharacterStyles"); + *pSeq++ = OUString("ParagraphStyles"); } if( aOpt.IsNumRules() ) // SFX_STYLE_FAMILY_PSEUDO; - *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles")); + *pSeq++ = OUString("NumberingStyles"); OUString sStyleInsertModeFamilies( RTL_CONSTASCII_USTRINGPARAM("StyleInsertModeFamilies")); @@ -815,12 +815,12 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con } else { - StreamPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dummyObjectName")); + StreamPath = ::rtl::OUString("dummyObjectName"); } if( !StreamPath.isEmpty() ) { - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")); + sPropName = OUString("StreamRelPath"); xInfoSet->setPropertyValue( sPropName, makeAny( StreamPath ) ); } } @@ -852,13 +852,13 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con { const sal_Bool bShapePositionInHoriL2R = !bOASIS; xInfoSet->setPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("ShapePositionInHoriL2R")), + OUString("ShapePositionInHoriL2R"), makeAny( bShapePositionInHoriL2R ) ); } { const sal_Bool bTextDocInOOoFileFormat = !bOASIS; xInfoSet->setPropertyValue( - OUString(RTL_CONSTASCII_USTRINGPARAM("TextDocInOOoFileFormat")), + OUString("TextDocInOOoFileFormat"), makeAny( bTextDocInOOoFileFormat ) ); } diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 6f8b0cd3679f..adb314ea82ed 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -221,9 +221,9 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, if ( !aDocHierarchicalName.isEmpty() ) aName = aDocHierarchicalName; else - aName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "dummyObjectName" ) ); + aName = ::rtl::OUString( "dummyObjectName" ); - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")); + sPropName = OUString("StreamRelPath"); xInfoSet->setPropertyValue( sPropName, makeAny( aName ) ); } @@ -292,7 +292,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, if( pOrigFileName ) { PropertyValue *pProps = aProps.getArray(); - pProps->Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FileName") ); + pProps->Name = OUString("FileName"); (pProps++)->Value <<= OUString( *pOrigFileName ); } diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 1d508071057c..3cb4fb7e0a80 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -362,7 +362,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) sal_Int32 nIndex = 0; Reference < XIndexContainer > xBox = IndexedPropertyValues::create( comphelper::getProcessComponentContext() ); - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "Views") ); + pValue[nIndex].Name = OUString( "Views"); pValue[nIndex++].Value <<= Reference < XIndexAccess > ( xBox, UNO_QUERY ); SwDoc *pDoc = getDoc(); @@ -372,16 +372,16 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) OSL_ENSURE( bTwip, "Map unit for visible area is not in TWIPS!" ); - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaTop") ); + pValue[nIndex].Name = OUString( "ViewAreaTop"); pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.Top() ) : rRect.Top(); - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaLeft") ); + pValue[nIndex].Name = OUString( "ViewAreaLeft"); pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.Left() ) : rRect.Left(); - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaWidth") ); + pValue[nIndex].Name = OUString( "ViewAreaWidth"); pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.GetWidth() ) : rRect.GetWidth(); - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaHeight") ); + pValue[nIndex].Name = OUString( "ViewAreaHeight"); pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.GetHeight() ) : rRect.GetHeight(); // "show redline mode" cannot simply be read from the document @@ -399,11 +399,11 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) } } - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ShowRedlineChanges") ); + pValue[nIndex].Name = OUString( "ShowRedlineChanges"); pValue[nIndex++].Value.setValue( &bShowRedlineChanges, ::getBooleanCppuType() ); sal_Bool bInBrowse = pDoc->get(IDocumentSettingAccess::BROWSE_MODE); - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "InBrowseMode") ); + pValue[nIndex].Name = OUString( "InBrowseMode"); pValue[nIndex++].Value.setValue( &bInBrowse, ::getBooleanCppuType() ); if ( nIndex < NUM_EXPORTED_VIEW_SETTINGS ) @@ -416,7 +416,7 @@ void SwXMLExport::GetConfigurationSettings( Sequence < PropertyValue >& rProps) Reference< XMultiServiceFactory > xFac( GetModel(), UNO_QUERY ); if( xFac.is() ) { - Reference< XPropertySet > xProps( xFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.Settings" ) ) ), UNO_QUERY ); + Reference< XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY ); if( xProps.is() ) SvXMLUnitConverter::convertPropertySet( rProps, xProps ); } @@ -521,8 +521,8 @@ void SwXMLExport::_ExportContent() // OOo OUString SAL_CALL SwXMLExportOOO_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportOOO_getSupportedServiceNames() @@ -542,8 +542,8 @@ Reference< XInterface > SAL_CALL SwXMLExportOOO_createInstance( OUString SAL_CALL SwXMLExportStylesOOO_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLStylesExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLStylesExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportStylesOOO_getSupportedServiceNames() @@ -565,8 +565,8 @@ Reference< XInterface > SAL_CALL SwXMLExportStylesOOO_createInstance( OUString SAL_CALL SwXMLExportContentOOO_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLContentExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLContentExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportContentOOO_getSupportedServiceNames() @@ -588,8 +588,8 @@ Reference< XInterface > SAL_CALL SwXMLExportContentOOO_createInstance( OUString SAL_CALL SwXMLExportMetaOOO_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLMetaExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLMetaExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportMetaOOO_getSupportedServiceNames() @@ -609,8 +609,8 @@ Reference< XInterface > SAL_CALL SwXMLExportMetaOOO_createInstance( OUString SAL_CALL SwXMLExportSettingsOOO_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLSettingsExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLSettingsExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportSettingsOOO_getSupportedServiceNames() @@ -631,8 +631,8 @@ Reference< XInterface > SAL_CALL SwXMLExportSettingsOOO_createInstance( // OASIS OUString SAL_CALL SwXMLExport_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisExporter" ); } Sequence< OUString > SAL_CALL SwXMLExport_getSupportedServiceNames() @@ -652,8 +652,8 @@ Reference< XInterface > SAL_CALL SwXMLExport_createInstance( OUString SAL_CALL SwXMLExportStyles_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisStylesExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisStylesExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportStyles_getSupportedServiceNames() @@ -675,8 +675,8 @@ Reference< XInterface > SAL_CALL SwXMLExportStyles_createInstance( OUString SAL_CALL SwXMLExportContent_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisContentExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisContentExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportContent_getSupportedServiceNames() @@ -699,8 +699,8 @@ Reference< XInterface > SAL_CALL SwXMLExportContent_createInstance( OUString SAL_CALL SwXMLExportMeta_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisMetaExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisMetaExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportMeta_getSupportedServiceNames() @@ -720,8 +720,8 @@ Reference< XInterface > SAL_CALL SwXMLExportMeta_createInstance( OUString SAL_CALL SwXMLExportSettings_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisSettingsExporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisSettingsExporter" ); } Sequence< OUString > SAL_CALL SwXMLExportSettings_getSupportedServiceNames() @@ -781,8 +781,8 @@ OUString SAL_CALL SwXMLExport::getImplementationName() return SwXMLExportSettings_getImplementationName(); default: // generic name for 'unknown' cases - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.SwXMLExport" ) ); + return OUString( + "com.sun.star.comp.Writer.SwXMLExport" ); } } diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 205b04600c22..07d81cf9b336 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -919,7 +919,7 @@ OUString SwXMLStylesContext_Impl::GetServiceName( sal_uInt16 nFamily ) const { String sServiceName; if( XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily ) - sServiceName = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.FrameStyle") ); + sServiceName = OUString("com.sun.star.style.FrameStyle"); else sServiceName = SvXMLStylesContext::GetServiceName( nFamily ); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 558fbb70ab2f..3adac9ab2faa 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1094,7 +1094,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if( !xFac.is() ) return; - Reference< XPropertySet > xProps( xFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.Settings" ) ) ), UNO_QUERY ); + Reference< XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY ); if( !xProps.is() ) return; @@ -1294,26 +1294,26 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC sal_Int16 nTmp = document::PrinterIndependentLayout::DISABLED; aAny <<= nTmp; xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("PrinterIndependentLayout") ), + OUString("PrinterIndependentLayout"), aAny ); } if( ! bAddExternalLeading ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("AddExternalLeading")), makeAny( false ) ); + OUString("AddExternalLeading"), makeAny( false ) ); } if( ! bUseFormerLineSpacing ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("UseFormerLineSpacing")), makeAny( true ) ); + OUString("UseFormerLineSpacing"), makeAny( true ) ); } if( !bUseFormerObjectPositioning ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("UseFormerObjectPositioning")), makeAny( true ) ); + OUString("UseFormerObjectPositioning"), makeAny( true ) ); } if( !bUseOldNumbering ) @@ -1322,7 +1322,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC sal_Bool bOldNum = true; aAny.setValue(&bOldNum, ::getBooleanCppuType()); xProps->setPropertyValue - (OUString( RTL_CONSTASCII_USTRINGPARAM("UseOldNumbering")), + (OUString("UseOldNumbering"), aAny ); } @@ -1332,27 +1332,26 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC sal_Bool bTmp = true; aAny.setValue(&bTmp, ::getBooleanCppuType()); xProps->setPropertyValue - (OUString( RTL_CONSTASCII_USTRINGPARAM - ("OutlineLevelYieldsNumbering")), + (OUString("OutlineLevelYieldsNumbering"), aAny ); } if( !bAddParaSpacingToTableCells ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("AddParaSpacingToTableCells")), makeAny( false ) ); + OUString("AddParaSpacingToTableCells"), makeAny( false ) ); } if( !bUseFormerTextWrapping ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("UseFormerTextWrapping")), makeAny( true ) ); + OUString("UseFormerTextWrapping"), makeAny( true ) ); } if( !bConsiderWrapOnObjPos ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("ConsiderTextWrapOnObjPos")), makeAny( false ) ); + OUString("ConsiderTextWrapOnObjPos"), makeAny( false ) ); } // #i47448# @@ -1369,53 +1368,53 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if( !bIgnoreFirstLineIndentInNumbering && bDocumentPriorSO8 ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("IgnoreFirstLineIndentInNumbering")), makeAny( true ) ); + OUString("IgnoreFirstLineIndentInNumbering"), makeAny( true ) ); } // This flag has to be set for all documents < SO8 if ( !bDoNotJustifyLinesWithManualBreak && bDocumentPriorSO8 ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("DoNotJustifyLinesWithManualBreak")), makeAny( true ) ); + OUString("DoNotJustifyLinesWithManualBreak"), makeAny( true ) ); } // This flag has to be set for all documents < SO8 if ( !bDoNotResetParaAttrsForNumFont && bDocumentPriorSO8 ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("DoNotResetParaAttrsForNumFont")), makeAny( true ) ); + OUString("DoNotResetParaAttrsForNumFont"), makeAny( true ) ); } if ( !bLoadReadonly ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("LoadReadonly") ), makeAny( false ) ); + OUString("LoadReadonly"), makeAny( false ) ); } // This flag has to be set for all documents < SO8 if ( !bDoNotCaptureDrawObjsOnPage && bDocumentPriorSO8 ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("DoNotCaptureDrawObjsOnPage") ), makeAny( true ) ); + OUString("DoNotCaptureDrawObjsOnPage"), makeAny( true ) ); } // This flag has to be set for all documents < SO8 if ( !bClipAsCharacterAnchoredWriterFlyFrames && bDocumentPriorSO8 ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("ClipAsCharacterAnchoredWriterFlyFrames") ), makeAny( true ) ); + OUString("ClipAsCharacterAnchoredWriterFlyFrames"), makeAny( true ) ); } if ( !bUnixForceZeroExtLeading ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("UnxForceZeroExtLeading") ), makeAny( true ) ); + OUString("UnxForceZeroExtLeading"), makeAny( true ) ); } if ( !bUseOldPrinterMetrics ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("UseOldPrinterMetrics") ), makeAny( true ) ); + OUString("UseOldPrinterMetrics"), makeAny( true ) ); } // Old LO versions had 66 as the value for small caps percentage, later changed to 80. @@ -1425,25 +1424,25 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if ( !bSmallCapsPercentage66 ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("SmallCapsPercentage66") ), makeAny( true ) ); + OUString("SmallCapsPercentage66"), makeAny( true ) ); } if ( !bTabOverflow ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("TabOverflow") ), makeAny( false ) ); + OUString("TabOverflow"), makeAny( false ) ); } if ( !bUnbreakableNumberings ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("UnbreakableNumberings") ), makeAny( false ) ); + OUString("UnbreakableNumberings"), makeAny( false ) ); } if ( !bClippedPictures ) { xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("ClippedPictures") ), makeAny( false ) ); + OUString("ClippedPictures"), makeAny( false ) ); } if ( !bBackgroundParaOverDrawings ) @@ -1545,8 +1544,8 @@ void SwXMLImport::initialize( OUString SAL_CALL SwXMLImport_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisImporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisImporter" ); } uno::Sequence< OUString > SAL_CALL SwXMLImport_getSupportedServiceNames() @@ -1566,8 +1565,8 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImport_createInstance( OUString SAL_CALL SwXMLImportStyles_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisStylesImporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisStylesImporter" ); } uno::Sequence< OUString > SAL_CALL SwXMLImportStyles_getSupportedServiceNames() @@ -1590,8 +1589,8 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportStyles_createInstance( OUString SAL_CALL SwXMLImportContent_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisContentImporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisContentImporter" ); } uno::Sequence< OUString > SAL_CALL SwXMLImportContent_getSupportedServiceNames() @@ -1614,8 +1613,8 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportContent_createInstance( OUString SAL_CALL SwXMLImportMeta_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisMetaImporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisMetaImporter" ); } uno::Sequence< OUString > SAL_CALL SwXMLImportMeta_getSupportedServiceNames() @@ -1635,8 +1634,8 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportMeta_createInstance( OUString SAL_CALL SwXMLImportSettings_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.XMLOasisSettingsImporter" ) ); + return OUString( + "com.sun.star.comp.Writer.XMLOasisSettingsImporter" ); } uno::Sequence< OUString > SAL_CALL SwXMLImportSettings_getSupportedServiceNames() @@ -1674,8 +1673,8 @@ OUString SAL_CALL SwXMLImport::getImplementationName() return SwXMLImportSettings_getImplementationName(); default: // generic name for 'unknown' cases - return OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Writer.SwXMLImport" ) ); + return OUString( + "com.sun.star.comp.Writer.SwXMLImport" ); } } diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 70df7066ef84..36b6efebffe7 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -301,35 +301,35 @@ static void lcl_addFrameProperties( return; ::rtl::OUString aURL; - Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")) ); + Any aAny = xSet->getPropertyValue( ::rtl::OUString("FrameURL") ); aAny >>= aURL; ::rtl::OUString aName; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName"))); + aAny = xSet->getPropertyValue( ::rtl::OUString("FrameName")); aAny >>= aName; sal_Bool bIsAutoScroll = sal_False, bIsScrollingMode; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll"))); + aAny = xSet->getPropertyValue( ::rtl::OUString("FrameIsAutoScroll")); aAny >>= bIsAutoScroll; if ( !bIsAutoScroll ) { - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("FrameIsScrollingMode") ); aAny >>= bIsScrollingMode; } sal_Bool bIsBorderSet, bIsAutoBorder = sal_False; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("FrameIsAutoBorder") ); aAny >>= bIsAutoBorder; if ( !bIsAutoBorder ) { - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("FrameIsBorder") ); aAny >>= bIsBorderSet; } sal_Int32 nWidth, nHeight; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("FrameMarginWidth") ); aAny >>= nWidth; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("FrameMarginHeight") ); aAny >>= nHeight; if( !bIsAutoScroll ) @@ -551,27 +551,27 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); ::rtl::OUString aStr; - Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) ); + Any aAny2 = xSet->getPropertyValue( ::rtl::OUString("AppletCodeBase") ); aAny2 >>= aStr; if (!aStr.isEmpty() ) lcl_addURL(rXMLExport, aStr); - aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString("AppletName") ); aAny2 >>= aStr; if (!aStr.isEmpty()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr ); - aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString("AppletCode") ); aAny2 >>= aStr; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr ); sal_Bool bScript = sal_False; - aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")) ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString("AppletIsScript") ); aAny2 >>= bScript; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bScript ? XML_TRUE : XML_FALSE ); uno::Sequence < beans::PropertyValue > aProps; - aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString("AppletCommands") ); aAny2 >>= aProps; sal_Int32 i = aProps.getLength(); @@ -598,11 +598,11 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); ::rtl::OUString aStr; - Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")) ); + Any aAny2 = xSet->getPropertyValue( ::rtl::OUString("PluginURL") ); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString("PluginMimeType") ); aAny2 >>= aStr; if (!aStr.isEmpty()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr ); @@ -617,12 +617,12 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); ::rtl::OUString aStr; - Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")) ); + Any aAny2 = xSet->getPropertyValue( ::rtl::OUString("FrameURL") ); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")) ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString("FrameName") ); aAny2 >>= aStr; if (!aStr.isEmpty()) @@ -656,7 +656,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( sURL += rOLEObj.GetCurrentPersistName(); if ( ( rXMLExport.getExportFlags() & EXPORT_OASIS ) == 0 ) - sURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "?oasis=false" ) ); + sURL += ::rtl::OUString( "?oasis=false" ); rXMLExport.AddEmbeddedObjectAsBase64( sURL ); } @@ -667,7 +667,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("AppletCommands") ); aAny >>= aProps; sal_Int32 i = aProps.getLength(); @@ -693,7 +693,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")) ); + aAny = xSet->getPropertyValue( ::rtl::OUString("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 7f59deb0a96a..e2f5b0d0e74c 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -572,7 +572,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( embed::OOoEmbeddedObjectFactory::create(::comphelper::getProcessComponentContext()); uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 ); - aMediaDescriptor[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); + aMediaDescriptor[0].Name = ::rtl::OUString("URL"); aMediaDescriptor[0].Value <<= ::rtl::OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); if ( pDoc && pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() ) { @@ -581,7 +581,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( if ( xInteraction.is() ) { aMediaDescriptor.realloc( 2 ); - aMediaDescriptor[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) ); + aMediaDescriptor[1].Name = ::rtl::OUString( "InteractionHandler" ); aMediaDescriptor[1].Value <<= xInteraction; } } @@ -718,10 +718,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( if ( xSet.is() ) { if( bValidURL ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), + xSet->setPropertyValue( ::rtl::OUString("PluginURL"), makeAny( ::rtl::OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); if( bValidMimeType ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")), + xSet->setPropertyValue( ::rtl::OUString("PluginMimeType"), makeAny( ::rtl::OUString( rMimeType ) ) ); } @@ -848,31 +848,31 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), + xSet->setPropertyValue( ::rtl::OUString("FrameURL"), makeAny( ::rtl::OUString( URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), + xSet->setPropertyValue( ::rtl::OUString("FrameName"), makeAny( ::rtl::OUString( rName ) ) ); if ( eScrollMode == ScrollingAuto ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsAutoScroll"), makeAny( sal_True ) ); else - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsScrollingMode"), makeAny( (sal_Bool) (eScrollMode == ScrollingYes) ) ); if ( bIsBorderSet ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsBorder"), makeAny( bHasBorder ) ); else - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsAutoBorder"), makeAny( sal_True ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")), + xSet->setPropertyValue( ::rtl::OUString("FrameMarginWidth"), makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")), + xSet->setPropertyValue( ::rtl::OUString("FrameMarginHeight"), makeAny( sal_Int32( aMargin.Height() ) ) ); } @@ -942,7 +942,7 @@ void SwXMLTextImportHelper::endAppletOrPlugin( } catch ( uno::Exception& ) { - aParaName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")); + aParaName = ::rtl::OUString("PluginCommands"); try { xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) ); diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index d16452fa5f77..d6dbd72af0ce 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -152,17 +152,17 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId ) using namespace ::com::sun::star::i18n::ScriptType; - Any aLang = aLinguCfg.GetProperty(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale"))); + Any aLang = aLinguCfg.GetProperty(rtl::OUString("DefaultLocale")); aLang >>= aLocale; nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag(aLocale).getLanguageType(false), LATIN); pRet->Put(SvxLanguageItem(nLang, SID_ATTR_LANGUAGE)); - aLang = aLinguCfg.GetProperty(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CJK"))); + aLang = aLinguCfg.GetProperty(rtl::OUString("DefaultLocale_CJK")); aLang >>= aLocale; nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag(aLocale).getLanguageType(false), ASIAN); pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CJK_LANGUAGE)); - aLang = aLinguCfg.GetProperty(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CTL"))); + aLang = aLinguCfg.GetProperty(rtl::OUString("DefaultLocale_CTL")); aLang >>= aLocale; nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag(aLocale).getLanguageType(false), COMPLEX); pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CTL_LANGUAGE)); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index b454fb304553..9ea1aa725171 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1003,7 +1003,7 @@ void SwDocShell::Execute(SfxRequest& rReq) aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead ); uno::Sequence< beans::PropertyValue > aArgs(1); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RtfOutline")); + aArgs[0].Name = ::rtl::OUString("RtfOutline"); aArgs[0].Value <<= aSeq; xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aArgs ); } @@ -1070,7 +1070,7 @@ void SwDocShell::Execute(SfxRequest& rReq) aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead ); uno::Sequence< beans::PropertyValue > aArgs(1); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RtfOutline")); + aArgs[0].Name = ::rtl::OUString("RtfOutline"); aArgs[0].Value <<= aSeq; xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aArgs ); } diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index a769e3a4d52f..d7ceaf4798e7 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; ::rtl::OUString aUIName; - xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName; + xInfo->getPropertyValue( ::rtl::OUString("DisplayName") ) >>= aUIName; if ( !aUIName.isEmpty() ) rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) ); } diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 074d23cab9f2..6919cf17fc0a 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -216,8 +216,8 @@ SwModule::GetScannerManager() m_xScannerManager = uno::Reference< scanner::XScannerManager2 >( xMgr->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.scanner.ScannerManager")) ), + rtl::OUString( + "com.sun.star.scanner.ScannerManager") ), uno::UNO_QUERY ); } } diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 66a48ff9108f..d5a1f59dbb81 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -576,7 +576,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) // get Productname and -version rtl::OUString sWithoutVersion( utl::ConfigManager::getProductName() ); rtl::OUString sComplete( - sWithoutVersion + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + + sWithoutVersion + rtl::OUString(" ") + utl::ConfigManager::getProductVersion() ); SvObjectServerList aObjS; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 4364a6d49277..d10e27773c90 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -840,7 +840,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, xMailDispatcher.set( new MailDispatcher(rMergeDescriptor.xSmtpServer)); if(!rMergeDescriptor.bSendAsAttachment && rMergeDescriptor.bSendAsHTML) { - sBodyMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/html; charset=")); + sBodyMimeType = ::rtl::OUString("text/html; charset="); sBodyMimeType += ::rtl::OUString::createFromAscii( rtl_getBestMimeCharsetFromTextEncoding( eEncoding )); SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get(); @@ -848,7 +848,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, } else sBodyMimeType = - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain; charset=UTF-8; format=flowed")); + ::rtl::OUString("text/plain; charset=UTF-8; format=flowed"); } uno::Reference< XPropertySet > xColumnProp; @@ -1290,7 +1290,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions ); const sal_Int32 nOpts = aOptions.getLength(); aOptions.realloc( nOpts + 1 ); - aOptions[ nOpts ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait")); + aOptions[ nOpts ].Name = rtl::OUString("Wait"); aOptions[ nOpts ].Value <<= sal_True ; // move print options const beans::PropertyValue* pPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray(); diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 31772621f6ad..71f243269228 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() ) { ::rtl::OUString sURL; - xTransferableProperties->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) >>= sURL; + xTransferableProperties->getPropertyValue( ::rtl::OUString("URL") ) >>= sURL; if(!sURL.isEmpty()) SWUnoHelper::UCB_DeleteFile( sURL ); } diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index ca209521ae49..297e550a5b4f 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -907,7 +907,7 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1); rtl::OUString sPages(rtl::OUString::valueOf( rStartInfo.nStartPageInTarget )); - sPages += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")); + sPages += rtl::OUString(" - "); sPages += rtl::OUString::valueOf( rEndInfo.nEndPageInTarget ); SwWrtShell& rSh = pTargetView->GetWrtShell(); @@ -928,9 +928,9 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) m_pWizard->enableButtons(WZB_CANCEL, sal_False); uno::Sequence < beans::PropertyValue > aProps( 2 ); - aProps[0]. Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MonitorVisible")); + aProps[0]. Name = rtl::OUString("MonitorVisible"); aProps[0].Value <<= sal_True; - aProps[1]. Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pages")); + aProps[1]. Name = rtl::OUString("Pages"); aProps[1]. Value <<= sPages; pTargetView->ExecPrint( aProps, false, true ); @@ -1053,7 +1053,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) case MM_DOCTYPE_PDF: { pSfxFlt = pFilterContainer->GetFilter4FilterName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("writer_pdf_Export")), + ::rtl::OUString("writer_pdf_Export"), SFX_FILTER_EXPORT); } break; @@ -1304,13 +1304,13 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) aDesc.sBodyContent = sBody; if(MM_DOCTYPE_HTML == nDocType) { - aDesc.sBodyMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/html; charset=")); + aDesc.sBodyMimeType = ::rtl::OUString("text/html; charset="); aDesc.sBodyMimeType += ::rtl::OUString::createFromAscii( rtl_getBestMimeCharsetFromTextEncoding( eEncoding )); } else aDesc.sBodyMimeType = - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain; charset=UTF-8; format=flowed")); + ::rtl::OUString("text/plain; charset=UTF-8; format=flowed"); aDesc.sSubject = m_aSubjectED.GetText(); aDesc.sCC = m_sCC; diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index 1a1993a7c4a9..a52850c9e132 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -45,7 +45,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ), SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) ) fp = ( SwAbstractDialogFactory* (SAL_CALL*)() ) - aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory"))); + aDialogLibrary.getFunctionSymbol( ::rtl::OUString("CreateDialogFactory")); if ( fp ) return fp(); return 0; diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 58698e8e2d12..80c300e09650 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -708,8 +708,8 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, xWrt->SetShowProgress( sal_False ); #if defined(DEBUGPASTE) - SvFileStream aPasteDebug(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PASTEBUFFER.debug")), STREAM_WRITE|STREAM_TRUNC); + SvFileStream aPasteDebug(rtl::OUString( + "PASTEBUFFER.debug"), STREAM_WRITE|STREAM_TRUNC); SwWriter aDbgWrt( aPasteDebug, *pDoc ); aDbgWrt.Write( xWrt ); #endif @@ -1735,13 +1735,12 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, { xTmpStor = ::comphelper::OStorageHelper::GetTemporaryStorage(); uno::Reference < embed::XEmbedObjectClipboardCreator > xClipboardCreator( - ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.MSOLEObjectSystemCreator")) ), + ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString("com.sun.star.embed.MSOLEObjectSystemCreator") ), uno::UNO_QUERY_THROW ); embed::InsertedObjectInfo aInfo = xClipboardCreator->createInstanceInitFromClipboard( xTmpStor, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "DummyName" ) ), + ::rtl::OUString( "DummyName" ), uno::Sequence< beans::PropertyValue >() ); // TODO/LATER: in future InsertedObjectInfo will be used to get container related information diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index 04a3f29b98cc..74180748345a 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -157,7 +157,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) aFont.SetWeight(WEIGHT_MEDIUM); SetFont( aFont ); DrawText( aRect , - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Edit Note")), + rtl::OUString("Edit Note"), TEXT_DRAW_CENTER ); SetFont( aOldFont ); } diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 2ed024dd224b..cf1872970ab6 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -263,8 +263,8 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) : notifier_ = n; } css::uno::Sequence< rtl::OUString > s(2); - s[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight")); - s[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FontName")); + s[0] = rtl::OUString("FontHeight"); + s[1] = rtl::OUString("FontName"); n->addPropertiesChangeListener(s, listener_.get()); } diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index d09a7451a563..810adf4599f7 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -60,7 +60,7 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) : SvtCommandOptions aCmdOpts; if ( aCmdOpts.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Print" ) ) ) ) + rtl::OUString( "Print" ) ) ) { aPrinterInfo.Hide(); aPrtSetup.Hide(); diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index f7d651154527..9b841752f12d 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -90,14 +90,13 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) = utl::OConfigurationTreeRoot::createWithComponentContext( ::comphelper::getProcessComponentContext(), rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/org.openoffice.Office.DataAccess/Policies/Features/Writer" ) ), + "/org.openoffice.Office.DataAccess/Policies/Features/Writer" ), -1, utl::OConfigurationTreeRoot::CM_READONLY); sal_Bool bDatabaseFields = sal_True; aCfgRoot.getNodeValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseFields"))) >>= bDatabaseFields; + rtl::OUString("DatabaseFields")) >>= bDatabaseFields; if (bDatabaseFields) AddTabPage(TP_FLD_DB, SwFldDBPage::Create, 0); diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index 7f41f84bb618..018182f80159 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -500,11 +500,11 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) SfxBoolItem aNext(FN_SCROLL_NEXT_PREV, NID_NEXT == nSet); Any a; Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScrollNextPrev" )); + aArgs[0].Name = rtl::OUString( "ScrollNextPrev" ); aNext.QueryValue( a ); aArgs[0].Value = a; SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ScrollNextPrev" )), + rtl::OUString( ".uno:ScrollNextPrev" ), aArgs ); } return 0; @@ -681,12 +681,12 @@ void SwZoomBox_Impl::Select() { Any a; Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreviewZoom" )); + aArgs[0].Name = rtl::OUString( "PreviewZoom" ); aItem.QueryValue( a ); aArgs[0].Value = a; SfxToolBoxControl::Dispatch( m_xDispatchProvider, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PreviewZoom" )), + rtl::OUString( ".uno:PreviewZoom" ), aArgs ); } diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index b9114e9a2663..a05b9eff04d7 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -387,7 +387,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); @@ -1129,7 +1129,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) { Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog")) + rtl::OUString("com.sun.star.linguistic2.ChineseTranslationDialog") , xContext), UNO_QUERY); Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY ); if( xInit.is() ) @@ -1139,7 +1139,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) Sequence<Any> aSeq(1); Any* pArray = aSeq.getArray(); PropertyValue aParam; - aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); + aParam.Name = rtl::OUString("ParentWindow"); aParam.Value <<= makeAny(xDialogParentWindow); pArray[0] <<= makeAny(aParam); xInit->initialize( aSeq ); diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index 300938f9dbee..7f76454fe223 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -206,7 +206,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 1c2ad1bc5566..59b34c638b20 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -326,7 +326,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 367464e38f9e..c836383feeee 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -328,7 +328,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) { Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog")) + rtl::OUString("com.sun.star.linguistic2.ChineseTranslationDialog") , xContext), UNO_QUERY); Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY ); if( xInit.is() ) @@ -338,7 +338,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) Sequence<Any> aSeq(1); Any* pArray = aSeq.getArray(); PropertyValue aParam; - aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); + aParam.Name = rtl::OUString("ParentWindow"); aParam.Value <<= makeAny(xDialogParentWindow); pArray[0] <<= makeAny(aParam); xInit->initialize( aSeq ); diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 5b1c949b4205..8f7f34f88585 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -252,7 +252,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx index f2e6fe86c311..231765b699b9 100644 --- a/sw/source/ui/shells/textdrw.cxx +++ b/sw/source/ui/shells/textdrw.cxx @@ -109,7 +109,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con { // #105638# OJ aTmp <<= sal_True; - xPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DispatchURLInternal" )), aTmp ); + xPropSet->setPropertyValue( rtl::OUString( "DispatchURLInternal" ), aTmp ); } } diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index ecd090a0ecc5..26f6e02963bf 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -244,7 +244,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), + xSet->setPropertyValue( ::rtl::OUString("PluginURL"), uno::makeAny( ::rtl::OUString( pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) ); } } @@ -295,7 +295,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) try { if ( sClassLocation.Len() ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), + xSet->setPropertyValue( ::rtl::OUString("PluginURL"), uno::makeAny( ::rtl::OUString( URIHelper::SmartRel2Abs( @@ -305,7 +305,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if ( aCommandList.size() ) { aCommandList.FillSequence( aSeq ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aSeq ) ); + xSet->setPropertyValue( ::rtl::OUString("PluginCommands"), uno::makeAny( aSeq ) ); } } catch (const uno::Exception&) @@ -355,27 +355,27 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aMargin = pMarginItem->GetSize(); if ( pURLItem ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), uno::makeAny( ::rtl::OUString( pURLItem->GetValue() ) ) ); + xSet->setPropertyValue( ::rtl::OUString("FrameURL"), uno::makeAny( ::rtl::OUString( pURLItem->GetValue() ) ) ); if ( pNameItem ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), uno::makeAny( ::rtl::OUString( pNameItem->GetValue() ) ) ); + xSet->setPropertyValue( ::rtl::OUString("FrameName"), uno::makeAny( ::rtl::OUString( pNameItem->GetValue() ) ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsAutoScroll"), uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsScrollingMode"), uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); if ( pBorderItem ) - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")), + xSet->setPropertyValue( ::rtl::OUString("FrameIsBorder"), uno::makeAny( (sal_Bool) pBorderItem->GetValue() ) ); if ( pMarginItem ) { - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")), + xSet->setPropertyValue( ::rtl::OUString("FrameMarginWidth"), uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")), + xSet->setPropertyValue( ::rtl::OUString("FrameMarginHeight"), uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 830d5101697a..cb2f82e66a5d 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -1244,7 +1244,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index 34a947e463c4..81b553853e3d 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -183,7 +183,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) { uno::Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.WizardDialog")) + ::rtl::OUString("com.sun.star.comp.chart2.WizardDialog") , xContext), uno::UNO_QUERY); uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY ); if( xInit.is() ) @@ -193,10 +193,10 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) uno::Sequence<uno::Any> aSeq(2); uno::Any* pArray = aSeq.getArray(); beans::PropertyValue aParam1; - aParam1.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); + aParam1.Name = ::rtl::OUString("ParentWindow"); aParam1.Value <<= uno::makeAny(xDialogParentWindow); beans::PropertyValue aParam2; - aParam2.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ChartModel")); + aParam2.Name = ::rtl::OUString("ChartModel"); aParam2.Value <<= uno::makeAny(xChartModel); pArray[0] <<= uno::makeAny(aParam1); pArray[1] <<= uno::makeAny(aParam2); @@ -210,7 +210,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ) + if( xDialogProps->getPropertyValue( ::rtl::OUString("Size") ) >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -222,7 +222,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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Position")), + xDialogProps->setPropertyValue( ::rtl::OUString("Position"), uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx index 4f9be2656206..bde1c3b4dcd5 100644 --- a/sw/source/ui/table/tablemgr.cxx +++ b/sw/source/ui/table/tablemgr.cxx @@ -303,16 +303,16 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( uno::Sequence< beans::PropertyValue > aArgs( 4 ); aArgs[0] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellRangeRepresentation")), -1, + ::rtl::OUString("CellRangeRepresentation"), -1, uno::makeAny( rCellRange ), beans::PropertyState_DIRECT_VALUE ); aArgs[1] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")), -1, + ::rtl::OUString("HasCategories"), -1, uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE ); aArgs[2] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")), -1, + ::rtl::OUString("FirstCellAsLabel"), -1, uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ); aArgs[3] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")), -1, + ::rtl::OUString("DataRowSource"), -1, uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ); xDataReceiver->setArguments( aArgs ); } diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 1795eca83e01..89faacbc6f75 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1020,7 +1020,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface(); uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame( - OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")), frame::FrameSearchFlag::CHILDREN); + OUString("_beamer"), frame::FrameSearchFlag::CHILDREN); if(xBeamerFrame.is()) { SwDBData aData = pWrtShell->GetDBData(); @@ -1498,56 +1498,56 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe beans::PropertyValue *pValue = rSequence.getArray(); sal_uInt16 nViewID( GetViewFrame()->GetCurViewId()); - pValue->Name = rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "ViewId" ) ); - OUStringBuffer sBuffer ( OUString(RTL_CONSTASCII_USTRINGPARAM( "view" ) ) ); + pValue->Name = rtl::OUString( "ViewId" ); + OUStringBuffer sBuffer ( OUString( "view" ) ); ::sax::Converter::convertNumber(sBuffer, static_cast<sal_Int32>(nViewID)); pValue->Value <<= sBuffer.makeStringAndClear(); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewLeft" ) ); + pValue->Name = OUString( "ViewLeft" ); pValue->Value <<= TWIP_TO_MM100 ( rRect.Left() ); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewTop" ) ); + pValue->Name = OUString( "ViewTop" ); pValue->Value <<= TWIP_TO_MM100 ( rRect.Top() ); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleLeft" ) ); + pValue->Name = OUString( "VisibleLeft" ); pValue->Value <<= TWIP_TO_MM100 ( rVis.Left() ); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleTop" ) ); + pValue->Name = OUString( "VisibleTop" ); pValue->Value <<= TWIP_TO_MM100 ( rVis.Top() ); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleRight" ) ); + pValue->Name = OUString( "VisibleRight" ); pValue->Value <<= TWIP_TO_MM100 ( bBrowse ? LONG_MIN : rVis.Right() ); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleBottom" ) ); + pValue->Name = OUString( "VisibleBottom" ); pValue->Value <<= TWIP_TO_MM100 ( bBrowse ? LONG_MIN : rVis.Bottom() ); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ZoomType" ) ); + pValue->Name = OUString( "ZoomType" ); const sal_Int16 nZoomType = static_cast< sal_Int16 >(pWrtShell->GetViewOptions()->GetZoomType()); pValue->Value <<= nZoomType; pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewLayoutColumns" ) ); + pValue->Name = OUString( "ViewLayoutColumns" ); const sal_Int16 nViewLayoutColumns = static_cast< sal_Int16 >(pWrtShell->GetViewOptions()->GetViewLayoutColumns()); pValue->Value <<= nViewLayoutColumns; pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewLayoutBookMode" ) ); + pValue->Name = OUString( "ViewLayoutBookMode" ); const sal_Bool bIsViewLayoutBookMode = pWrtShell->GetViewOptions()->IsViewLayoutBookMode(); pValue->Value.setValue( &bIsViewLayoutBookMode, ::getBooleanCppuType() ); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ZoomFactor" ) ); + pValue->Name = OUString( "ZoomFactor" ); pValue->Value <<= static_cast < sal_Int16 > (pWrtShell->GetViewOptions()->GetZoom()); pValue++;nIndex++; - pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "IsSelectedFrame" ) ); + pValue->Name = OUString( "IsSelectedFrame" ); const sal_Bool bIsSelected = FRMTYPE_NONE == pWrtShell->GetSelFrmType() ? sal_False : sal_True; pValue->Value.setValue ( &bIsSelected, ::getBooleanCppuType() ); nIndex++; diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index b42e90710022..211b55ffdc4e 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -309,7 +309,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 ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rtl::OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); + throw PropertyVetoException ( OUString( "Property is read-only: " ) + rtl::OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); switch( rInfo.mnHandle ) { @@ -706,13 +706,13 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf uno::Sequence< beans::PropertyValue > aInfo; if ( !( rValue >>= aInfo ) ) throw lang::IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value of type Sequence<PropertyValue> expected!" ) ), + ::rtl::OUString( "Value of type Sequence<PropertyValue> expected!" ), uno::Reference< uno::XInterface >(), 2 ); if ( !mpDocSh->SetModifyPasswordInfo( aInfo ) ) throw beans::PropertyVetoException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The hash is not allowed to be changed now!" ) ), + ::rtl::OUString( "The hash is not allowed to be changed now!" ), uno::Reference< uno::XInterface >() ); } break; @@ -1223,7 +1223,7 @@ void SwXDocumentSettings::_postGetValues () OUString SAL_CALL SwXDocumentSettings::getImplementationName( ) throw(RuntimeException) { - return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.DocumentSettings")); + return OUString("com.sun.star.comp.Writer.DocumentSettings"); } sal_Bool SAL_CALL SwXDocumentSettings::supportsService( const OUString& ServiceName ) @@ -1244,9 +1244,9 @@ Sequence< OUString > SAL_CALL SwXDocumentSettings::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< OUString > aSeq( 3 ); - aSeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.Settings") ); - aSeq[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.DocumentSettings") ); - aSeq[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.PrintSettings") ); + aSeq[0] = OUString("com.sun.star.document.Settings"); + aSeq[1] = OUString("com.sun.star.text.DocumentSettings"); + aSeq[2] = OUString("com.sun.star.text.PrintSettings"); return aSeq; } diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index a5a598a645cd..ae971d0692c6 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -73,7 +73,7 @@ uno::Sequence< OUString > SAL_CALL SwXAutoTextContainer_getSupportedServiceNames OUString SAL_CALL SwXAutoTextContainer_getImplementationName() throw() { - return OUString( RTL_CONSTASCII_USTRINGPARAM("SwXAutoTextContainer" ) ); + return OUString("SwXAutoTextContainer" ); } SwXAutoTextContainer::SwXAutoTextContainer() diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx index edf20070499f..7e33fe6a7999 100644 --- a/sw/source/ui/uno/unodoc.cxx +++ b/sw/source/ui/uno/unodoc.cxx @@ -37,14 +37,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwTextDocument_getSupportedServiceName // resolved by rtti! uno::Sequence< ::rtl::OUString > aRet ( 1 ); ::rtl::OUString* pArray = aRet.getArray(); - pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.TextDocument" ) ); + pArray[0] = ::rtl::OUString( "com.sun.star.text.TextDocument" ); return aRet; } ::rtl::OUString SAL_CALL SwTextDocument_getImplementationName() throw() { - return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.TextDocument" ) ); + return ::rtl::OUString( "com.sun.star.comp.Writer.TextDocument" ); } uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance( @@ -66,14 +66,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwWebDocument_getSupportedServiceNames // resolved by rtti! uno::Sequence< ::rtl::OUString > aRet ( 1 ); ::rtl::OUString* pArray = aRet.getArray(); - pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.WebDocument" ) ); + pArray[0] = ::rtl::OUString( "com.sun.star.text.WebDocument" ); return aRet; } ::rtl::OUString SAL_CALL SwWebDocument_getImplementationName() throw() { - return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.WebDocument" ) ); + return ::rtl::OUString( "com.sun.star.comp.Writer.WebDocument" ); } uno::Reference< uno::XInterface > SAL_CALL SwWebDocument_createInstance( @@ -93,14 +93,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwGlobalDocument_getSupportedServiceNa { uno::Sequence< ::rtl::OUString > aRet ( 1 ); ::rtl::OUString* pArray = aRet.getArray(); - pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.GlobalDocument" ) ); + pArray[0] = ::rtl::OUString( "com.sun.star.text.GlobalDocument" ); return aRet; } ::rtl::OUString SAL_CALL SwGlobalDocument_getImplementationName() throw() { - return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.GlobalDocument" ) ); + return ::rtl::OUString( "com.sun.star.comp.Writer.GlobalDocument" ); } uno::Reference< uno::XInterface > SAL_CALL SwGlobalDocument_createInstance( diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index a089e9064f3f..7e6c4140e590 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -483,7 +483,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 ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException( OUString( "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 ) )) @@ -495,7 +495,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( bOK = rValue >>= aCurDocumentURL; if (!aCurDocumentURL.isEmpty() && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, false )) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException( OUString( "Failed to create document from URL: " ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); } else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) )) { @@ -503,9 +503,9 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (!aCurOutputURL.isEmpty()) { if (!UCB_IsDirectory(aCurOutputURL)) - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL does not point to a directory: " ) ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (UCB_IsReadOnlyFileName(aCurOutputURL)) - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL is read-only: " ) ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "URL is read-only: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); } } else if (rName.equalsAscii( GetPropName( UNO_NAME_FILE_NAME_PREFIX ) )) @@ -553,10 +553,10 @@ uno::Any SAL_CALL SwXMailMerge::execute( else if (rName.equalsAscii( GetPropName( UNO_NAME_OUT_SERVER_PASSWORD ) )) bOK = rValue >>= sOutServerPassword; else - throw UnknownPropertyException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is unknown: " ) ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException( OUString( "Property is unknown: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); if (!bOK) - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property type mismatch or property not set: " ) ) + rName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "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 @@ -596,7 +596,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if ( !bValid ) { throw IllegalArgumentException( - OUString ( RTL_CONSTASCII_USTRINGPARAM ( "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'." ) ), + OUString( "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'." ), static_cast < cppu::OWeakObject * > ( this ), 0 ); @@ -624,7 +624,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() ) { OSL_FAIL("PropertyValues missing or unset"); - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Either the ResultSet or DataSourceName and DataCommand must be set." ) ), static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "Either the ResultSet or DataSourceName and DataCommand must be set." ), static_cast < cppu::OWeakObject * > ( this ), 0 ); } // @@ -677,7 +677,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( case MailMergeType::FILE : nMergeType = DBMGR_MERGE_MAILFILES; break; case MailMergeType::MAIL : nMergeType = DBMGR_MERGE_MAILING; break; default: - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Invalid value of property:" ) ) + "OutputType", static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "Invalid value of property:" ) + "OutputType", static_cast < cppu::OWeakObject * > ( this ), 0 ); } SwNewDBMgr* pMgr = rSh.GetNewDBMgr(); @@ -722,7 +722,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( else // default empty document without URL { if (aCurOutputURL.isEmpty()) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "OutputURL is not set and can not be obtained." ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException( OUString( "OutputURL is not set and can not be obtained." ), static_cast < cppu::OWeakObject * > ( this ) ); } aURLObj.SetSmartURL( aCurOutputURL ); @@ -751,7 +751,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( { pMgr->SetEMailColumn( sAddressFromColumn ); if(sAddressFromColumn.isEmpty()) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Mail address column not set." ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException( OUString( "Mail address column not set." ), static_cast < cppu::OWeakObject * > ( this ) ); aMergeDesc.sSaveToFilter = sAttachmentFilter; aMergeDesc.sSubject = sSubject; aMergeDesc.sMailBody = sMailBody; @@ -769,7 +769,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( xInService, sInServerPassword, sOutServerPassword ); if( !aMergeDesc.xSmtpServer.is() || !aMergeDesc.xSmtpServer->isConnected()) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to connect to mail server." ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException( OUString( "Failed to connect to mail server." ), static_cast < cppu::OWeakObject * > ( this ) ); } } @@ -796,7 +796,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( } } if ( !bStoredAsTemporary ) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to save temporary file." ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException( OUString( "Failed to save temporary file." ), static_cast < cppu::OWeakObject * > ( this ) ); pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc. const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc(); @@ -817,7 +817,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 ( RTL_CONSTASCII_USTRINGPARAM ( "Mail merge failed. Sorry, no further information available." ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw Exception( OUString( "Mail merge failed. Sorry, no further information available." ), static_cast < cppu::OWeakObject * > ( this ) ); //de-initialize services if(xInService.is() && xInService->isConnected()) @@ -941,7 +941,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( bOK = rValue >>= aText; if (!aText.isEmpty() && !LoadFromURL_impl( xModel, xDocSh, aText, true )) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException( OUString( "Failed to create document from URL: " ) + aText, static_cast < cppu::OWeakObject * > ( this ) ); aDocumentURL = aText; } else if (pData == &aOutputURL) @@ -951,9 +951,9 @@ void SAL_CALL SwXMailMerge::setPropertyValue( if (!aText.isEmpty()) { if (!UCB_IsDirectory(aText)) - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL does not point to a directory: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (UCB_IsReadOnlyFileName(aText)) - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL is read-only: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "URL is read-only: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); } aOutputURL = aText; } @@ -1008,7 +1008,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( bChanged = true; } if (!bOK) - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property type mismatch or property not set: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString( "Property type mismatch or property not set: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (bChanged) { diff --git a/sw/source/ui/uno/unomodule.cxx b/sw/source/ui/uno/unomodule.cxx index d02c595d3acf..895cc5b115f5 100644 --- a/sw/source/ui/uno/unomodule.cxx +++ b/sw/source/ui/uno/unomodule.cxx @@ -33,13 +33,13 @@ using namespace ::com::sun::star; ::rtl::OUString SAL_CALL SwUnoModule_getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Writer.WriterModule" ) ); + return rtl::OUString( "com.sun.star.comp.Writer.WriterModule" ); } uno::Sequence< rtl::OUString > SAL_CALL SwUnoModule_getSupportedServiceNames() throw( uno::RuntimeException ) { uno::Sequence< rtl::OUString > aSeq( 1 ); - aSeq[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ModuleDispatcher")); + aSeq[0] = ::rtl::OUString("com.sun.star.text.ModuleDispatcher"); return aSeq; } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index a26ab161b5b2..5c3aaf9e1b91 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1713,7 +1713,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic if ( bShape && rServiceName.compareToAscii( "com.sun.star.drawing.temporaryForXMLImportOLE2Shape" ) == 0 ) { - aTmpServiceName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")); + aTmpServiceName = OUString("com.sun.star.drawing.OLE2Shape"); } //here search for the draw service Reference< XInterface > xTmp = SvxFmMSFactory::createInstance(aTmpServiceName); @@ -2128,7 +2128,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) case WID_DOC_VBA_DOCOBJ: { beans::PropertyValue aProp; - aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWordDoc") ); + aProp.Name = rtl::OUString("ThisWordDoc"); aProp.Value <<= pDocShell->GetModel(); aAny <<= aProp; } @@ -2801,22 +2801,22 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( sal_Int32 nLen = 2; aRenderer.realloc(2); - aRenderer[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ); + aRenderer[0].Name = OUString( "PageSize" ); aRenderer[0].Value <<= aPageSize; - aRenderer[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageIncludesNonprintableArea" ) ); + aRenderer[1].Name = OUString( "PageIncludesNonprintableArea" ); aRenderer[1].Value <<= sal_True; if (aPreferredPageSize.Width && aPreferredPageSize.Height) { ++nLen; aRenderer.realloc( nLen ); - aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferredPageSize" ) ); + aRenderer[ nLen - 1 ].Name = OUString( "PreferredPageSize" ); aRenderer[ nLen - 1 ].Value <<= aPreferredPageSize; } if (nPrinterPaperTray >= 0) { ++nLen; aRenderer.realloc( nLen ); - aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PrinterPaperTray" ) ); + aRenderer[ nLen - 1 ].Name = OUString( "PrinterPaperTray" ); aRenderer[ nLen - 1 ].Value <<= nPrinterPaperTray; } } @@ -2837,22 +2837,22 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aRenderer.realloc( nLen ); // put page print settings attribute into render data const sal_Int32 nRow = pPagePrintSettings->GetRow(); - aRenderer[ nRenderDataIdxStart + 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpRows" ) ); + aRenderer[ nRenderDataIdxStart + 0 ].Name = OUString( "NUpRows" ); aRenderer[ nRenderDataIdxStart + 0 ].Value <<= ( nRow > 1 ? nRow : 1 ); const sal_Int32 nCol = pPagePrintSettings->GetCol(); - aRenderer[ nRenderDataIdxStart + 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpColumns" ) ); + aRenderer[ nRenderDataIdxStart + 1 ].Name = OUString( "NUpColumns" ); aRenderer[ nRenderDataIdxStart + 1 ].Value <<= ( nCol > 1 ? nCol : 1 ); - aRenderer[ nRenderDataIdxStart + 2 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginLeft" ) ); + aRenderer[ nRenderDataIdxStart + 2 ].Name = OUString( "NUpPageMarginLeft" ); aRenderer[ nRenderDataIdxStart + 2 ].Value <<= pPagePrintSettings->GetLeftSpace(); - aRenderer[ nRenderDataIdxStart + 3 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginRight" ) ); + aRenderer[ nRenderDataIdxStart + 3 ].Name = OUString( "NUpPageMarginRight" ); aRenderer[ nRenderDataIdxStart + 3 ].Value <<= pPagePrintSettings->GetRightSpace(); - aRenderer[ nRenderDataIdxStart + 4 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginTop" ) ); + aRenderer[ nRenderDataIdxStart + 4 ].Name = OUString( "NUpPageMarginTop" ); aRenderer[ nRenderDataIdxStart + 4 ].Value <<= pPagePrintSettings->GetTopSpace(); - aRenderer[ nRenderDataIdxStart + 5 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPageMarginBottom" ) ); + aRenderer[ nRenderDataIdxStart + 5 ].Name = OUString( "NUpPageMarginBottom" ); aRenderer[ nRenderDataIdxStart + 5 ].Value <<= pPagePrintSettings->GetBottomSpace(); - aRenderer[ nRenderDataIdxStart + 6 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpHorizontalSpacing" ) ); + aRenderer[ nRenderDataIdxStart + 6 ].Name = OUString( "NUpHorizontalSpacing" ); aRenderer[ nRenderDataIdxStart + 6 ].Value <<= pPagePrintSettings->GetHorzSpace(); - aRenderer[ nRenderDataIdxStart + 7 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpVerticalSpacing" ) ); + aRenderer[ nRenderDataIdxStart + 7 ].Name = OUString( "NUpVerticalSpacing" ); aRenderer[ nRenderDataIdxStart + 7 ].Value <<= pPagePrintSettings->GetVertSpace(); { Printer* pPrinter = pDocShell->GetDoc()->getPrinter( false ); @@ -2868,7 +2868,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( { aNewPageSize = awt::Size( aPageSize.Height(), aPageSize.Width() ); } - aRenderer[ nRenderDataIdxStart + 8 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "NUpPaperSize" ) ); + aRenderer[ nRenderDataIdxStart + 8 ].Name = OUString( "NUpPaperSize" ); aRenderer[ nRenderDataIdxStart + 8 ].Value <<= aNewPageSize; } } @@ -3158,7 +3158,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( const bool bComplex = 0 != (nScriptTypes & nComplex); if (nScriptTypes < nLatin || nScriptTypes > (nLatin | nAsian | nComplex)) - throw IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nScriptTypes ranges from 1 to 7!")), Reference< XInterface >(), 1); + throw IllegalArgumentException(::rtl::OUString("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 00c06be64d87..81061b5a7428 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -946,7 +946,7 @@ void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -969,7 +969,7 @@ void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -993,7 +993,7 @@ sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); const SwWrtShell& rSh = m_pView->GetWrtShell(); bRet = !rSh.HasSelection(); @@ -1011,7 +1011,7 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( un if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "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 ); @@ -1028,7 +1028,7 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( u if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "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 ); @@ -1048,7 +1048,7 @@ void SwXTextViewCursor::gotoRange( if(m_pView && xRange.is()) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc()); if (!::sw::XTextRangeToSwPaM(rDestPam, xRange)) @@ -1187,7 +1187,7 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().SttDoc( bExpand ); } @@ -1201,7 +1201,7 @@ void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().EndDoc( bExpand ); } @@ -1359,7 +1359,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1378,7 +1378,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1397,7 +1397,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno:: if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1416,7 +1416,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); ShellModes eSelMode = m_pView->GetShellMode(); switch(eSelMode) @@ -1446,7 +1446,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); ShellModes eSelMode = m_pView->GetShellMode(); switch(eSelMode) @@ -1604,7 +1604,7 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( un if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "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 ); @@ -1621,7 +1621,7 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno: if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "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 ); @@ -1638,7 +1638,7 @@ sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); bRet = m_pView->GetWrtShell().IsAtLeftMargin(); } @@ -1654,7 +1654,7 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); bRet = m_pView->GetWrtShell().IsAtRightMargin(sal_True); } @@ -1669,7 +1669,7 @@ void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeExcep if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().RightMargin(bExpand, sal_True); } @@ -1683,7 +1683,7 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeExc if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().LeftMargin(bExpand, sal_True); } diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx index b4341dca5eb7..3074f0eab5de 100644 --- a/sw/source/ui/utlui/viewlayoutctrl.cxx +++ b/sw/source/ui/utlui/viewlayoutctrl.cxx @@ -159,7 +159,7 @@ sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt ) aViewLayout.QueryValue( a ); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs( 1 ); - aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ViewLayout" )); + aArgs[0].Name = rtl::OUString( "ViewLayout" ); aArgs[0].Value = a; execute( aArgs ); diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 0ec4c783127a..dbe5f9c05409 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -45,8 +45,7 @@ SwVbaAddin::~SwVbaAddin() void SAL_CALL SwVbaAddin::setName( const rtl::OUString& ) throw ( css::uno::RuntimeException ) { - throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(" Fail to set name")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(" Fail to set name"), uno::Reference< uno::XInterface >() ); } ::rtl::OUString SAL_CALL SwVbaAddin::getPath() throw (uno::RuntimeException) @@ -78,7 +77,7 @@ void SAL_CALL SwVbaAddin::setInstalled( ::sal_Bool _installed ) throw (uno::Runt rtl::OUString SwVbaAddin::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaAddin")); + return rtl::OUString("SwVbaAddin"); } uno::Sequence< rtl::OUString > @@ -88,7 +87,7 @@ SwVbaAddin::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Addin" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Addin" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index 1b476d55213d..b72e98837e50 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -82,7 +82,7 @@ SwVbaAddins::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaAddins::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaAddins")); + return rtl::OUString("SwVbaAddins"); } css::uno::Sequence<rtl::OUString> @@ -92,7 +92,7 @@ SwVbaAddins::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Addins") ); + sNames[0] = rtl::OUString("ooo.vba.word.Addins"); } return sNames; } diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index a9f9f8df7cfa..018c9214a11e 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -185,7 +185,7 @@ SwVbaApplication::getCurrentDocument() throw (css::uno::RuntimeException) rtl::OUString SwVbaApplication::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaApplication")); + return rtl::OUString("SwVbaApplication"); } uno::Sequence< rtl::OUString > @@ -195,7 +195,7 @@ SwVbaApplication::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Application" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Application" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index 38a133b3472f..0d3f165b4985 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -41,14 +41,14 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R if( pWhere ) { uno::Reference< text::XTextRange > xTextRange = pWhere->getXTextRange(); - xTextRange->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) ); // set marker + xTextRange->setString( rtl::OUString("x") ); // set marker uno::Reference< text::XTextRange > xEndMarker = xTextRange->getEnd(); - xEndMarker->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) ); // set marker + xEndMarker->setString( rtl::OUString("x") ); // set marker uno::Reference< text::XText > xText = pWhere->getXText(); mxEntry->applyTo( xEndMarker->getStart() ); uno::Reference< text::XTextCursor > xTC = xText->createTextCursorByRange( xTextRange->getStart() ); xTC->goRight( 1, sal_True ); - xTC->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); // remove marker + xTC->setString( rtl::OUString("") ); // remove marker // remove the blank paragraph if it is a rich text sal_Bool bRich = sal_False; _richtext >>= bRich; @@ -63,12 +63,12 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R uno::Reference< text::XTextViewCursor > xTVCursor = word::getXTextViewCursor( xModel ); uno::Reference< text::XTextRange > xCurrentRange( xTC->getEnd(), uno::UNO_QUERY_THROW ); xTVCursor->gotoRange( xCurrentRange, sal_False ); - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Delete")); + rtl::OUString url = rtl::OUString( ".uno:Delete"); dispatchRequests( xModel,url ); xTVCursor->gotoRange( xEndMarker->getEnd(), sal_False ); } } - xEndMarker->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); // remove marker + xEndMarker->setString( rtl::OUString("") ); // remove marker xTC = xText->createTextCursorByRange( xEndMarker->getEnd() ); pWhere->setXTextCursor( xTC ); } @@ -78,7 +78,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R rtl::OUString SwVbaAutoTextEntry::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaAutoTextEntry")); + return rtl::OUString("SwVbaAutoTextEntry"); } uno::Sequence< rtl::OUString > @@ -88,7 +88,7 @@ SwVbaAutoTextEntry::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.AutoTextEntry" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.AutoTextEntry" ); } return aServiceNames; } @@ -107,7 +107,7 @@ SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException) uno::Reference< container::XEnumeration > SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } uno::Any @@ -120,7 +120,7 @@ SwVbaAutoTextEntries::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaAutoTextEntries::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaAutoTextEntries")); + return rtl::OUString("SwVbaAutoTextEntries"); } css::uno::Sequence<rtl::OUString> @@ -130,7 +130,7 @@ SwVbaAutoTextEntries::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.AutoTextEntries") ); + sNames[0] = rtl::OUString("ooo.vba.word.AutoTextEntries"); } return sNames; } diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index 776f583c9edd..0120130fb669 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("The bookmark is not valid" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("The bookmark is not valid" ), uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaBookmark::Delete() throw ( uno::RuntimeException ) @@ -86,7 +86,7 @@ uno::Any SAL_CALL SwVbaBookmark::Range() throw ( uno::RuntimeException ) rtl::OUString SwVbaBookmark::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaBookmark")); + return rtl::OUString("SwVbaBookmark"); } uno::Sequence< rtl::OUString > @@ -96,7 +96,7 @@ SwVbaBookmark::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Bookmark" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Bookmark" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 885da4020e69..aae43bfb1eb5 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -140,7 +140,7 @@ void SwVbaBookmarks::removeBookmarkByName( const rtl::OUString& rName ) throw (u void SwVbaBookmarks::addBookmarkByName( const uno::Reference< frame::XModel >& xModel, const rtl::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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark")) ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance( rtl::OUString("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 ); @@ -207,7 +207,7 @@ SwVbaBookmarks::Exists( const rtl::OUString& rName ) throw (css::uno::RuntimeExc rtl::OUString SwVbaBookmarks::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaBookmarks")); + return rtl::OUString("SwVbaBookmarks"); } css::uno::Sequence<rtl::OUString> @@ -217,7 +217,7 @@ SwVbaBookmarks::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Bookmarks") ); + sNames[0] = rtl::OUString("ooo.vba.word.Bookmarks"); } return sNames; } diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index f3a38f7b15c1..c6b89b38fa4d 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -142,7 +142,7 @@ private: protected: virtual rtl::OUString getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaBorder")); + return rtl::OUString("SwVbaBorder"); } virtual css::uno::Sequence<rtl::OUString> getServiceNames() @@ -151,7 +151,7 @@ protected: if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Border" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Border" ); } return aServiceNames; } @@ -226,12 +226,12 @@ public: break; } default: - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bad param" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Bad param" ), uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Method failed" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); } }; @@ -354,7 +354,7 @@ void SAL_CALL SwVbaBorders::setShadow( sal_Bool /*_shadow*/ ) throw (uno::Runtim rtl::OUString SwVbaBorders::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaBorders")); + return rtl::OUString("SwVbaBorders"); } uno::Sequence< rtl::OUString > @@ -364,7 +364,7 @@ SwVbaBorders::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Borders" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Borders" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbacell.cxx b/sw/source/ui/vba/vbacell.cxx index 62d274aff320..4ffbf5d4d232 100644 --- a/sw/source/ui/vba/vbacell.cxx +++ b/sw/source/ui/vba/vbacell.cxx @@ -91,7 +91,7 @@ void SAL_CALL SwVbaCell::SetHeight( float height, sal_Int32 heightrule ) throw ( rtl::OUString SwVbaCell::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaCell")); + return rtl::OUString("SwVbaCell"); } uno::Sequence< rtl::OUString > @@ -101,7 +101,7 @@ SwVbaCell::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Cell" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Cell" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbacells.cxx b/sw/source/ui/vba/vbacells.cxx index 563bf53456da..d70b9cd9b4d5 100644 --- a/sw/source/ui/vba/vbacells.cxx +++ b/sw/source/ui/vba/vbacells.cxx @@ -195,7 +195,7 @@ SwVbaCells::createCollectionObject( const uno::Any& aSource ) rtl::OUString SwVbaCells::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaCells")); + return rtl::OUString("SwVbaCells"); } uno::Sequence<rtl::OUString> @@ -205,7 +205,7 @@ SwVbaCells::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Cells") ); + sNames[0] = rtl::OUString("ooo.vba.word.Cells"); } return sNames; } diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx index 847a99f0150d..a4a20c3bd597 100644 --- a/sw/source/ui/vba/vbacolumn.cxx +++ b/sw/source/ui/vba/vbacolumn.cxx @@ -80,7 +80,7 @@ void SwVbaColumn::SelectColumn( const uno::Reference< frame::XModel >& xModel, c rtl::OUString SwVbaColumn::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaColumn")); + return rtl::OUString("SwVbaColumn"); } uno::Sequence< rtl::OUString > @@ -90,7 +90,7 @@ SwVbaColumn::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Column" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Column" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx index de5d06c1f947..b9a9afb2c195 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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException( ::rtl::OUString("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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); } // XEnumerationAccess @@ -132,7 +132,7 @@ SwVbaColumns::createCollectionObject( const uno::Any& aSource ) rtl::OUString SwVbaColumns::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaColumns")); + return rtl::OUString("SwVbaColumns"); } uno::Sequence<rtl::OUString> @@ -142,7 +142,7 @@ SwVbaColumns::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Columns") ); + sNames[0] = rtl::OUString("ooo.vba.word.Columns"); } return sNames; } diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx index 846f1777b2d1..547ba47f8f49 100644 --- a/sw/source/ui/vba/vbadialog.cxx +++ b/sw/source/ui/vba/vbadialog.cxx @@ -53,7 +53,7 @@ SwVbaDialog::mapIndexToName( sal_Int32 nIndex ) rtl::OUString SwVbaDialog::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaDialog")); + return rtl::OUString("SwVbaDialog"); } uno::Sequence< rtl::OUString > @@ -63,7 +63,7 @@ SwVbaDialog::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Dialog" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Dialog" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbadialogs.cxx b/sw/source/ui/vba/vbadialogs.cxx index 3c834a940557..ac1e5bc5cd87 100644 --- a/sw/source/ui/vba/vbadialogs.cxx +++ b/sw/source/ui/vba/vbadialogs.cxx @@ -35,7 +35,7 @@ SwVbaDialogs::Item( const uno::Any &aItem ) throw (uno::RuntimeException) rtl::OUString SwVbaDialogs::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaDialogs")); + return rtl::OUString("SwVbaDialogs"); } uno::Sequence< rtl::OUString > @@ -45,7 +45,7 @@ SwVbaDialogs::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Dialogs" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Dialogs" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 1ab0203ed6be..fa2402e0adbe 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -243,7 +243,7 @@ SwVbaDocument::PageSetup( ) throw (uno::RuntimeException) rtl::OUString SwVbaDocument::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaDocument")); + return rtl::OUString("SwVbaDocument"); } uno::Any SAL_CALL @@ -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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation")) ) >>= IsAutoHyphenation; + xParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation")), uno::makeAny( _autohyphenation ) ); + xParaProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaHyphenationMaxHyphens")) ) >>= nHyphensLimit; + xParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaHyphenationMaxHyphens")), uno::makeAny( nHyphensLimit ) ); + xParaProps->setPropertyValue( rtl::OUString("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) @@ -377,13 +377,13 @@ void SAL_CALL SwVbaDocument::PrintOut( const uno::Any& /*Background*/, const uno void SAL_CALL SwVbaDocument::PrintPreview( ) throw (uno::RuntimeException) { - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintPreview")); + rtl::OUString url = rtl::OUString( ".uno:PrintPreview"); dispatchRequests( mxModel,url ); } void SAL_CALL SwVbaDocument::ClosePrintPreview( ) throw (uno::RuntimeException) { - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ClosePreview")); + rtl::OUString url = rtl::OUString( ".uno:ClosePreview"); dispatchRequests( mxModel,url ); } @@ -459,7 +459,7 @@ SwVbaDocument::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::Un 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.ControlProvider" ) ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( "ooo.vba.ControlProvider" ), mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); return uno::makeAny( xControl ); } @@ -506,7 +506,7 @@ SwVbaDocument::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Document" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Document" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 7ecd02ecfe87..7640bd1d6558 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -464,7 +464,7 @@ public: virtual rtl::OUString SAL_CALL getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException); virtual void SAL_CALL setLinkSource( const rtl::OUString& LinkSource ) throw (script::BasicErrorException, uno::RuntimeException); //XDefaultProperty - virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException) { return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); } + virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException) { return rtl::OUString("Value"); } // XHelperInterface virtual rtl::OUString getServiceImplName(); virtual uno::Sequence<rtl::OUString> getServiceNames(); @@ -622,7 +622,7 @@ SwVbaBuiltInDocumentProperty::setLinkSource( const rtl::OUString& /*LinkSource*/ rtl::OUString SwVbaBuiltInDocumentProperty::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaBuiltinDocumentProperty")); + return rtl::OUString("SwVbaBuiltinDocumentProperty"); } uno::Sequence<rtl::OUString> @@ -632,7 +632,7 @@ SwVbaBuiltInDocumentProperty::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.DocumentProperty" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.DocumentProperty" ); } return aServiceNames; } @@ -747,7 +747,7 @@ uno::Reference< XDocumentProperty > SAL_CALL SwVbaBuiltinDocumentProperties::Add( const ::rtl::OUString& /*Name*/, ::sal_Bool /*LinkToContent*/, ::sal_Int8 /*Type*/, const uno::Any& /*value*/, const uno::Any& /*LinkSource*/ ) throw (script::BasicErrorException, uno::RuntimeException) { throw uno::RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("not supported for Builtin properties") ), uno::Reference< uno::XInterface >() ); + rtl::OUString("not supported for Builtin properties"), uno::Reference< uno::XInterface >() ); } // XEnumerationAccess @@ -776,7 +776,7 @@ SwVbaBuiltinDocumentProperties::createCollectionObject( const uno::Any& aSource rtl::OUString SwVbaBuiltinDocumentProperties::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaBuiltinDocumentProperties")); + return rtl::OUString("SwVbaBuiltinDocumentProperties"); } uno::Sequence<rtl::OUString> @@ -786,7 +786,7 @@ SwVbaBuiltinDocumentProperties::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.DocumentProperties" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.DocumentProperties" ); } return aServiceNames; } @@ -914,7 +914,7 @@ SwVbaCustomDocumentProperties::Add( const ::rtl::OUString& Name, ::sal_Bool Link rtl::OUString SwVbaCustomDocumentProperties::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaCustomDocumentProperties")); + return rtl::OUString("SwVbaCustomDocumentProperties"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index d4647404fd63..5e55df3a67c9 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -153,7 +153,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm rtl::OUString SwVbaDocuments::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaDocuments")); + return rtl::OUString("SwVbaDocuments"); } uno::Sequence<rtl::OUString> @@ -163,7 +163,7 @@ SwVbaDocuments::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Documents") ); + sNames[0] = rtl::OUString("ooo.vba.word.Documents"); } return sNames; } diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index f462360033b0..4e5150fa7dd4 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -54,7 +54,7 @@ sal_Bool SAL_CALL SwVbaField::Update() throw (uno::RuntimeException) rtl::OUString SwVbaField::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaField")); + return rtl::OUString("SwVbaField"); } uno::Sequence<rtl::OUString> @@ -64,7 +64,7 @@ SwVbaField::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Field" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Field" ); } return aServiceNames; } @@ -345,7 +345,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, } else { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() ); @@ -357,7 +357,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl::OUString _text ) throw (uno::RuntimeException) { - uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.FileName")) ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString("com.sun.star.text.TextField.FileName") ), uno::UNO_QUERY_THROW ); sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT; if( !_text.isEmpty() ) { @@ -382,7 +382,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl } uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FileFormat") ), uno::makeAny( nFileFormat ) ); + xProps->setPropertyValue( rtl::OUString("FileFormat"), uno::makeAny( nFileFormat ) ); return xTextField; } @@ -466,11 +466,11 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const if( bCustom ) { - sFieldService = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.textfield.docinfo.Custom" ) ); + sFieldService = rtl::OUString( "com.sun.star.text.textfield.docinfo.Custom" ); } else if( sFieldService.isEmpty() ) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW ); @@ -479,7 +479,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const { uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); rtl::OUString sDocPropertyName( aDocProperty ); - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ), uno::makeAny( sDocPropertyName ) ); + xProps->setPropertyValue( rtl::OUString("Name"), uno::makeAny( sDocPropertyName ) ); } return xTextField; @@ -520,7 +520,7 @@ sal_Int32 SAL_CALL SwVbaFields::Update() throw (uno::RuntimeException) rtl::OUString SwVbaFields::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaFields")); + return rtl::OUString("SwVbaFields"); } // XEnumerationAccess @@ -537,7 +537,7 @@ SwVbaFields::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Fields" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Fields" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index f4b34f02f668..0dce30854922 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } ::sal_Bool SAL_CALL SwVbaFind::getForward() throw (uno::RuntimeException) { sal_Bool bBackward = sal_False; - mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchBackwards") ) ) >>= bBackward; + mxPropertyReplace->getPropertyValue( rtl::OUString("SearchBackwards") ) >>= bBackward; return !bBackward; } void SAL_CALL SwVbaFind::setForward( ::sal_Bool _forward ) throw (uno::RuntimeException) { sal_Bool bBackward = !_forward; - mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchBackwards") ), uno::makeAny( bBackward ) ); + mxPropertyReplace->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchCaseSensitive") ) ) >>= value; + mxPropertyReplace->getPropertyValue( rtl::OUString("SearchCaseSensitive") ) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchCase( ::sal_Bool _matchcase ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchCaseSensitive") ), uno::makeAny( _matchcase ) ); + mxPropertyReplace->setPropertyValue( rtl::OUString("SearchCaseSensitive"), uno::makeAny( _matchcase ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchWords") ) ) >>= value; + mxPropertyReplace->getPropertyValue( rtl::OUString("SearchWords") ) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWholeWord( ::sal_Bool _matchwholeword ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchWords") ), uno::makeAny( _matchwholeword ) ); + mxPropertyReplace->setPropertyValue( rtl::OUString("SearchWords"), uno::makeAny( _matchwholeword ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchRegularExpression") ) ) >>= value; + mxPropertyReplace->getPropertyValue( rtl::OUString("SearchRegularExpression") ) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWildcards( ::sal_Bool _matchwildcards ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchRegularExpression") ), uno::makeAny( _matchwildcards ) ); + mxPropertyReplace->setPropertyValue( rtl::OUString("SearchRegularExpression"), uno::makeAny( _matchwildcards ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ) ) >>= value; + mxPropertyReplace->getPropertyValue( rtl::OUString("SearchSimilarity") ) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchSoundsLike( ::sal_Bool _matchsoundslike ) throw (uno::RuntimeException) { // seems not accurate - mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ), uno::makeAny( _matchsoundslike ) ); + mxPropertyReplace->setPropertyValue( rtl::OUString("SearchSimilarity"), uno::makeAny( _matchsoundslike ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ) ) >>= value; + mxPropertyReplace->getPropertyValue( rtl::OUString("SearchSimilarity") ) >>= value; if( value ) - mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarityRelax") ) ) >>= value; + mxPropertyReplace->getPropertyValue( rtl::OUString("SearchSimilarityRelax") ) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchAllWordForms( ::sal_Bool _matchallwordforms ) throw (uno::RuntimeException) { // seems not accurate - mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ), uno::makeAny( _matchallwordforms ) ); - mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarityRelax") ), uno::makeAny( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue( rtl::OUString("SearchSimilarity"), uno::makeAny( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue( rtl::OUString("SearchSimilarityRelax"), uno::makeAny( _matchallwordforms ) ); } uno::Any SAL_CALL SwVbaFind::getStyle() throw (uno::RuntimeException) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } sal_Bool SAL_CALL @@ -395,7 +395,7 @@ SwVbaFind::ClearFormatting( ) throw (uno::RuntimeException) rtl::OUString SwVbaFind::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaFind")); + return rtl::OUString("SwVbaFind"); } uno::Sequence< rtl::OUString > @@ -405,7 +405,7 @@ SwVbaFind::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Find" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Find" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx index 6e8f1b3de7c5..5839100993a8 100644 --- a/sw/source/ui/vba/vbafont.cxx +++ b/sw/source/ui/vba/vbafont.cxx @@ -129,7 +129,7 @@ SwVbaFont::setUnderline( const uno::Any& _underline ) throw (uno::RuntimeExcepti rtl::OUString SwVbaFont::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaFont")); + return rtl::OUString("SwVbaFont"); } void SAL_CALL @@ -227,7 +227,7 @@ SwVbaFont::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Font" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Font" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx index d00b3ce89b6e..2fdc03fbbb7d 100644 --- a/sw/source/ui/vba/vbaformfield.cxx +++ b/sw/source/ui/vba/vbaformfield.cxx @@ -67,7 +67,7 @@ rtl::OUString SAL_CALL SwVbaFormField::getResult() throw ( uno::RuntimeException } else { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } return sResult; } @@ -87,7 +87,7 @@ void SAL_CALL SwVbaFormField::setResult( const rtl::OUString& result ) throw ( u } else { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } } @@ -110,7 +110,7 @@ uno::Any SAL_CALL SwVbaFormField::CheckBox() throw ( uno::RuntimeException ) rtl::OUString SwVbaFormField::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaFormField")); + return rtl::OUString("SwVbaFormField"); } uno::Sequence< rtl::OUString > @@ -120,7 +120,7 @@ SwVbaFormField::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.FormField" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.FormField" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbaformfields.cxx b/sw/source/ui/vba/vbaformfields.cxx index d208b388b87c..a421088d96ea 100644 --- a/sw/source/ui/vba/vbaformfields.cxx +++ b/sw/source/ui/vba/vbaformfields.cxx @@ -177,7 +177,7 @@ SwVbaFormFields::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaFormFields::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaFormFields")); + return rtl::OUString("SwVbaFormFields"); } css::uno::Sequence<rtl::OUString> @@ -187,7 +187,7 @@ SwVbaFormFields::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.FormFields") ); + sNames[0] = rtl::OUString("ooo.vba.word.FormFields"); } return sNames; } diff --git a/sw/source/ui/vba/vbaframe.cxx b/sw/source/ui/vba/vbaframe.cxx index 8d22b235957e..3dc5bad28821 100644 --- a/sw/source/ui/vba/vbaframe.cxx +++ b/sw/source/ui/vba/vbaframe.cxx @@ -46,7 +46,7 @@ void SAL_CALL SwVbaFrame::Select() throw ( uno::RuntimeException ) rtl::OUString SwVbaFrame::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaFrame")); + return rtl::OUString("SwVbaFrame"); } uno::Sequence< rtl::OUString > @@ -56,7 +56,7 @@ SwVbaFrame::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Frame" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Frame" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbaframes.cxx b/sw/source/ui/vba/vbaframes.cxx index 80bfacaec345..259584f003d7 100644 --- a/sw/source/ui/vba/vbaframes.cxx +++ b/sw/source/ui/vba/vbaframes.cxx @@ -81,7 +81,7 @@ SwVbaFrames::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaFrames::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaFrames")); + return rtl::OUString("SwVbaFrames"); } css::uno::Sequence<rtl::OUString> @@ -91,7 +91,7 @@ SwVbaFrames::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Frames") ); + sNames[0] = rtl::OUString("ooo.vba.word.Frames"); } return sNames; } diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index 08aea0473db6..b9387680469f 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -41,7 +41,7 @@ SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Refere { OSL_TRACE("SwVbaGlobals::SwVbaGlobals()"); uno::Sequence< beans::PropertyValue > aInitArgs( 2 ); - aInitArgs[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Application")); + aInitArgs[ 0 ].Name = rtl::OUString("Application"); aInitArgs[ 0 ].Value = uno::makeAny( getApplication() ); aInitArgs[ 1 ].Name = sDocCtxName; aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) ); @@ -141,7 +141,7 @@ float SAL_CALL SwVbaGlobals::CentimetersToPoints( float _Centimeters ) throw (un rtl::OUString SwVbaGlobals::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaGlobals")); + return rtl::OUString("SwVbaGlobals"); } uno::Sequence< rtl::OUString > @@ -151,7 +151,7 @@ SwVbaGlobals::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Globals" ); } return aServiceNames; } @@ -164,9 +164,9 @@ SwVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException) if ( !bInit ) { rtl::OUString names[] = { - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.word.Document" ) ), + ::rtl::OUString( "ooo.vba.word.Document" ), // #FIXME #TODO make Application a proper service -// ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.word.Application" ) ), +// ::rtl::OUString( "ooo.vba.word.Application" ), }; sal_Int32 nWordServices = SAL_N_ELEMENTS( names ); sal_Int32 startIndex = serviceNames.getLength(); diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index 89261c1775d5..e13eafda4ce3 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -54,15 +54,15 @@ uno::Reference< word::XRange > SAL_CALL SwVbaHeaderFooter::getRange() throw (uno rtl::OUString sPropsNameText; if( mbHeader ) { - sPropsNameText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderText") ); + sPropsNameText = rtl::OUString("HeaderText"); } else { - sPropsNameText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterText") ); + sPropsNameText = rtl::OUString("FooterText"); } if( mnIndex == word::WdHeaderFooterIndex::wdHeaderFooterEvenPages ) { - sPropsNameText = sPropsNameText.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Left") ) ); + sPropsNameText = sPropsNameText.concat( rtl::OUString("Left") ); } uno::Reference< text::XText > xText( mxPageStyleProps->getPropertyValue( sPropsNameText ), uno::UNO_QUERY_THROW ); @@ -86,7 +86,7 @@ SwVbaHeaderFooter::Shapes( const uno::Any& index ) throw (uno::RuntimeException) rtl::OUString SwVbaHeaderFooter::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaHeaderFooter")); + return rtl::OUString("SwVbaHeaderFooter"); } uno::Sequence< rtl::OUString > @@ -96,7 +96,7 @@ SwVbaHeaderFooter::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Pane" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Pane" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index 65291bee7a18..15d5e9263c32 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -54,8 +54,8 @@ sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xM if( !isHeaderFooter( xCurrentText ) ) return sal_False; - rtl::OUString aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared") ); - rtl::OUString aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderText") ); + rtl::OUString aPropIsShared = rtl::OUString("HeaderIsShared"); + rtl::OUString aPropText = rtl::OUString("HeaderText"); uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW ); sal_Bool isShared = sal_True; @@ -64,9 +64,9 @@ sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xM { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); if( 0 == xPageCursor->getPage() % 2 ) - aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextLeft") ); + aPropText = rtl::OUString("HeaderTextLeft"); else - aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextRight") ); + aPropText = rtl::OUString("HeaderTextRight"); } uno::Reference< text::XText > xHeaderText( xPageProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW ); @@ -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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared"))) >>= isShared; + xStyleProps->getPropertyValue( rtl::OUString("HeaderIsShared")) >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); @@ -120,8 +120,8 @@ sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xM if( !isHeaderFooter( xCurrentText ) ) return sal_False; - rtl::OUString aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared") ); - rtl::OUString aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterText") ); + rtl::OUString aPropIsShared = rtl::OUString("FooterIsShared"); + rtl::OUString aPropText = rtl::OUString("FooterText"); uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW ); sal_Bool isShared = sal_True; @@ -130,9 +130,9 @@ sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xM { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); if( 0 == xPageCursor->getPage() % 2 ) - aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterTextLeft") ); + aPropText = rtl::OUString("FooterTextLeft"); else - aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterTextRight") ); + aPropText = rtl::OUString("FooterTextRight"); } uno::Reference< text::XText > xFooterText( xPageProps->getPropertyValue( aPropText ), 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared"))) >>= isShared; + xStyleProps->getPropertyValue( rtl::OUString("FooterIsShared")) >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index d750bce81503..ec41e33d025f 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -122,7 +122,7 @@ SwVbaHeadersFooters::createCollectionObject( const uno::Any& aSource ) rtl::OUString SwVbaHeadersFooters::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaHeadersFooters")); + return rtl::OUString("SwVbaHeadersFooters"); } uno::Sequence<rtl::OUString> @@ -132,7 +132,7 @@ SwVbaHeadersFooters::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.HeadersFooters") ); + sNames[0] = rtl::OUString("ooo.vba.word.HeadersFooters"); } return sNames; } diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index 373713cbf2b0..ea7cf40fd5e2 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart") ), uno::makeAny( isNumberingRestart ) ); + xProps->setPropertyValue( rtl::OUString("ParaIsNumberingRestart"), uno::makeAny( isNumberingRestart ) ); if( isNumberingRestart ) { sal_Int16 nStartValue = 1; - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue") ), uno::makeAny( nStartValue ) ); + xProps->setPropertyValue( rtl::OUString("NumberingStartValue"), uno::makeAny( nStartValue ) ); } isFirstElement = sal_False; } else { - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart") ), uno::makeAny( sal_False ) ); + xProps->setPropertyValue( rtl::OUString("ParaIsNumberingRestart"), uno::makeAny( sal_False ) ); } pListTemplate->applyListTemplate( xProps ); } @@ -86,13 +86,13 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) throw (css::uno::RuntimeException) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } rtl::OUString SwVbaListFormat::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaListFormat")); + return rtl::OUString("SwVbaListFormat"); } uno::Sequence< rtl::OUString > @@ -102,7 +102,7 @@ SwVbaListFormat::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListFormat" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.ListFormat" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx index d80114307ddd..d25cbf0c415f 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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); } // XEnumerationAccess @@ -87,7 +87,7 @@ SwVbaListGalleries::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaListGalleries::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaListGalleries")); + return rtl::OUString("SwVbaListGalleries"); } css::uno::Sequence<rtl::OUString> @@ -97,7 +97,7 @@ SwVbaListGalleries::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListGalleries") ); + sNames[0] = rtl::OUString("ooo.vba.word.ListGalleries"); } return sNames; } diff --git a/sw/source/ui/vba/vbalistgallery.cxx b/sw/source/ui/vba/vbalistgallery.cxx index e8b3967d1bac..b7127f994b6d 100644 --- a/sw/source/ui/vba/vbalistgallery.cxx +++ b/sw/source/ui/vba/vbalistgallery.cxx @@ -44,7 +44,7 @@ SwVbaListGallery::ListTemplates( const uno::Any& index ) throw (uno::RuntimeExce rtl::OUString SwVbaListGallery::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaListGallery")); + return rtl::OUString("SwVbaListGallery"); } uno::Sequence< rtl::OUString > @@ -54,7 +54,7 @@ SwVbaListGallery::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListGallery" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.ListGallery" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index 3b93b1cd42c8..b18754c0e590 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -39,7 +39,7 @@ SwVbaListLevel::~SwVbaListLevel() ::sal_Int32 SAL_CALL SwVbaListLevel::getAlignment() throw (uno::RuntimeException) { sal_Int16 nAlignment = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Adjust") ) ) >>= nAlignment; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("Adjust") ) >>= nAlignment; switch( nAlignment ) { case text::HoriOrientation::LEFT: @@ -90,17 +90,17 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno: throw uno::RuntimeException(); } } - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Adjust") ), uno::makeAny( nAlignment ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("Adjust"), uno::makeAny( nAlignment ) ); } uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getIndex() throw (uno::RuntimeException) @@ -135,8 +135,8 @@ float SAL_CALL SwVbaListLevel::getNumberPosition() throw (uno::RuntimeException) // indentAt + firstlineindent sal_Int32 nIndentAt = 0; sal_Int32 nFirstLineIndent = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ) ) >>= nFirstLineIndent; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("IndentAt") ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("FirstLineIndent") ) >>= nFirstLineIndent; sal_Int32 nResult = nIndentAt + nFirstLineIndent; @@ -148,16 +148,16 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw ( sal_Int32 nNumberPosition = Millimeter::getInHundredthsOfOneMillimeter( _numberposition ); sal_Int32 nIndentAt = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("IndentAt") ) >>= nIndentAt; sal_Int32 nFirstLineIndent = nNumberPosition - nIndentAt; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ), uno::makeAny( nFirstLineIndent ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("FirstLineIndent"), uno::makeAny( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getNumberStyle() throw (uno::RuntimeException) { sal_Int16 nNumberingType = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingType") ) ) >>= nNumberingType; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("NumberingType") ) >>= nNumberingType; switch( nNumberingType ) { case style::NumberingType::CHAR_SPECIAL: @@ -212,7 +212,7 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw ( } default: { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } } return nNumberingType; @@ -285,11 +285,11 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) throw ( } default: { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } } - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingType") ), uno::makeAny( nNumberingType ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("NumberingType"), uno::makeAny( nNumberingType ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getResetOnHigher() throw (uno::RuntimeException) @@ -306,20 +306,20 @@ void SAL_CALL SwVbaListLevel::setResetOnHigher( ::sal_Int32 /*_resetonhigher*/ ) ::sal_Int32 SAL_CALL SwVbaListLevel::getStartAt() throw (uno::RuntimeException) { sal_Int16 nStartWith = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StartWith") ) ) >>= nStartWith; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("StartWith") ) >>= nStartWith; return nStartWith; } void SAL_CALL SwVbaListLevel::setStartAt( ::sal_Int32 _startat ) throw (uno::RuntimeException) { sal_Int16 nStartWith = (sal_Int16)_startat; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StartWith") ), uno::makeAny( nStartWith ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("StartWith"), uno::makeAny( nStartWith ) ); } float SAL_CALL SwVbaListLevel::getTabPosition() throw (uno::RuntimeException) { sal_Int32 nTabPosition = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition") ) ) >>= nTabPosition; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("ListtabStopPosition") ) >>= nTabPosition; return static_cast< float >( Millimeter::getInPoints( nTabPosition ) ); } @@ -327,14 +327,14 @@ float SAL_CALL SwVbaListLevel::getTabPosition() throw (uno::RuntimeException) void SAL_CALL SwVbaListLevel::setTabPosition( float _tabposition ) throw (uno::RuntimeException) { sal_Int32 nTabPosition = Millimeter::getInHundredthsOfOneMillimeter( _tabposition ); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition") ), uno::makeAny( nTabPosition ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("ListtabStopPosition"), uno::makeAny( nTabPosition ) ); } float SAL_CALL SwVbaListLevel::getTextPosition() throw (uno::RuntimeException) { // indentAt sal_Int32 nIndentAt = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("IndentAt") ) >>= nIndentAt; return static_cast< float >( Millimeter::getInPoints( nIndentAt ) ); } @@ -343,21 +343,21 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) throw (uno: { sal_Int32 nIndentAt = 0; sal_Int32 nFirstLineIndent = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ) ) >>= nFirstLineIndent; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("IndentAt") ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("FirstLineIndent") ) >>= nFirstLineIndent; sal_Int32 nAlignedAt = nIndentAt + nFirstLineIndent; nIndentAt = Millimeter::getInHundredthsOfOneMillimeter( _textposition ); nFirstLineIndent = nAlignedAt - nIndentAt; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ), uno::makeAny( nIndentAt ) ); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ), uno::makeAny( nFirstLineIndent ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("IndentAt"), uno::makeAny( nIndentAt ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("FirstLineIndent"), uno::makeAny( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getTrailingCharacter() throw (uno::RuntimeException) { sal_Int16 nLabelFollowedBy= 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LabelFollowedBy") ) ) >>= nLabelFollowedBy; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("LabelFollowedBy") ) >>= nLabelFollowedBy; return nLabelFollowedBy; } @@ -365,13 +365,13 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) throw (uno: void SAL_CALL SwVbaListLevel::setTrailingCharacter( ::sal_Int32 _trailingcharacter ) throw (uno::RuntimeException) { sal_Int16 nLabelFollowedBy = (sal_Int16)_trailingcharacter; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LabelFollowedBy") ), uno::makeAny( nLabelFollowedBy ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString("LabelFollowedBy"), uno::makeAny( nLabelFollowedBy ) ); } rtl::OUString SwVbaListLevel::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaListLevel")); + return rtl::OUString("SwVbaListLevel"); } uno::Sequence< rtl::OUString > @@ -381,7 +381,7 @@ SwVbaListLevel::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListLevel" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.ListLevel" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx index 8201c7eb91ff..470e5763cdb9 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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); return uno::makeAny( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) ); } @@ -90,7 +90,7 @@ SwVbaListLevels::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaListLevels::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaListLevels")); + return rtl::OUString("SwVbaListLevels"); } css::uno::Sequence<rtl::OUString> @@ -100,7 +100,7 @@ SwVbaListLevels::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListLevels") ); + sNames[0] = rtl::OUString("ooo.vba.word.ListLevels"); } return sNames; } diff --git a/sw/source/ui/vba/vbalisttemplate.cxx b/sw/source/ui/vba/vbalisttemplate.cxx index b714196c17fc..485a5278398b 100644 --- a/sw/source/ui/vba/vbalisttemplate.cxx +++ b/sw/source/ui/vba/vbalisttemplate.cxx @@ -45,13 +45,13 @@ 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingRules") ) , uno::makeAny( xNumberingRules ) ); + xProps->setPropertyValue( rtl::OUString("NumberingRules") , uno::makeAny( xNumberingRules ) ); } rtl::OUString SwVbaListTemplate::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaListTemplate")); + return rtl::OUString("SwVbaListTemplate"); } uno::Sequence< rtl::OUString > @@ -61,7 +61,7 @@ SwVbaListTemplate::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListTemplate" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.ListTemplate" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx index aad1e8270192..01b56c27a33d 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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); return uno::makeAny( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) ); } @@ -84,7 +84,7 @@ SwVbaListTemplates::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaListTemplates::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaListTemplates")); + return rtl::OUString("SwVbaListTemplates"); } css::uno::Sequence<rtl::OUString> @@ -94,7 +94,7 @@ SwVbaListTemplates::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListTemplates") ); + sNames[0] = rtl::OUString("ooo.vba.word.ListTemplates"); } return sNames; } diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index f8c5dd998760..898c7939e740 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -45,39 +45,39 @@ SwVbaOptions::DefaultFilePath( sal_Int32 _path ) throw ( uno::RuntimeException ) { case word::WdDefaultFilePath::wdDocumentsPath: { - msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work") ); + msDefaultFilePath = rtl::OUString("Work"); break; } case word::WdDefaultFilePath::wdPicturesPath: { - msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Gallery") ); + msDefaultFilePath = rtl::OUString("Gallery"); break; } case word::WdDefaultFilePath::wdUserTemplatesPath: case word::WdDefaultFilePath::wdWorkgroupTemplatesPath: { - msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Template") ); + msDefaultFilePath = rtl::OUString("Template"); break; } case word::WdDefaultFilePath::wdStartupPath: { - msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Addin") ); + msDefaultFilePath = rtl::OUString("Addin"); break; } case word::WdDefaultFilePath::wdUserOptionsPath: { - msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserConfig") ); + msDefaultFilePath = rtl::OUString("UserConfig"); break; } case word::WdDefaultFilePath::wdToolsPath: case word::WdDefaultFilePath::wdProgramPath: { - msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Module") ); + msDefaultFilePath = rtl::OUString("Module"); break; } case word::WdDefaultFilePath::wdTempFilePath: { - msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Temp") ); + msDefaultFilePath = rtl::OUString("Temp"); break; } default: @@ -95,7 +95,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value ) value >>= sNewPath; rtl::OUString sNewPathUrl; ::osl::File::getFileURLFromSystemPath( sNewPath, sNewPathUrl ); - uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")) ), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW ); rtl::OUString sOldPathUrl; xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sOldPathUrl; // path could be a multipath, Microsoft doesn't support this feature in Word currently @@ -110,7 +110,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value ) uno::Any SwVbaOptions::getValueEvent() { - uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")) ), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW ); rtl::OUString sPathUrl; xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sPathUrl; // path could be a multipath, Microsoft doesn't support this feature in Word currently @@ -258,7 +258,7 @@ void SAL_CALL SwVbaOptions::setAutoFormatApplyBulletedLists( ::sal_Bool /*_autof rtl::OUString SwVbaOptions::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaOptions")); + return rtl::OUString("SwVbaOptions"); } uno::Sequence< rtl::OUString > @@ -268,7 +268,7 @@ SwVbaOptions::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Options" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Options" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 9c747b041200..ffa2c69cf1bb 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn; + mxPageProps->getPropertyValue( rtl::OUString("HeaderIsOn")) >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn; + mxPageProps->getPropertyValue( rtl::OUString("HeaderIsOn")) >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue( rtl::OUString("HeaderIsOn"), uno::makeAny( sal_True ) ); - mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin"))) >>= aktTopMargin; - mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance"))) >>= aktSpacing; - mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight"))) >>= aktHeaderHeight; + mxPageProps->getPropertyValue( rtl::OUString("TopMargin")) >>= aktTopMargin; + mxPageProps->getPropertyValue( rtl::OUString("HeaderBodyDistance")) >>= aktSpacing; + mxPageProps->getPropertyValue( rtl::OUString("HeaderHeight")) >>= aktHeaderHeight; sal_Int32 newSpacing = aktSpacing - ( newHeaderDistance - aktTopMargin ); sal_Int32 height = aktHeaderHeight - aktSpacing; sal_Int32 newHeaderHeight = newSpacing + height; - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), uno::makeAny( newHeaderDistance ) ); - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance")), uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")), uno::makeAny( newHeaderHeight ) ); + mxPageProps->setPropertyValue( rtl::OUString("TopMargin"), uno::makeAny( newHeaderDistance ) ); + mxPageProps->setPropertyValue( rtl::OUString("HeaderBodyDistance"), uno::makeAny( newSpacing ) ); + mxPageProps->setPropertyValue( rtl::OUString("HeaderHeight"), uno::makeAny( newHeaderHeight ) ); } double SAL_CALL SwVbaPageSetup::getFooterDistance() throw (uno::RuntimeException) { sal_Bool isFooterOn = sal_False; - mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isFooterOn; + mxPageProps->getPropertyValue( rtl::OUString("FooterIsOn")) >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isFooterOn; + mxPageProps->getPropertyValue( rtl::OUString("FooterIsOn")) >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue( rtl::OUString("FooterIsOn"), uno::makeAny( sal_True ) ); - mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin"))) >>= aktBottomMargin; - mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance"))) >>= aktSpacing; - mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight"))) >>= aktFooterHeight; + mxPageProps->getPropertyValue( rtl::OUString("BottomMargin")) >>= aktBottomMargin; + mxPageProps->getPropertyValue( rtl::OUString("FooterBodyDistance")) >>= aktSpacing; + mxPageProps->getPropertyValue( rtl::OUString("FooterHeight")) >>= aktFooterHeight; sal_Int32 newSpacing = aktSpacing - ( newFooterDistance - aktBottomMargin ); sal_Int32 height = aktFooterHeight - aktSpacing; sal_Int32 newFooterHeight = newSpacing + height; - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), uno::makeAny( newFooterDistance ) ); - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance")), uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")), uno::makeAny( newFooterHeight ) ); + mxPageProps->setPropertyValue( rtl::OUString("BottomMargin"), uno::makeAny( newFooterDistance ) ); + mxPageProps->setPropertyValue( rtl::OUString("FooterBodyDistance"), uno::makeAny( newSpacing ) ); + mxPageProps->setPropertyValue( rtl::OUString("FooterHeight"), uno::makeAny( newFooterHeight ) ); } sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException) @@ -149,32 +149,32 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status rtl::OUString newStyle; if( status ) - newStyle = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("First Page") ); + newStyle = rtl::OUString("First Page"); else - newStyle = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ); + newStyle = rtl::OUString("Standard"); uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); sal_Int32 nTopMargin = 0; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin"))) >>= nTopMargin; + xStyleProps->getPropertyValue( rtl::OUString("TopMargin")) >>= nTopMargin; sal_Int32 nBottomMargin = 0; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin"))) >>= nBottomMargin; + xStyleProps->getPropertyValue( rtl::OUString("BottomMargin")) >>= nBottomMargin; sal_Int32 nLeftMargin = 0; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin"))) >>= nLeftMargin; + xStyleProps->getPropertyValue( rtl::OUString("LeftMargin")) >>= nLeftMargin; sal_Int32 nRightMargin = 0; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin"))) >>= nRightMargin; + xStyleProps->getPropertyValue( rtl::OUString("RightMargin")) >>= nRightMargin; sal_Int32 nHeaderHeight = 0; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight"))) >>= nHeaderHeight; + xStyleProps->getPropertyValue( rtl::OUString("HeaderHeight")) >>= nHeaderHeight; sal_Int32 nFooterHeight = 0; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight"))) >>= nFooterHeight; + xStyleProps->getPropertyValue( rtl::OUString("FooterHeight")) >>= nFooterHeight; sal_Bool isHeaderOn = sal_False; - xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn; + xStyleProps->getPropertyValue( rtl::OUString("HeaderIsOn")) >>= isHeaderOn; if( isHeaderOn ) { nTopMargin += nHeaderHeight; nBottomMargin += nFooterHeight; - xStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_False ) ); - xStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_False ) ); + xStyleProps->setPropertyValue( rtl::OUString("HeaderIsOn"), uno::makeAny( sal_False ) ); + xStyleProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( rtl::OUString("TextTable") ), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ), uno::makeAny( newStyle ) ); + xTableProps->setPropertyValue( rtl::OUString("PageDescName"), uno::makeAny( newStyle ) ); } else { - xCursorProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ), uno::makeAny( newStyle ) ); + xCursorProps->setPropertyValue( rtl::OUString("PageDescName"), uno::makeAny( newStyle ) ); } uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); - xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ), uno::makeAny( nTopMargin ) ); - xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin") ), uno::makeAny( nBottomMargin ) ); - xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ), uno::makeAny( nLeftMargin ) ); - xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ), uno::makeAny( nRightMargin ) ); + xFirstPageProps->setPropertyValue( rtl::OUString("TopMargin"), uno::makeAny( nTopMargin ) ); + xFirstPageProps->setPropertyValue( rtl::OUString("BottomMargin"), uno::makeAny( nBottomMargin ) ); + xFirstPageProps->setPropertyValue( rtl::OUString("LeftMargin"), uno::makeAny( nLeftMargin ) ); + xFirstPageProps->setPropertyValue( rtl::OUString("RightMargin"), uno::makeAny( nRightMargin ) ); } rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException) @@ -210,14 +210,14 @@ rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException } uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( rtl::OUString("TextTable") ), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ) ) >>= styleFirstPage; + xTableProps->getPropertyValue( rtl::OUString("PageDescName") ) >>= styleFirstPage; } else { - xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ) ) >>= styleFirstPage; + xCursorProps->getPropertyValue( rtl::OUString("PageDescName") ) >>= styleFirstPage; } return styleFirstPage; } @@ -246,7 +246,7 @@ void SAL_CALL SwVbaPageSetup::setSectionStart( ::sal_Int32 /*_sectionstart*/ ) t rtl::OUString SwVbaPageSetup::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaPageSetup")); + return rtl::OUString("SwVbaPageSetup"); } uno::Sequence< rtl::OUString > @@ -256,7 +256,7 @@ SwVbaPageSetup::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.PageSetup" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.PageSetup" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx index 198d6706d541..f0e8e35bc3b7 100644 --- a/sw/source/ui/vba/vbapane.cxx +++ b/sw/source/ui/vba/vbapane.cxx @@ -43,14 +43,14 @@ SwVbaPane::View() throw ( css::uno::RuntimeException ) void SAL_CALL SwVbaPane::Close( ) throw ( css::uno::RuntimeException ) { - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CloseWin")); + rtl::OUString url = rtl::OUString( ".uno:CloseWin"); dispatchRequests( mxModel,url ); } rtl::OUString SwVbaPane::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaPane")); + return rtl::OUString("SwVbaPane"); } uno::Sequence< rtl::OUString > @@ -60,7 +60,7 @@ SwVbaPane::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Pane" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Pane" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx index beb3543713a1..d3a62629a915 100644 --- a/sw/source/ui/vba/vbapanes.cxx +++ b/sw/source/ui/vba/vbapanes.cxx @@ -99,7 +99,7 @@ SwVbaPanes::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaPanes::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaPanes")); + return rtl::OUString("SwVbaPanes"); } css::uno::Sequence<rtl::OUString> @@ -109,7 +109,7 @@ SwVbaPanes::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Panes") ); + sNames[0] = rtl::OUString("ooo.vba.word.Panes"); } return sNames; } diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index 0c8dd49d8d74..1618a1167555 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -57,7 +57,7 @@ SwVbaParagraph::setStyle( const uno::Any& style ) throw ( uno::RuntimeException rtl::OUString SwVbaParagraph::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraph")); + return rtl::OUString("SwVbaParagraph"); } uno::Sequence< rtl::OUString > @@ -67,7 +67,7 @@ SwVbaParagraph::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Paragraph" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Paragraph" ); } return aServiceNames; } @@ -100,7 +100,7 @@ public: while( xParEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Paragraph") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Paragraph") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString("com.sun.star.text.Paragraph") ) ) { if( Index == nCount ) return uno::makeAny( xServiceInfo ); @@ -160,7 +160,7 @@ SwVbaParagraphs::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaParagraphs::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraphs")); + return rtl::OUString("SwVbaParagraphs"); } css::uno::Sequence<rtl::OUString> @@ -170,7 +170,7 @@ SwVbaParagraphs::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Paragraphs") ); + sNames[0] = rtl::OUString("ooo.vba.word.Paragraphs"); } return sNames; } diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 34e60ff317fa..2caa2e64001c 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaAdjust") ) ) >>= aParaAdjust; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaAdjust") ), uno::makeAny( aParaAdjust ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaAdjust"), uno::makeAny( aParaAdjust ) ); } float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() throw (uno::RuntimeException) { sal_Int32 indent = 0; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaFirstLineIndent") ) ) >>= indent; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaFirstLineIndent") ), uno::makeAny( indent ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaFirstLineIndent"), uno::makeAny( indent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() throw (uno::RuntimeException) { sal_Bool bKeep = sal_False; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaKeepTogether") ) ) >>= bKeep; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaKeepTogether") ), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaSplit") ) ) >>= bKeep; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaSplit") ), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation") ) ) >>= bHypn; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation") ), uno::makeAny( bHypn ) ); + mxParaProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ) ) >>= aLineSpacing; + mxParaProps->getPropertyValue( rtl::OUString("ParaLineSpacing") ) >>= aLineSpacing; return getMSWordLineSpacing( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacing( float _linespacing ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ) ) >>= aLineSpacing; + mxParaProps->getPropertyValue( rtl::OUString("ParaLineSpacing") ) >>= aLineSpacing; aLineSpacing = getOOoLineSpacing( _linespacing, aLineSpacing.Mode ); - mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); } sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ) ) >>= aLineSpacing; + mxParaProps->getPropertyValue( rtl::OUString("ParaLineSpacing") ) >>= aLineSpacing; return getMSWordLineSpacingRule( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingrule ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing = getOOoLineSpacingFromRule( _linespacingrule ); - mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() throw (uno::RuntimeException) { sal_Bool noLineNum = sal_False; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineNumberCount") ) ) >>= noLineNum; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineNumberCount") ), uno::makeAny( noLineNum ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaLineNumberCount"), uno::makeAny( noLineNum ) ); } else { @@ -183,8 +183,8 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() throw (uno::RuntimeEx { sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText; rtl::OUString aHeading; - const rtl::OUString HEADING = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Heading") ); - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aHeading; + const rtl::OUString HEADING = rtl::OUString("Heading"); + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ) ) >>= aBreakType; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ) ) >>= aBreakType; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ), uno::makeAny( aBreakType ) ); + mxParaProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTopMargin") ) ) >>= nSpace; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTopMargin") ), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaTopMargin"), uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() throw (uno::RuntimeException) { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaBottomMargin") ) ) >>= nSpace; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaBottomMargin") ), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaBottomMargin"), uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getLeftIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLeftMargin") ) ) >>= nIndent; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLeftMargin") ), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaLeftMargin"), uno::makeAny( nIndent ) ); } float SAL_CALL SwVbaParagraphFormat::getRightIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaRightMargin") ) ) >>= nIndent; + mxParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaRightMargin") ), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaRightMargin"), uno::makeAny( nIndent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeException) @@ -297,16 +297,16 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeExcepti void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException) { sal_Bool bWidow = sal_False; sal_Int8 nWidow = 0; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaWidows") ) ) >>= nWidow; + mxParaProps->getPropertyValue( rtl::OUString("ParaWidows") ) >>= nWidow; sal_Int8 nOrphan = 0; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaOrphans") ) ) >>= nOrphan; + mxParaProps->getPropertyValue( rtl::OUString("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. bWidow = ( nWidow > 1 && nOrphan == nWidow ); @@ -321,8 +321,8 @@ void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontr if( _widowcontrol >>= bWidow ) { sal_Int8 nControl = bWidow? 2:1; - mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaWidows") ), uno::makeAny( nControl ) ); - mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaOrphans") ), uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaWidows"), uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue( rtl::OUString("ParaOrphans"), uno::makeAny( nControl ) ); } else { @@ -478,7 +478,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing& rL sal_Int16 SwVbaParagraphFormat::getCharHeight() throw (uno::RuntimeException) { float fCharHeight = 0.0; - mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharHeight") ) ) >>= fCharHeight; + mxParaProps->getPropertyValue( rtl::OUString("CharHeight") ) >>= fCharHeight; return (sal_Int16)( Millimeter::getInHundredthsOfOneMillimeter( fCharHeight ) ); } @@ -551,7 +551,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordAlignment( sal_Int32 _alignment ) rtl::OUString SwVbaParagraphFormat::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraphFormat")); + return rtl::OUString("SwVbaParagraphFormat"); } uno::Sequence< rtl::OUString > @@ -561,7 +561,7 @@ SwVbaParagraphFormat::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ParagraphFormat" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.ParagraphFormat" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index aeb8cce9a75e..9553b343aa36 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fails to create text cursor") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ), uno::makeAny( eBreakType ) ); + xProp->setPropertyValue( rtl::OUString("BreakType"), uno::makeAny( eBreakType ) ); } } @@ -223,7 +223,7 @@ SwVbaRange::Select() throw ( uno::RuntimeException ) void SAL_CALL SwVbaRange::InsertParagraph() throw ( uno::RuntimeException ) { - mxTextCursor->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); + mxTextCursor->setString( rtl::OUString("") ); InsertParagraphBefore(); } @@ -252,19 +252,19 @@ SwVbaRange::getParagraphFormat() throw ( uno::RuntimeException ) void SAL_CALL SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) throw ( uno::RuntimeException ) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } void SwVbaRange::GetStyleInfo(rtl::OUString& aStyleName, rtl::OUString& aStyleType ) throw ( uno::RuntimeException ) { uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") ) ) >>= aStyleName ) && !aStyleName.isEmpty() ) + if( ( xProp->getPropertyValue( rtl::OUString("CharStyleName") ) >>= aStyleName ) && !aStyleName.isEmpty() ) { - aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") ); + aStyleType = rtl::OUString("CharacterStyles"); } - else if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aStyleName ) && !aStyleName.isEmpty() ) + else if( ( xProp->getPropertyValue( rtl::OUString("ParaStyleName") ) >>= aStyleName ) && !aStyleName.isEmpty() ) { - aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") ); + aStyleType = rtl::OUString("ParagraphStyles"); } if( aStyleType.isEmpty() ) { @@ -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 ); rtl::OUString aPageStyleName; - xParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName; + xParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( rtl::OUString("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 ) ) ); } @@ -410,7 +410,7 @@ SwVbaRange::Fields( const uno::Any& index ) throw (uno::RuntimeException) rtl::OUString SwVbaRange::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaRange")); + return rtl::OUString("SwVbaRange"); } uno::Sequence< rtl::OUString > @@ -420,7 +420,7 @@ SwVbaRange::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Range" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Range" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbareplacement.cxx b/sw/source/ui/vba/vbareplacement.cxx index 570404e985fd..b983613b1bf7 100644 --- a/sw/source/ui/vba/vbareplacement.cxx +++ b/sw/source/ui/vba/vbareplacement.cxx @@ -51,7 +51,7 @@ void SAL_CALL SwVbaReplacement::ClearFormatting( ) throw (uno::RuntimeException) rtl::OUString SwVbaReplacement::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaReplacement")); + return rtl::OUString("SwVbaReplacement"); } uno::Sequence< rtl::OUString > @@ -61,7 +61,7 @@ SwVbaReplacement::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Replacement" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Replacement" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbarevision.cxx b/sw/source/ui/vba/vbarevision.cxx index 4d10b7017d89..05fb97c765f9 100644 --- a/sw/source/ui/vba/vbarevision.cxx +++ b/sw/source/ui/vba/vbarevision.cxx @@ -76,7 +76,7 @@ SwVbaRevision::Reject( ) throw ( css::uno::RuntimeException ) rtl::OUString SwVbaRevision::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaRevision")); + return rtl::OUString("SwVbaRevision"); } uno::Sequence< rtl::OUString > @@ -86,7 +86,7 @@ SwVbaRevision::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Revision" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Revision" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbarevisions.cxx b/sw/source/ui/vba/vbarevisions.cxx index 94e3051da2ac..5f240b5bb129 100644 --- a/sw/source/ui/vba/vbarevisions.cxx +++ b/sw/source/ui/vba/vbarevisions.cxx @@ -160,7 +160,7 @@ void SAL_CALL SwVbaRevisions::RejectAll( ) throw (css::uno::RuntimeException) rtl::OUString SwVbaRevisions::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaRevisions")); + return rtl::OUString("SwVbaRevisions"); } css::uno::Sequence<rtl::OUString> @@ -170,7 +170,7 @@ SwVbaRevisions::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Revisions") ); + sNames[0] = rtl::OUString("ooo.vba.word.Revisions"); } return sNames; } diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx index fc633777d7b0..333611dc84de 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ) ) >>= nHeight; + mxRowProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ), uno::makeAny( nHeight ) ); + mxRowProps->setPropertyValue( rtl::OUString("Height"), uno::makeAny( nHeight ) ); } ::sal_Int32 SAL_CALL SwVbaRow::getHeightRule() throw (css::uno::RuntimeException) { sal_Bool isAutoHeight = sal_False; - mxRowProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoHeight") ) ) >>= isAutoHeight; + mxRowProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoHeight") ), uno::makeAny( isAutoHeight ) ); + mxRowProps->setPropertyValue( rtl::OUString("IsAutoHeight"), uno::makeAny( isAutoHeight ) ); } void SAL_CALL @@ -107,7 +107,7 @@ void SAL_CALL SwVbaRow::SetHeight( float height, sal_Int32 heightrule ) throw (c rtl::OUString SwVbaRow::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaRow")); + return rtl::OUString("SwVbaRow"); } uno::Sequence< rtl::OUString > @@ -117,7 +117,7 @@ SwVbaRow::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Row" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Row" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index a17be11101af..d479834c9ae4 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HoriOrient") ) ) >>= nAlignment; + xTableProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HoriOrient") ), uno::makeAny( nAlignment ) ); + xTableProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsSplitAllowed") ) ) >>= bSplit; + xRowProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsSplitAllowed") ), uno::makeAny( bAllowBreak ) ); + xRowProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorderDistance") ) ) >>= nLeftBorderDistance; - xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorderDistance") ) ) >>= nRightBorderDistance; + xCellProps->getPropertyValue( rtl::OUString("LeftBorderDistance") ) >>= nLeftBorderDistance; + xCellProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorderDistance") ), uno::makeAny( nSpace ) ); - xCellProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorderDistance") ), uno::makeAny( nSpace ) ); + xCellProps->setPropertyValue( rtl::OUString("LeftBorderDistance"), uno::makeAny( nSpace ) ); + xCellProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ) ) >>= nMargin; + xTableProps->getPropertyValue( rtl::OUString("LeftMargin") ) >>= nMargin; nMargin += indent; - xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ), uno::makeAny( nMargin ) ); + xTableProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nWidth; + xTableProps->getPropertyValue( rtl::OUString("Width") ) >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; if ((nNewWidth <= 0) || (nWidth <= 0)) { @@ -283,7 +283,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ), uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue( rtl::OUString("Width"), uno::makeAny( nNewWidth ) ); } void SwVbaRows::setIndentWithAdjustSameWidth( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException) @@ -291,7 +291,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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nWidth; + xTableProps->getPropertyValue( rtl::OUString("Width") ) >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; // get all columns, calculate and set the new width of the columns @@ -306,7 +306,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ), uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue( rtl::OUString("Width"), uno::makeAny( nNewWidth ) ); } void SAL_CALL SwVbaRows::Select( ) throw (uno::RuntimeException) @@ -326,11 +326,11 @@ uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException( ::rtl::OUString("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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); } // XEnumerationAccess @@ -354,7 +354,7 @@ SwVbaRows::createCollectionObject( const uno::Any& aSource ) rtl::OUString SwVbaRows::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaRows")); + return rtl::OUString("SwVbaRows"); } uno::Sequence<rtl::OUString> @@ -364,7 +364,7 @@ SwVbaRows::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Rows") ); + sNames[0] = rtl::OUString("ooo.vba.word.Rows"); } return sNames; } diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx index 662e2212740f..925472b9d496 100644 --- a/sw/source/ui/vba/vbasection.cxx +++ b/sw/source/ui/vba/vbasection.cxx @@ -68,7 +68,7 @@ SwVbaSection::PageSetup( ) throw (uno::RuntimeException) rtl::OUString SwVbaSection::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaSection")); + return rtl::OUString("SwVbaSection"); } uno::Sequence< rtl::OUString > @@ -78,7 +78,7 @@ SwVbaSection::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Section" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Section" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index a119f4230e4b..f996815dc543 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("There is no section") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("There is no section"), uno::Reference< uno::XInterface >() ); } // XEnumerationAccess @@ -174,7 +174,7 @@ SwVbaSections::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaSections::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaSections")); + return rtl::OUString("SwVbaSections"); } css::uno::Sequence<rtl::OUString> @@ -184,7 +184,7 @@ SwVbaSections::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Sections") ); + sNames[0] = rtl::OUString("ooo.vba.word.Sections"); } return sNames; } diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 9e81400347f0..62ad26645a83 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextRanges") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } } } @@ -215,11 +215,11 @@ SwVbaSelection::Delete( const uno::Any& _unit, const uno::Any& _count ) throw ( } default: { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } } } - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Delete")); + rtl::OUString url = rtl::OUString( ".uno:Delete"); dispatchRequests( mxModel,url ); } @@ -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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable; + xCursorProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable; - xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cell") ) ) >>= xCell; + xCursorProps->getPropertyValue( rtl::OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue( rtl::OUString("Cell") ) >>= xCell; if( !xTextTable.is() || !xCell.is() ) { DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::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 ); rtl::OUString aCellName; - xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellName") ) ) >>= aCellName; + xCellProps->getPropertyValue( rtl::OUString("CellName") ) >>= aCellName; uno::Reference< text::XTextTableCursor > xTextTableCursor = xTextTable->createCursorByCellName( aCellName ); // move the table cursor switch( eDirection ) @@ -548,7 +548,7 @@ SwVbaSelection::getFont() throw ( uno::RuntimeException ) void SAL_CALL SwVbaSelection::TypeBackspace() throw ( uno::RuntimeException ) { - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SwBackspace")); + rtl::OUString url = rtl::OUString( ".uno:SwBackspace"); dispatchRequests( mxModel,url ); } @@ -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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); break; } default: - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable; + xCursorProps->getPropertyValue( rtl::OUString("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 ); rtl::OUString aPageStyleName; - xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName; + xCursorProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable; + xCursorProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable; + xCursorProps->getPropertyValue( rtl::OUString("TextTable") ) >>= xTextTable; return xTextTable; } @@ -981,7 +981,7 @@ void SwVbaSelection::GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable; + xCursorProps->getPropertyValue( rtl::OUString("TextTable") ) >>= xTextTable; if( !xTextTable.is() ) throw uno::RuntimeException( ); @@ -998,13 +998,13 @@ void SwVbaSelection::GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString if( sTLName.isEmpty() ) { uno::Reference< table::XCell > xCell; - xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cell") ) ) >>= xCell; + xCursorProps->getPropertyValue( rtl::OUString("Cell") ) >>= xCell; if( !xCell.is() ) { throw uno::RuntimeException( ); } uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW ); - xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellName") ) ) >>= sTLName; + xCellProps->getPropertyValue( rtl::OUString("CellName") ) >>= sTLName; } } @@ -1041,7 +1041,7 @@ uno::Any SAL_CALL SwVbaSelection::Cells( const uno::Any& index ) throw (uno::Run void SAL_CALL SwVbaSelection::Copy( ) throw (uno::RuntimeException) { - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Copy")); + rtl::OUString url = rtl::OUString( ".uno:Copy"); dispatchRequests( mxModel,url ); } @@ -1053,7 +1053,7 @@ void SAL_CALL SwVbaSelection::CopyAsPicture( ) throw (uno::RuntimeException) void SAL_CALL SwVbaSelection::Paste( ) throw (uno::RuntimeException) { - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Paste")); + rtl::OUString url = rtl::OUString( ".uno:Paste"); dispatchRequests( mxModel,url ); } @@ -1101,7 +1101,7 @@ void SAL_CALL SwVbaSelection::WholeStory( ) throw (uno::RuntimeException) // insert an empty line uno::Reference< text::XTextRange > xFirstCellRange = word::getFirstObjectPosition( xText ); mxTextViewCursor->gotoRange( xFirstCellRange, sal_False ); - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertPara")); + rtl::OUString url = rtl::OUString( ".uno:InsertPara"); dispatchRequests( mxModel,url ); } } @@ -1165,7 +1165,7 @@ SwVbaSelection::Paragraphs( const uno::Any& aIndex ) throw (uno::RuntimeExceptio rtl::OUString SwVbaSelection::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaSelection")); + return rtl::OUString("SwVbaSelection"); } uno::Sequence< rtl::OUString > @@ -1175,7 +1175,7 @@ SwVbaSelection::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Selection" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Selection" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index 2890700495d0..28f09cc38ea7 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharLocale") ) ) >>= aLocale; + xTCProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharLocale") ), uno::makeAny( aLocale ) ) ; + xTCProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.ParagraphStyle") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString("com.sun.star.style.ParagraphStyle") ) ) nType = word::WdStyleType::wdStyleTypeParagraph; - else if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.CharacterStyle") ) ) ) + else if( xServiceInfo->supportsService( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ), uno::makeAny( sStyle ) ); + xParaProps->setPropertyValue( rtl::OUString("ParaStyleName"), uno::makeAny( sStyle ) ); return; } @@ -116,13 +116,13 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro ::rtl::OUString SAL_CALL SwVbaStyle::getNameLocal() throw (uno::RuntimeException) { rtl::OUString sNameLocal; - mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DisplayName") ) ) >>= sNameLocal; + mxStyleProps->getPropertyValue( rtl::OUString("DisplayName") ) >>= sNameLocal; return sNameLocal; } void SAL_CALL SwVbaStyle::setNameLocal( const ::rtl::OUString& _namelocal ) throw (uno::RuntimeException) { - mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DisplayName") ), uno::makeAny( _namelocal ) ); + mxStyleProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoUpdate") ) ) >>= isAutoUpdate; + mxStyleProps->getPropertyValue( rtl::OUString("IsAutoUpdate") ) >>= isAutoUpdate; return isAutoUpdate; } void SAL_CALL SwVbaStyle::setAutomaticallyUpdate( ::sal_Bool _automaticallyupdate ) throw (uno::RuntimeException) { - mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoUpdate") ), uno::makeAny( _automaticallyupdate ) ); + mxStyleProps->setPropertyValue( rtl::OUString("IsAutoUpdate"), uno::makeAny( _automaticallyupdate ) ); } uno::Any SAL_CALL SwVbaStyle::getBaseStyle() throw (uno::RuntimeException) { // ParentStyle rtl::OUString sBaseStyle; - mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParentStyle") ) ) >>= sBaseStyle; + mxStyleProps->getPropertyValue( rtl::OUString("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() ) { rtl::OUString sBaseStyle = xStyle->getName(); - mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParentStyle") ), uno::makeAny( sBaseStyle ) ); + mxStyleProps->setPropertyValue( rtl::OUString("ParentStyle"), uno::makeAny( sBaseStyle ) ); } else { @@ -185,7 +185,7 @@ uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() throw (uno::RuntimeExcepti { //FollowStyle rtl::OUString sFollowStyle; - mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FollowStyle") ) ) >>= sFollowStyle; + mxStyleProps->getPropertyValue( rtl::OUString("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() ) { rtl::OUString sFollowStyle = xStyle->getName(); - mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FollowStyle") ), uno::makeAny( sFollowStyle ) ); + mxStyleProps->setPropertyValue( rtl::OUString("FollowStyle"), uno::makeAny( sFollowStyle ) ); } else { @@ -215,14 +215,14 @@ void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphs ::sal_Int32 SAL_CALL SwVbaStyle::getListLevelNumber() throw (uno::RuntimeException) { sal_Int16 nNumberingLevel = 0; - mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingLevel") ) ) >>= nNumberingLevel; + mxStyleProps->getPropertyValue( rtl::OUString("NumberingLevel") ) >>= nNumberingLevel; return nNumberingLevel; } rtl::OUString SwVbaStyle::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaStyle")); + return rtl::OUString("SwVbaStyle"); } uno::Sequence< rtl::OUString > @@ -232,7 +232,7 @@ SwVbaStyle::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.XStyle" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.XStyle" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx index 63b1e89b6153..a71e0aa09ff1 100644 --- a/sw/source/ui/vba/vbastyle.hxx +++ b/sw/source/ui/vba/vbastyle.hxx @@ -63,7 +63,7 @@ public: virtual ::sal_Int32 SAL_CALL getListLevelNumber() throw (css::uno::RuntimeException); //XDefaultProperty - virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")); } + virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return rtl::OUString("Name"); } // XHelperInterface virtual rtl::OUString getServiceImplName(); diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index 75fae93c2d9b..66d055359635 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") ) ), uno::UNO_QUERY_THROW ); + mxParaStyles.set( xStyleFamilies->getByName( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } }; @@ -310,18 +310,18 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno:: case word::WdStyleType::wdStyleTypeParagraph: case word::WdStyleType::wdStyleTypeTable: { - aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") ); + aStyleType = rtl::OUString("ParagraphStyles"); break; } case word::WdStyleType::wdStyleTypeCharacter: { - aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") ); + aStyleType = rtl::OUString("CharacterStyles"); break; } case word::WdStyleType::wdStyleTypeList: { // should use Paragraph style and set the property "NumberingStyleName" - aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") ); + aStyleType = rtl::OUString("ParagraphStyles"); break; } default: @@ -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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName") ), uno::makeAny( aStyleName ) ); + xStyleProps->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } } } @@ -351,7 +351,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno:: rtl::OUString SwVbaStyles::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaStyles")); + return rtl::OUString("SwVbaStyles"); } uno::Sequence< rtl::OUString > @@ -361,7 +361,7 @@ SwVbaStyles::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.XStyles" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.XStyles" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 5528a8e15974..dc690fd77d25 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -118,8 +118,7 @@ uno::Any PrivateProfileStringListener::getValueEvent() return uno::makeAny( sValue ); #else - throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Only support on Windows")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Only support on Windows"), uno::Reference< uno::XInterface >() ); #endif } @@ -162,8 +161,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) } return; #else - throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Not implemented")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); #endif } @@ -231,8 +229,7 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) break; } default: - throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("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 } @@ -270,7 +267,7 @@ SwVbaSystem::PrivateProfileString( const rtl::OUString& rFilename, const rtl::OU rtl::OUString SwVbaSystem::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaSystem")); + return rtl::OUString("SwVbaSystem"); } uno::Sequence< rtl::OUString > @@ -280,7 +277,7 @@ SwVbaSystem::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.System" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.System" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx index ff7b9522eea9..f421ffdbbb9b 100644 --- a/sw/source/ui/vba/vbatable.cxx +++ b/sw/source/ui/vba/vbatable.cxx @@ -120,7 +120,7 @@ SwVbaTable::Columns( const uno::Any& index ) throw (uno::RuntimeException) rtl::OUString SwVbaTable::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaTable")); + return rtl::OUString("SwVbaTable"); } uno::Sequence<rtl::OUString> @@ -130,7 +130,7 @@ SwVbaTable::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Table" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Table" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 5dd92266405a..7d7029333fe8 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsWidthRelative") ) ) >>= isWidthRelatvie; + xTableProps->getPropertyValue( rtl::OUString("IsWidthRelative") ) >>= isWidthRelatvie; if( isWidthRelatvie ) { - xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RelativeWidth") ) ) >>= nWidth; + xTableProps->getPropertyValue( rtl::OUString("RelativeWidth") ) >>= nWidth; } else { - xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nWidth; + xTableProps->getPropertyValue( rtl::OUString("Width") ) >>= nWidth; } return nWidth; } diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx index dd02d6f30623..2eb70b88b254 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(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Level") ) ) >>= nLevel; + mxTocProps->getPropertyValue(rtl::OUString("Level") ) >>= nLevel; return nLevel; } void SAL_CALL SwVbaTableOfContents::setLowerHeadingLevel( ::sal_Int32 _lowerheadinglevel ) throw (uno::RuntimeException) { - mxTocProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Level") ), uno::makeAny( sal_Int8( _lowerheadinglevel ) ) ); + mxTocProps->setPropertyValue( rtl::OUString("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(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromMarks") ) ) >>= bUseFields; + mxTocProps->getPropertyValue(rtl::OUString("CreateFromMarks") ) >>= bUseFields; return bUseFields; } void SAL_CALL SwVbaTableOfContents::setUseFields( ::sal_Bool _useFields ) throw (css::uno::RuntimeException) { - mxTocProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromMarks") ), uno::makeAny( _useFields ) ); + mxTocProps->setPropertyValue( rtl::OUString("CreateFromMarks"), uno::makeAny( _useFields ) ); } ::sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() throw (css::uno::RuntimeException) { sal_Bool bUseOutlineLevels = sal_False; - mxTocProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromOutline") ) ) >>= bUseOutlineLevels; + mxTocProps->getPropertyValue(rtl::OUString("CreateFromOutline") ) >>= bUseOutlineLevels; return bUseOutlineLevels; } void SAL_CALL SwVbaTableOfContents::setUseOutlineLevels( ::sal_Bool _useOutlineLevels ) throw (css::uno::RuntimeException) { - mxTocProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromOutline") ), uno::makeAny( _useOutlineLevels ) ); + mxTocProps->setPropertyValue( rtl::OUString("CreateFromOutline"), uno::makeAny( _useOutlineLevels ) ); } void SAL_CALL SwVbaTableOfContents::Delete( ) throw (uno::RuntimeException) @@ -96,7 +96,7 @@ void SAL_CALL SwVbaTableOfContents::Update( ) throw (uno::RuntimeException) rtl::OUString SwVbaTableOfContents::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaTableOfContents")); + return rtl::OUString("SwVbaTableOfContents"); } uno::Sequence< rtl::OUString > @@ -106,7 +106,7 @@ SwVbaTableOfContents::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TableOfContents" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.TableOfContents" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index 83b868d1afb7..1448b4bd28e7 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -178,7 +178,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( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable")) ), uno::UNO_QUERY_THROW ); + xTable.set( xMsf->createInstance( rtl::OUString("com.sun.star.text.TextTable") ), uno::UNO_QUERY_THROW ); xTable->initialize( nRows, nCols ); uno::Reference< text::XText > xText = xTextRange->getText(); @@ -212,7 +212,7 @@ SwVbaTables::createCollectionObject( const uno::Any& aSource ) rtl::OUString SwVbaTables::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaTables")); + return rtl::OUString("SwVbaTables"); } // XEnumerationAccess @@ -229,7 +229,7 @@ SwVbaTables::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Tables" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Tables" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index e37d8fce5b3e..8be4212c2fdb 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ContentIndex")) ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsProtected") ), uno::makeAny( isProtected ) ); + xTocProps->setPropertyValue( rtl::OUString("IsProtected"), uno::makeAny( isProtected ) ); uno::Reference< word::XTableOfContents > xToc( new SwVbaTableOfContents( this, mxContext, mxTextDocument, xDocumentIndex ) ); @@ -167,7 +167,7 @@ SwVbaTablesOfContents::createCollectionObject( const uno::Any& aSource ) rtl::OUString SwVbaTablesOfContents::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaTablesOfContents")); + return rtl::OUString("SwVbaTablesOfContents"); } uno::Sequence<rtl::OUString> @@ -177,7 +177,7 @@ SwVbaTablesOfContents::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TablesOfContents") ); + sNames[0] = rtl::OUString("ooo.vba.word.TablesOfContents"); } return sNames; } diff --git a/sw/source/ui/vba/vbatabstop.cxx b/sw/source/ui/vba/vbatabstop.cxx index 150149b2e8df..7ff80c3987e8 100644 --- a/sw/source/ui/vba/vbatabstop.cxx +++ b/sw/source/ui/vba/vbatabstop.cxx @@ -34,7 +34,7 @@ SwVbaTabStop::~SwVbaTabStop() rtl::OUString SwVbaTabStop::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaTabStop")); + return rtl::OUString("SwVbaTabStop"); } uno::Sequence< rtl::OUString > @@ -44,7 +44,7 @@ SwVbaTabStop::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TabStop" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.TabStop" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index 1a3c2db460ee..c6520cf903e2 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTabStops") ) ) >>= aSeq; + xParaProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTabStops") ), uno::makeAny( aSeq ) ); + xParaProps->setPropertyValue( rtl::OUString("ParaTabStops"), uno::makeAny( aSeq ) ); } typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > TabStopCollectionHelper_Base; @@ -252,7 +252,7 @@ SwVbaTabStops::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString SwVbaTabStops::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaTabStops")); + return rtl::OUString("SwVbaTabStops"); } css::uno::Sequence<rtl::OUString> @@ -262,7 +262,7 @@ SwVbaTabStops::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TabStops") ); + sNames[0] = rtl::OUString("ooo.vba.word.TabStops"); } return sNames; } diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index a1700a58d6bd..8f9b24fa86cf 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -86,7 +86,7 @@ uno::Any SAL_CALL SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeException) { uno::Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); - uno::Reference< text::XAutoTextContainer > xAutoTextContainer( xMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.AutoTextContainer") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XAutoTextContainer > xAutoTextContainer( xMgr->createInstance( rtl::OUString("com.sun.star.text.AutoTextContainer") ), uno::UNO_QUERY_THROW ); // the default template is "Normal.dot" in Word. rtl::OUString sGroup( RTL_CONSTASCII_USTRINGPARAM("Normal") ); @@ -105,7 +105,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep } else { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Auto Text Entry doesn't exist") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Auto Text Entry doesn't exist"), uno::Reference< uno::XInterface >() ); } uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) ); @@ -117,7 +117,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep rtl::OUString SwVbaTemplate::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaTemplate")); + return rtl::OUString("SwVbaTemplate"); } uno::Sequence< rtl::OUString > @@ -127,7 +127,7 @@ SwVbaTemplate::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Template" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Template" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index 5acfef27083f..3cbed2123c7c 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -44,8 +44,7 @@ SwVbaVariable::getName() throw ( css::uno::RuntimeException ) void SAL_CALL SwVbaVariable::setName( const rtl::OUString& ) throw ( css::uno::RuntimeException ) { - throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(" Fail to set name")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(" Fail to set name"), uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL @@ -79,7 +78,7 @@ SwVbaVariable::getIndex() throw ( css::uno::RuntimeException ) rtl::OUString SwVbaVariable::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaVariable")); + return rtl::OUString("SwVbaVariable"); } uno::Sequence< rtl::OUString > @@ -89,7 +88,7 @@ SwVbaVariable::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Variable" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Variable" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx index 3ab7e95a355b..b74401a882b1 100644 --- a/sw/source/ui/vba/vbavariables.cxx +++ b/sw/source/ui/vba/vbavariables.cxx @@ -77,7 +77,7 @@ SwVbaVariables::Add( const rtl::OUString& rName, const uno::Any& rValue ) throw rtl::OUString SwVbaVariables::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaVariables")); + return rtl::OUString("SwVbaVariables"); } css::uno::Sequence<rtl::OUString> @@ -87,7 +87,7 @@ SwVbaVariables::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Variables") ); + sNames[0] = rtl::OUString("ooo.vba.word.Variables"); } return sNames; } diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 2935506c8c4c..5591eaaee297 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextContent ) + while( xCursorProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Endnote") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowTableBoundaries"))) >>= bShowTableGridLine; + mxViewSettings->getPropertyValue( rtl::OUString("ShowTableBoundaries")) >>= bShowTableGridLine; return bShowTableGridLine; } void SAL_CALL SwVbaView::setTableGridLines( ::sal_Bool _tablegridlines ) throw (css::uno::RuntimeException) { - mxViewSettings->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowTableBoundaries")), uno::makeAny( _tablegridlines ) ); + mxViewSettings->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowOnlineLayout"))) >>= bOnlineLayout; + mxViewSettings->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowOnlineLayout")), uno::makeAny( sal_False ) ); + mxViewSettings->setPropertyValue( rtl::OUString("ShowOnlineLayout"), uno::makeAny( sal_False ) ); break; } case word::WdViewType::wdWebView: { - mxViewSettings->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowOnlineLayout")), uno::makeAny( sal_True ) ); + mxViewSettings->setPropertyValue( rtl::OUString("ShowOnlineLayout"), uno::makeAny( sal_True ) ); break; } case word::WdViewType::wdPrintPreview: @@ -256,10 +256,10 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) case word::WdSeekView::wdSeekPrimaryFooter: case word::WdSeekView::wdSeekEvenPagesFooter: { - aPropIsOn = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn") ); - aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared") ); - aPropBodyDistance = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance") ); - aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterText") ); + aPropIsOn = rtl::OUString("FooterIsOn"); + aPropIsShared = rtl::OUString("FooterIsShared"); + aPropBodyDistance = rtl::OUString("FooterBodyDistance"); + aPropText = rtl::OUString("FooterText"); break; } case word::WdSeekView::wdSeekCurrentPageHeader: @@ -267,10 +267,10 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) case word::WdSeekView::wdSeekPrimaryHeader: case word::WdSeekView::wdSeekEvenPagesHeader: { - aPropIsOn = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn") ); - aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared") ); - aPropBodyDistance = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance") ); - aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderText") ); + aPropIsOn = rtl::OUString("HeaderIsOn"); + aPropIsShared = rtl::OUString("HeaderIsShared"); + aPropBodyDistance = rtl::OUString("HeaderBodyDistance"); + aPropText = rtl::OUString("HeaderText"); break; } } @@ -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 ); rtl::OUString aPageStyleName; - xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName; + xCursorProps->getPropertyValue( rtl::OUString("PageStyleName")) >>= aPageStyleName; if ( aPageStyleName == "First Page" ) { // go to the beginning of where the next style is used @@ -343,11 +343,11 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) if( nType == word::WdSeekView::wdSeekEvenPagesFooter || nType == word::WdSeekView::wdSeekEvenPagesHeader ) { - aTempPropText += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Left") ); + aTempPropText += rtl::OUString("Left"); } else { - aTempPropText += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Right") ); + aTempPropText += rtl::OUString("Right"); } xText.set( xPageProps->getPropertyValue( aTempPropText), uno::UNO_QUERY_THROW ); } @@ -373,7 +373,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) rtl::OUString SwVbaView::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaView")); + return rtl::OUString("SwVbaView"); } uno::Sequence< rtl::OUString > @@ -383,7 +383,7 @@ SwVbaView::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.View" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.View" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index 2195dd515f3a..b8a22620c08e 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( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid Parameter" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Invalid Parameter" ), uno::Reference< uno::XInterface >() ); } } @@ -131,7 +131,7 @@ SwVbaWindow::ActivePane() throw (uno::RuntimeException) rtl::OUString SwVbaWindow::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaWindow")); + return rtl::OUString("SwVbaWindow"); } uno::Sequence< rtl::OUString > @@ -141,7 +141,7 @@ SwVbaWindow::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Window" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.Window" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index 13d1339c89b6..e8573fefca91 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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SurroundContour") ), uno::makeAny( sal_False ) ); + m_xPropertySet->setPropertyValue( rtl::OUString("SurroundContour"), uno::makeAny( sal_False ) ); break; } case word::WdWrapType::wdWrapTight: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SurroundContour") ), uno::makeAny( sal_True ) ); + m_xPropertySet->setPropertyValue( rtl::OUString("SurroundContour"), uno::makeAny( sal_True ) ); break; } default: @@ -77,14 +77,14 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) } } } - m_xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextWrap") ), uno::makeAny( eTextMode ) ); + m_xPropertySet->setPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextWrap") )) >>= eTextMode; + m_xPropertySet->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SurroundContour") )) >>= bContour; + m_xPropertySet->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextWrap") )) >>= eTextMode; + m_xPropertySet->getPropertyValue( rtl::OUString("TextWrap")) >>= eTextMode; switch( eTextMode ) { case text::WrapTextMode_LEFT: @@ -174,48 +174,48 @@ void SwVbaWrapFormat::setDistance( const rtl::OUString& sName, float _distance ) float SAL_CALL SwVbaWrapFormat::getDistanceTop() throw (uno::RuntimeException) { - return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ) ); + return getDistance( rtl::OUString("TopMargin") ); } void SAL_CALL SwVbaWrapFormat::setDistanceTop( float _distancetop ) throw (uno::RuntimeException) { - setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ), _distancetop ); + setDistance( rtl::OUString("TopMargin"), _distancetop ); } float SAL_CALL SwVbaWrapFormat::getDistanceBottom() throw (uno::RuntimeException) { - return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin") ) ); + return getDistance( rtl::OUString("BottomMargin") ); } void SAL_CALL SwVbaWrapFormat::setDistanceBottom( float _distancebottom ) throw (uno::RuntimeException) { - setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin") ), _distancebottom ); + setDistance( rtl::OUString("BottomMargin"), _distancebottom ); } float SAL_CALL SwVbaWrapFormat::getDistanceLeft() throw (uno::RuntimeException) { - return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ) ); + return getDistance( rtl::OUString("LeftMargin") ); } void SAL_CALL SwVbaWrapFormat::setDistanceLeft( float _distanceleft ) throw (uno::RuntimeException) { - setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ), _distanceleft ); + setDistance( rtl::OUString("LeftMargin"), _distanceleft ); } float SAL_CALL SwVbaWrapFormat::getDistanceRight() throw (uno::RuntimeException) { - return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ) ); + return getDistance( rtl::OUString("RightMargin") ); } void SAL_CALL SwVbaWrapFormat::setDistanceRight( float _distanceright ) throw (uno::RuntimeException) { - setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ), _distanceright ); + setDistance( rtl::OUString("RightMargin"), _distanceright ); } rtl::OUString SwVbaWrapFormat::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SwVbaWrapFormat")); + return rtl::OUString("SwVbaWrapFormat"); } uno::Sequence< rtl::OUString > @@ -225,7 +225,7 @@ SwVbaWrapFormat::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.WrapFormat" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.WrapFormat" ); } return aServiceNames; } diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index 55feb3ff43f1..fa5cdf7ec75f 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) { rtl::OUString aPageStyleName; - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName; + xProps->getPropertyValue( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") ) ), uno::UNO_QUERY_THROW ); - uno::Reference< style::XStyle > xStyle( xParaStyles->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName( rtl::OUString("ParagraphStyles") ), uno::UNO_QUERY_THROW ); + uno::Reference< style::XStyle > xStyle( xParaStyles->getByName( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString("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( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextContent ) + while( xVCProps->getPropertyValue( rtl::OUString("TextTable") ) >>= xTextContent ) { xText = xTextContent->getAnchor()->getText(); xVCProps.set( xText->createTextCursor(), uno::UNO_QUERY_THROW ); } if( !xText.is() ) - throw uno::RuntimeException( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "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 8cc63ad0c1d1..5f30c11f7fbe 100644 --- a/sw/source/ui/wrtsh/navmgr.cxx +++ b/sw/source/ui/wrtsh/navmgr.cxx @@ -227,7 +227,7 @@ bool SwNavigationMgr::addEntry(const SwPosition& rPos) { if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ); + css::uno::Any aValue = xPropSet->getPropertyValue( ::rtl::OUString( "LayoutManager" ) ); aValue >>= xLayoutManager; if (xLayoutManager.is()) diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 2336a6d2f9cd..3457c1918776 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -498,7 +498,7 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF { try { - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Formula")), uno::makeAny( ::rtl::OUString( aMathData ) ) ); + xSet->setPropertyValue( ::rtl::OUString("Formula"), uno::makeAny( ::rtl::OUString( aMathData ) ) ); bActivate = sal_False; } catch (const uno::Exception&) @@ -551,12 +551,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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) && + ( xProps->getPropertyValue( ::rtl::OUString( "DisableDataTableDialog" ) ) >>= bDisableDataTableDialog ) && bDisableDataTableDialog ) { - xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ), + xProps->setPropertyValue( ::rtl::OUString( "DisableDataTableDialog" ), uno::makeAny( sal_False ) ); - xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ), + xProps->setPropertyValue( ::rtl::OUString( "DisableComplexChartTypes" ), uno::makeAny( sal_False ) ); uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); if ( xModifiable.is() ) |