Kaydet (Commit) e9483d24 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

targeted string re-work

Change-Id: I19de73d0d2bdbe5322c928e93eca556eecabb09c
üst ea489b35
...@@ -238,9 +238,9 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) ...@@ -238,9 +238,9 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
SwRewriter aRewriter; SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, pWin->GetAuthor()); aRewriter.AddRule(UndoArg1, pWin->GetAuthor());
aText = aRewriter.Apply(aText); aText = aRewriter.Apply(aText);
aText.Append(String(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + aText.Append(String(rtl::OUString(" (") +
String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ")) + String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString(", ") +
String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("): \"")))); String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString("): \"")));
GetOutlinerView()->InsertText(aText,false); GetOutlinerView()->InsertText(aText,false);
// insert old, selected text or "..." // insert old, selected text or "..."
...@@ -248,8 +248,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) ...@@ -248,8 +248,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
if (pText->GetTextObject().GetText(0).Len()) if (pText->GetTextObject().GetText(0).Len())
GetOutlinerView()->GetEditView().InsertText(pText->GetTextObject()); GetOutlinerView()->GetEditView().InsertText(pText->GetTextObject());
else else
GetOutlinerView()->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")),false); GetOutlinerView()->InsertText(rtl::OUString("..."),false);
GetOutlinerView()->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n")),false); GetOutlinerView()->InsertText(rtl::OUString("\"\n"),false);
GetOutlinerView()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF)); GetOutlinerView()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF));
SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() ); SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() );
......
...@@ -1693,8 +1693,7 @@ void SwFldMgr::SetMacroPath(const String& rPath) ...@@ -1693,8 +1693,7 @@ void SwFldMgr::SetMacroPath(const String& rPath)
Reference< uri::XUriReferenceFactory > Reference< uri::XUriReferenceFactory >
xFactory( xSMgr->createInstance( xFactory( xSMgr->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ::rtl::OUString( "com.sun.star.uri.UriReferenceFactory" ) ), UNO_QUERY );
"com.sun.star.uri.UriReferenceFactory" )) ), UNO_QUERY );
if ( xFactory.is() ) if ( xFactory.is() )
{ {
...@@ -1760,8 +1759,7 @@ Reference<XNumberingTypeInfo> SwFldMgr::GetNumberingInfo() const ...@@ -1760,8 +1759,7 @@ Reference<XNumberingTypeInfo> SwFldMgr::GetNumberingInfo() const
{ {
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
Reference < XInterface > xI = xMSF->createInstance( Reference < XInterface > xI = xMSF->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ::rtl::OUString( "com.sun.star.text.DefaultNumberingProvider" ));
"com.sun.star.text.DefaultNumberingProvider" )));
Reference<XDefaultNumberingProvider> xDefNum(xI, UNO_QUERY); Reference<XDefaultNumberingProvider> xDefNum(xI, UNO_QUERY);
OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
((SwFldMgr*)this)->xNumberingInfo = Reference<XNumberingTypeInfo>(xDefNum, UNO_QUERY); ((SwFldMgr*)this)->xNumberingInfo = Reference<XNumberingTypeInfo>(xDefNum, UNO_QUERY);
......
...@@ -206,7 +206,7 @@ SwFilterDetect::~SwFilterDetect() ...@@ -206,7 +206,7 @@ SwFilterDetect::~SwFilterDetect()
// error during storage creation means _here_ that the medium // error during storage creation means _here_ that the medium
// is broken, but we can not handle it in medium since impossibility // is broken, but we can not handle it in medium since impossibility
// to create a storage does not _always_ means that the medium is broken // to create a storage does not _always_ means that the medium is broken
aMedium.SetError( aMedium.GetLastStorageCreationState(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); aMedium.SetError( aMedium.GetLastStorageCreationState(), ::rtl::OUString( OSL_LOG_PREFIX ) );
if ( xInteraction.is() ) if ( xInteraction.is() )
{ {
OUString empty; OUString empty;
...@@ -283,12 +283,12 @@ SwFilterDetect::~SwFilterDetect() ...@@ -283,12 +283,12 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfInteractionHandler != -1 ) if ( nIndexOfInteractionHandler != -1 )
lDescriptor[nIndexOfInteractionHandler].Value <<= uno::Reference< XInteractionHandler >( static_cast< task::XInteractionHandler* >( xHandler.get() ) ); lDescriptor[nIndexOfInteractionHandler].Value <<= uno::Reference< XInteractionHandler >( static_cast< task::XInteractionHandler* >( xHandler.get() ) );
aMedium.SetError( ERRCODE_ABORT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); aMedium.SetError( ERRCODE_ABORT, ::rtl::OUString( OSL_LOG_PREFIX ) );
} }
} }
else else
// no interaction, error handling as usual // no interaction, error handling as usual
aMedium.SetError( ERRCODE_IO_BROKENPACKAGE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); aMedium.SetError( ERRCODE_IO_BROKENPACKAGE, ::rtl::OUString( OSL_LOG_PREFIX ) );
if ( !bRepairAllowed ) if ( !bRepairAllowed )
{ {
...@@ -355,7 +355,7 @@ SwFilterDetect::~SwFilterDetect() ...@@ -355,7 +355,7 @@ SwFilterDetect::~SwFilterDetect()
{ {
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice // if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 ); lDescriptor.realloc( nPropertyCount + 1 );
lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")); lDescriptor[nPropertyCount].Name = ::rtl::OUString("InputStream");
lDescriptor[nPropertyCount].Value <<= xStream; lDescriptor[nPropertyCount].Value <<= xStream;
nPropertyCount++; nPropertyCount++;
} }
...@@ -364,7 +364,7 @@ SwFilterDetect::~SwFilterDetect() ...@@ -364,7 +364,7 @@ SwFilterDetect::~SwFilterDetect()
{ {
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice // if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 ); lDescriptor.realloc( nPropertyCount + 1 );
lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent")); lDescriptor[nPropertyCount].Name = ::rtl::OUString("UCBContent");
lDescriptor[nPropertyCount].Value <<= xContent; lDescriptor[nPropertyCount].Value <<= xContent;
nPropertyCount++; nPropertyCount++;
} }
...@@ -374,7 +374,7 @@ SwFilterDetect::~SwFilterDetect() ...@@ -374,7 +374,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfReadOnlyFlag == -1 ) if ( nIndexOfReadOnlyFlag == -1 )
{ {
lDescriptor.realloc( nPropertyCount + 1 ); lDescriptor.realloc( nPropertyCount + 1 );
lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); lDescriptor[nPropertyCount].Name = ::rtl::OUString("ReadOnly");
lDescriptor[nPropertyCount].Value <<= bReadOnly; lDescriptor[nPropertyCount].Value <<= bReadOnly;
nPropertyCount++; nPropertyCount++;
} }
...@@ -385,7 +385,7 @@ SwFilterDetect::~SwFilterDetect() ...@@ -385,7 +385,7 @@ SwFilterDetect::~SwFilterDetect()
if ( !bRepairPackage && bRepairAllowed ) if ( !bRepairPackage && bRepairAllowed )
{ {
lDescriptor.realloc( nPropertyCount + 1 ); lDescriptor.realloc( nPropertyCount + 1 );
lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")); lDescriptor[nPropertyCount].Name = ::rtl::OUString("RepairPackage");
lDescriptor[nPropertyCount].Value <<= bRepairAllowed; lDescriptor[nPropertyCount].Value <<= bRepairAllowed;
nPropertyCount++; nPropertyCount++;
bOpenAsTemplate = sal_True; bOpenAsTemplate = sal_True;
...@@ -397,7 +397,7 @@ SwFilterDetect::~SwFilterDetect() ...@@ -397,7 +397,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfTemplateFlag == -1 ) if ( nIndexOfTemplateFlag == -1 )
{ {
lDescriptor.realloc( nPropertyCount + 1 ); lDescriptor.realloc( nPropertyCount + 1 );
lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")); lDescriptor[nPropertyCount].Name = ::rtl::OUString("AsTemplate");
lDescriptor[nPropertyCount].Value <<= bOpenAsTemplate; lDescriptor[nPropertyCount].Value <<= bOpenAsTemplate;
nPropertyCount++; nPropertyCount++;
} }
...@@ -411,7 +411,7 @@ SwFilterDetect::~SwFilterDetect() ...@@ -411,7 +411,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfDocumentTitle == -1 ) if ( nIndexOfDocumentTitle == -1 )
{ {
lDescriptor.realloc( nPropertyCount + 1 ); lDescriptor.realloc( nPropertyCount + 1 );
lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")); lDescriptor[nPropertyCount].Name = ::rtl::OUString("DocumentTitle");
lDescriptor[nPropertyCount].Value <<= aDocumentTitle; lDescriptor[nPropertyCount].Value <<= aDocumentTitle;
nPropertyCount++; nPropertyCount++;
} }
...@@ -454,16 +454,16 @@ UNOSEQUENCE< rtl::OUString > SAL_CALL SwFilterDetect::getSupportedServiceNames() ...@@ -454,16 +454,16 @@ UNOSEQUENCE< rtl::OUString > SAL_CALL SwFilterDetect::getSupportedServiceNames()
UNOSEQUENCE< rtl::OUString > SwFilterDetect::impl_getStaticSupportedServiceNames() UNOSEQUENCE< rtl::OUString > SwFilterDetect::impl_getStaticSupportedServiceNames()
{ {
UNOSEQUENCE< rtl::OUString > seqServiceNames( 3 ); UNOSEQUENCE< rtl::OUString > seqServiceNames( 3 );
seqServiceNames.getArray() [0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ExtendedTypeDetection" )); seqServiceNames.getArray() [0] = ::rtl::OUString("com.sun.star.frame.ExtendedTypeDetection" );
seqServiceNames.getArray() [1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.FormatDetector" )); seqServiceNames.getArray() [1] = ::rtl::OUString("com.sun.star.text.FormatDetector" );
seqServiceNames.getArray() [2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.W4WFormatDetector" )); seqServiceNames.getArray() [2] = ::rtl::OUString("com.sun.star.text.W4WFormatDetector" );
return seqServiceNames ; return seqServiceNames ;
} }
/* Helper for XServiceInfo */ /* Helper for XServiceInfo */
rtl::OUString SwFilterDetect::impl_getStaticImplementationName() rtl::OUString SwFilterDetect::impl_getStaticImplementationName()
{ {
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.writer.FormatDetector" )); return ::rtl::OUString("com.sun.star.comp.writer.FormatDetector" );
} }
/* Helper for registry */ /* Helper for registry */
......
...@@ -214,14 +214,14 @@ Reference< uno::XInterface > SAL_CALL SwXModule_createInstance( ...@@ -214,14 +214,14 @@ Reference< uno::XInterface > SAL_CALL SwXModule_createInstance(
Sequence< OUString > SAL_CALL SwXModule_getSupportedServiceNames() throw() Sequence< OUString > SAL_CALL SwXModule_getSupportedServiceNames() throw()
{ {
OUString sService( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalSettings")); OUString sService( "com.sun.star.text.GlobalSettings");
const Sequence< OUString > aSeq( &sService, 1 ); const Sequence< OUString > aSeq( &sService, 1 );
return aSeq; return aSeq;
} }
OUString SAL_CALL SwXModule_getImplementationName() throw() OUString SAL_CALL SwXModule_getImplementationName() throw()
{ {
return OUString( RTL_CONSTASCII_USTRINGPARAM("SwXModule" ) ); return OUString( "SwXModule" );
} }
SwXModule::SwXModule() : SwXModule::SwXModule() :
...@@ -587,7 +587,7 @@ SwXViewSettings::SwXViewSettings(sal_Bool bWebView, SwView* pVw) ...@@ -587,7 +587,7 @@ SwXViewSettings::SwXViewSettings(sal_Bool bWebView, SwView* pVw)
{ {
// This property only exists if we have a view (ie, not at the module ) // This property only exists if we have a view (ie, not at the module )
if ( !pView ) if ( !pView )
mpInfo->remove ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "HelpURL" ) ) ); mpInfo->remove ( OUString ( "HelpURL" ) );
} }
...@@ -724,8 +724,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c ...@@ -724,8 +724,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
break; break;
default: default:
throw IllegalArgumentException( throw IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ::rtl::OUString( "SwXViewSettings: invalid zoom type"), 0, 0);
"SwXViewSettings: invalid zoom type")), 0, 0);
break; break;
} }
if(eZoom < USHRT_MAX) if(eZoom < USHRT_MAX)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment