summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uno')
-rw-r--r--sw/source/ui/uno/swdet2.cxx9
-rw-r--r--sw/source/ui/uno/swdetect.cxx14
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx2
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx14
4 files changed, 19 insertions, 20 deletions
diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx
index cfe82cd74770..f002610b25ca 100644
--- a/sw/source/ui/uno/swdet2.cxx
+++ b/sw/source/ui/uno/swdet2.cxx
@@ -76,11 +76,10 @@ sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** pp
else
{
//Bug 41417: JP 09.07.97: HTML documents should be loaded by WebWriter
- SfxFilterContainer aFilterContainer( String::CreateFromAscii("swriter/web") );
- if( pTmp->GetUserData() != C2S(sHTML) ||
- String::CreateFromAscii( "com.sun.star.text.WebDocument" ) ==
- String( pTmp->GetServiceName() ) ||
- 0 == ( (*ppFilter) = SwIoSystem::GetFilterOfFormat( C2S(sHTML),
+ SfxFilterContainer aFilterContainer( rtl::OUString("swriter/web") );
+ if( !pTmp->GetUserData().equals(sHTML) ||
+ pTmp->GetServiceName() == "com.sun.star.text.WebDocument" ||
+ 0 == ( (*ppFilter) = SwIoSystem::GetFilterOfFormat( rtl::OUString(sHTML),
&aFilterContainer ) ) )
*ppFilter = pTmp;
}
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 7fec1f55a986..a8ac2afa7a94 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -173,13 +173,13 @@ SwFilterDetect::~SwFilterDetect()
bWasReadOnly = pItem && pItem->GetValue();
const SfxFilter* pFilter = 0;
- String aPrefix = String::CreateFromAscii( "private:factory/" );
+ String aPrefix = rtl::OUString("private:factory/");
if( aURL.Match( aPrefix ) == aPrefix.Len() )
{
if( SvtModuleOptions().IsWriter() )
{
String aPattern( aPrefix );
- aPattern += String::CreateFromAscii("swriter");
+ aPattern += rtl::OUString("swriter");
if ( aURL.Match( aPattern ) >= aPattern.Len() )
return aTypeName;
}
@@ -235,9 +235,9 @@ SwFilterDetect::~SwFilterDetect()
{
const SfxFilter* pPreFilter = aPreselectedFilterName.Len() ?
SfxFilterMatcher().GetFilter4FilterName( aPreselectedFilterName ) : aTypeName.Len() ?
- SfxFilterMatcher(String::CreateFromAscii("swriter")).GetFilter4EA( aTypeName ) : 0;
+ SfxFilterMatcher(rtl::OUString("swriter")).GetFilter4EA( aTypeName ) : 0;
if (!pPreFilter)
- pPreFilter = SfxFilterMatcher(String::CreateFromAscii("sweb")).GetFilter4EA( aTypeName );
+ pPreFilter = SfxFilterMatcher(rtl::OUString("sweb")).GetFilter4EA( aTypeName );
String aFilterName;
if ( pPreFilter )
{
@@ -318,9 +318,9 @@ SwFilterDetect::~SwFilterDetect()
else
pFilter = SfxFilterMatcher().GetFilter4EA( aTypeName );
- sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") ||
- pFilter->GetServiceName().EqualsAscii("com.sun.star.text.WebDocument");
- sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument");
+ sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName() == "com.sun.star.text.TextDocument" ||
+ pFilter->GetServiceName() == "com.sun.star.text.WebDocument";
+ sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName() == "com.sun.star.text.GlobalDocument";
const SfxFilter* pOrigFilter = NULL;
if ( !bTestWriter && !bTestGlobal && pFilter )
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index e224320bf23c..bdcc408ea5e4 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -786,7 +786,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
// save document with temporary filename
const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat(
- String::CreateFromAscii( FILTER_XML ),
+ rtl::OUString( FILTER_XML ),
SwDocShell::Factory().GetFilterContainer() );
String aExtension(comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(), '*'));
TempFile aTempFile( C2U("SwMM"), &aExtension );
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 8dd56f56f991..3f1028656c7c 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -3286,7 +3286,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
String sSuffix('|');
if(sToCompare == sTables)
{
- sSuffix += UniString::CreateFromAscii(pMarkToTable);
+ sSuffix += rtl::OUString::createFromAscii(pMarkToTable);
Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
pxDoc->getTextTables(), sToCompare, sSuffix );
@@ -3295,7 +3295,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
}
else if(sToCompare == sFrames)
{
- sSuffix += UniString::CreateFromAscii(pMarkToFrame);
+ sSuffix += rtl::OUString::createFromAscii(pMarkToFrame);
Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
pxDoc->getTextFrames(), sToCompare, sSuffix );
Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
@@ -3303,7 +3303,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
}
else if(sToCompare == sSections)
{
- sSuffix += UniString::CreateFromAscii(pMarkToRegion);
+ sSuffix += rtl::OUString::createFromAscii(pMarkToRegion);
Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
pxDoc->getTextSections(), sToCompare, sSuffix );
Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
@@ -3311,7 +3311,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
}
else if(sToCompare == sGraphics)
{
- sSuffix += UniString::CreateFromAscii(pMarkToGraphic);
+ sSuffix += rtl::OUString::createFromAscii(pMarkToGraphic);
Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
pxDoc->getGraphicObjects(), sToCompare, sSuffix );
Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
@@ -3319,7 +3319,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
}
else if(sToCompare == sOLEs)
{
- sSuffix += UniString::CreateFromAscii(pMarkToOLE);
+ sSuffix += rtl::OUString::createFromAscii(pMarkToOLE);
Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
pxDoc->getEmbeddedObjects(), sToCompare, sSuffix );
Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
@@ -3327,7 +3327,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
}
else if(sToCompare == sOutlines)
{
- sSuffix += UniString::CreateFromAscii(pMarkToOutline);
+ sSuffix += rtl::OUString::createFromAscii(pMarkToOutline);
Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
*pxDoc, sToCompare, sSuffix );
Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
@@ -3499,7 +3499,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames(void)
aRet.realloc(nOutlineCount);
OUString* pResArr = aRet.getArray();
String sSuffix('|');
- sSuffix += UniString::CreateFromAscii(pMarkToOutline);
+ sSuffix += rtl::OUString::createFromAscii(pMarkToOutline);
const SwNumRule* pOutlRule = pDoc->GetOutlineNumRule();
for (sal_uInt16 i = 0; i < nOutlineCount; ++i)
{