dmapper: drop unnecessary explicit OUString ctors in rebased code
Change-Id: Ibaf2211425ff2ab6fc7647c159ec6b1f095e843a
This commit is contained in:
@@ -287,7 +287,7 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
|
||||
//todo: this cannot be the right way to replace a part of the string!
|
||||
aNewFormat[nI] = 'Y';
|
||||
aNewFormat[nI + 1] = 'Y';
|
||||
aNewFormat.insert(nI + 2, ::rtl::OUString("YY"));
|
||||
aNewFormat.insert(nI + 2, "YY");
|
||||
nLen+=2;
|
||||
nI+=3;
|
||||
}
|
||||
@@ -300,7 +300,7 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
|
||||
//todo: this cannot be the right way to replace a part of the string!
|
||||
aNewFormat[nI] = 'y';
|
||||
aNewFormat[nI + 1] = 'y';
|
||||
aNewFormat.insert(nI + 2, ::rtl::OUString("yy"));
|
||||
aNewFormat.insert(nI + 2, "yy");
|
||||
nLen+=2;
|
||||
nI+=3;
|
||||
}
|
||||
@@ -311,7 +311,7 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
|
||||
// MM We have to escape '/' in case it's used as a char
|
||||
//todo: this cannot be the right way to replace a part of the string!
|
||||
aNewFormat[nI] = '\\';
|
||||
aNewFormat.insert(nI + 1, ::rtl::OUString("/"));
|
||||
aNewFormat.insert(nI + 1, "/");
|
||||
nI++;
|
||||
nLen++;
|
||||
}
|
||||
@@ -324,18 +324,18 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
|
||||
|
||||
if (bForceJapanese)
|
||||
{
|
||||
rLocale.Language = ::rtl::OUString("ja");
|
||||
rLocale.Country = ::rtl::OUString("JP");
|
||||
rLocale.Language = "ja";
|
||||
rLocale.Country = "JP";
|
||||
}
|
||||
|
||||
if (bForceNatNum)
|
||||
{
|
||||
aNewFormat.insert( 0, ::rtl::OUString("[NatNum1][$-411]"));
|
||||
aNewFormat.insert( 0, "[NatNum1][$-411]");
|
||||
}
|
||||
|
||||
if (bHijri)
|
||||
{
|
||||
aNewFormat.insert( 0, ::rtl::OUString("[~hijri]"));
|
||||
aNewFormat.insert( 0, "[~hijri]");
|
||||
}
|
||||
return aNewFormat.makeStringAndClear();
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ LoggedStream(dmapper_logger, "DomainMapper"),
|
||||
(comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING, xInputStream));
|
||||
|
||||
uno::Reference< uno::XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext(
|
||||
::rtl::OUString("com.sun.star.document.OOXMLDocumentPropertiesImporter"),
|
||||
"com.sun.star.document.OOXMLDocumentPropertiesImporter",
|
||||
xContext);
|
||||
|
||||
uno::Reference< document::XOOXMLDocumentPropertiesImporter > xImporter( xTemp, uno::UNO_QUERY_THROW );
|
||||
|
||||
@@ -233,7 +233,7 @@ uno::Reference< container::XNameContainer > DomainMapper_Impl::GetPageStyles(
|
||||
{
|
||||
uno::Reference< style::XStyleFamiliesSupplier > xSupplier( m_xTextDocument, uno::UNO_QUERY );
|
||||
if (xSupplier.is())
|
||||
xSupplier->getStyleFamilies()->getByName(::rtl::OUString("PageStyles")) >>= m_xPageStyles;
|
||||
xSupplier->getStyleFamilies()->getByName("PageStyles") >>= m_xPageStyles;
|
||||
}
|
||||
return m_xPageStyles;
|
||||
}
|
||||
@@ -254,7 +254,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::GetDocumentSettings()
|
||||
if( !m_xDocumentSettings.is() && m_xTextFactory.is())
|
||||
{
|
||||
m_xDocumentSettings = uno::Reference< beans::XPropertySet >(
|
||||
m_xTextFactory->createInstance(::rtl::OUString("com.sun.star.document.Settings")), uno::UNO_QUERY );
|
||||
m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY );
|
||||
}
|
||||
return m_xDocumentSettings;
|
||||
}
|
||||
@@ -1584,7 +1584,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
|
||||
xProps->setPropertyValue(
|
||||
rPropNameSupplier.GetName( PROP_OPAQUE ),
|
||||
uno::makeAny( true ) );
|
||||
if (xSInfo->supportsService(rtl::OUString("com.sun.star.text.TextFrame")))
|
||||
if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
|
||||
{
|
||||
uno::Reference<text::XTextContent> xTextContent(xShape, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<text::XTextRange> xTextRange(xTextAppend->createTextCursorByRange(xTextAppend->getEnd()), uno::UNO_QUERY_THROW);
|
||||
@@ -1790,7 +1790,7 @@ extract a parameter (with or without quotes) between the command and the followi
|
||||
}
|
||||
else
|
||||
{
|
||||
nEndIndex = rCommand.indexOf( ::rtl::OUString(" \\"), nStartIndex);
|
||||
nEndIndex = rCommand.indexOf(" \\", nStartIndex);
|
||||
}
|
||||
::rtl::OUString sRet;
|
||||
if( nEndIndex > nStartIndex + 1 )
|
||||
@@ -1885,10 +1885,10 @@ void DomainMapper_Impl::SetNumberFormat( const ::rtl::OUString& rCommand,
|
||||
{
|
||||
OUString sFormatString = lcl_ParseFormat( rCommand );
|
||||
// find \h - hijri/luna calendar todo: what about saka/era calendar?
|
||||
bool bHijri = 0 < rCommand.indexOf( ::rtl::OUString("\\h "));
|
||||
bool bHijri = 0 < rCommand.indexOf("\\h ");
|
||||
lang::Locale aUSLocale;
|
||||
aUSLocale.Language = ::rtl::OUString("en");
|
||||
aUSLocale.Country = ::rtl::OUString("US");
|
||||
aUSLocale.Language = "en";
|
||||
aUSLocale.Country = "US";
|
||||
|
||||
//determine current locale - todo: is it necessary to initialize this locale?
|
||||
lang::Locale aCurrentLocale = aUSLocale;
|
||||
@@ -2247,7 +2247,7 @@ void DomainMapper_Impl::handleAutoNum
|
||||
uno::Reference< beans::XPropertySet > xMaster =
|
||||
FindOrCreateFieldMaster
|
||||
("com.sun.star.text.FieldMaster.SetExpression",
|
||||
rtl::OUString("AutoNr" ));
|
||||
"AutoNr");
|
||||
|
||||
xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE),
|
||||
uno::makeAny(text::SetVariableType::SEQUENCE));
|
||||
@@ -2358,8 +2358,7 @@ void DomainMapper_Impl::handleAuthor
|
||||
if(sFieldServiceName.isEmpty())
|
||||
{
|
||||
//create a custom property field
|
||||
sServiceName +=
|
||||
::rtl::OUString("DocInfo.Custom");
|
||||
sServiceName += "DocInfo.Custom";
|
||||
bIsCustomField = true;
|
||||
}
|
||||
else
|
||||
@@ -2507,7 +2506,7 @@ void DomainMapper_Impl::handleToc
|
||||
xTOC.set(
|
||||
m_xTextFactory->createInstance
|
||||
( bTableOfFigures ?
|
||||
::rtl::OUString("com.sun.star.text.IllustrationsIndex")
|
||||
"com.sun.star.text.IllustrationsIndex"
|
||||
: sTOCServiceName),
|
||||
uno::UNO_QUERY_THROW);
|
||||
if (xTOC.is())
|
||||
@@ -2784,7 +2783,7 @@ void DomainMapper_Impl::CloseFieldCommand()
|
||||
break;
|
||||
case FIELD_FILENAME:
|
||||
{
|
||||
sal_Int32 nNumberingTypeIndex = pContext->GetCommand().indexOf( ::rtl::OUString("\\p"));
|
||||
sal_Int32 nNumberingTypeIndex = pContext->GetCommand().indexOf("\\p");
|
||||
if (xFieldProperties.is())
|
||||
xFieldProperties->setPropertyValue(
|
||||
rPropNameSupplier.GetName(PROP_FILE_FORMAT),
|
||||
@@ -2913,7 +2912,7 @@ void DomainMapper_Impl::CloseFieldCommand()
|
||||
FindOrCreateFieldMaster( "com.sun.star.text.FieldMaster.Database", sParam );
|
||||
|
||||
// xFieldProperties->setPropertyValue(
|
||||
// ::rtl::OUString("FieldCode"),
|
||||
// "FieldCode",
|
||||
// uno::makeAny( pContext->GetCommand().copy( nIndex + 1 )));
|
||||
uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
|
||||
xDependentField->attachTextFieldMaster( xMaster );
|
||||
@@ -3536,8 +3535,7 @@ void DomainMapper_Impl::SetCurrentRedlineAuthor( rtl::OUString sAuthor )
|
||||
pCurrent->m_sAuthor = sAuthor;
|
||||
}
|
||||
else
|
||||
m_xAnnotationField->setPropertyValue(rtl::OUString("Author"),
|
||||
uno::makeAny(sAuthor));
|
||||
m_xAnnotationField->setPropertyValue("Author", uno::makeAny(sAuthor));
|
||||
}
|
||||
|
||||
void DomainMapper_Impl::SetCurrentRedlineDate( rtl::OUString sDate )
|
||||
@@ -3549,8 +3547,7 @@ void DomainMapper_Impl::SetCurrentRedlineDate( rtl::OUString sDate )
|
||||
pCurrent->m_sDate = sDate;
|
||||
}
|
||||
else
|
||||
m_xAnnotationField->setPropertyValue(rtl::OUString("DateTimeValue"),
|
||||
uno::makeAny(lcl_DateStringToDateTime(sDate)));
|
||||
m_xAnnotationField->setPropertyValue("DateTimeValue", uno::makeAny(lcl_DateStringToDateTime(sDate)));
|
||||
}
|
||||
|
||||
void DomainMapper_Impl::SetCurrentRedlineId( sal_Int32 sId )
|
||||
@@ -3594,8 +3591,7 @@ void DomainMapper_Impl::ApplySettingsTable()
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference< beans::XPropertySet > xTextDefaults(
|
||||
m_xTextFactory->createInstance(::rtl::OUString("com.sun.star.text.Defaults")), uno::UNO_QUERY_THROW );
|
||||
uno::Reference< beans::XPropertySet > xTextDefaults(m_xTextFactory->createInstance("com.sun.star.text.Defaults"), uno::UNO_QUERY_THROW );
|
||||
sal_Int32 nDefTab = m_pSettingsTable->GetDefaultTabStop();
|
||||
xTextDefaults->setPropertyValue( PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_TAB_STOP_DISTANCE ), uno::makeAny(nDefTab) );
|
||||
if (m_pSettingsTable->GetLinkStyles())
|
||||
|
||||
@@ -887,10 +887,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
|
||||
( xShape, uno::UNO_QUERY_THROW );
|
||||
|
||||
rtl::OUString sUrl;
|
||||
xShapeProps->getPropertyValue( rtl::OUString("GraphicURL") ) >>= sUrl;
|
||||
xShapeProps->getPropertyValue("GraphicURL") >>= sUrl;
|
||||
|
||||
::com::sun::star::beans::PropertyValues aMediaProperties( 1 );
|
||||
aMediaProperties[0].Name = rtl::OUString("URL");
|
||||
aMediaProperties[0].Name = "URL";
|
||||
aMediaProperties[0].Value <<= sUrl;
|
||||
|
||||
m_xGraphicObject = createGraphicObject( aMediaProperties );
|
||||
@@ -903,9 +903,9 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
|
||||
uno::Reference< beans::XPropertySet > xGraphProps( m_xGraphicObject,
|
||||
uno::UNO_QUERY );
|
||||
awt::Size aSize = xShape->getSize( );
|
||||
xGraphProps->setPropertyValue( rtl::OUString("Height"),
|
||||
xGraphProps->setPropertyValue("Height",
|
||||
uno::makeAny( aSize.Height ) );
|
||||
xGraphProps->setPropertyValue( rtl::OUString("Width"),
|
||||
xGraphProps->setPropertyValue("Width",
|
||||
uno::makeAny( aSize.Width ) );
|
||||
}
|
||||
}
|
||||
@@ -1281,7 +1281,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
|
||||
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
|
||||
|
||||
uno::Reference< beans::XPropertySet > xGraphicObjectProperties(
|
||||
m_xTextFactory->createInstance(::rtl::OUString("com.sun.star.text.TextGraphicObject")),
|
||||
m_xTextFactory->createInstance("com.sun.star.text.TextGraphicObject"),
|
||||
uno::UNO_QUERY_THROW);
|
||||
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_GRAPHIC), uno::makeAny( xGraphic ));
|
||||
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_ANCHOR_TYPE),
|
||||
|
||||
@@ -511,7 +511,7 @@ uno::Reference< container::XNameContainer > lcl_getUnoNumberingStyles(
|
||||
try
|
||||
{
|
||||
uno::Reference< style::XStyleFamiliesSupplier > xFamilies( xFactory, uno::UNO_QUERY_THROW );
|
||||
uno::Any oFamily = xFamilies->getStyleFamilies( )->getByName( OUString("NumberingStyles") );
|
||||
uno::Any oFamily = xFamilies->getStyleFamilies( )->getByName("NumberingStyles");
|
||||
|
||||
oFamily >>= xStyles;
|
||||
}
|
||||
@@ -535,8 +535,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
|
||||
{
|
||||
// Create the numbering style
|
||||
uno::Reference< beans::XPropertySet > xStyle (
|
||||
xFactory->createInstance(
|
||||
OUString("com.sun.star.style.NumberingStyle")),
|
||||
xFactory->createInstance("com.sun.star.style.NumberingStyle"),
|
||||
uno::UNO_QUERY_THROW );
|
||||
|
||||
rtl::OUString sStyleName = GetStyleName( GetId( ) );
|
||||
|
||||
@@ -237,7 +237,7 @@ void SettingsTable::ApplyProperties( uno::Reference< text::XTextDocument > xDoc
|
||||
|
||||
// Record changes value
|
||||
if (xDocProps.is())
|
||||
xDocProps->setPropertyValue( ::rtl::OUString("RecordChanges"), uno::makeAny( m_pImpl->m_bRecordChanges ) );
|
||||
xDocProps->setPropertyValue("RecordChanges", uno::makeAny( m_pImpl->m_bRecordChanges ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -857,7 +857,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
|
||||
( *aNextStyleIt )->sStyleName == pEntry->sNextStyleIdentifier)
|
||||
{
|
||||
beans::PropertyValue aNew;
|
||||
aNew.Name = ::rtl::OUString("FollowStyle");
|
||||
aNew.Name = "FollowStyle";
|
||||
aNew.Value = uno::makeAny(ConvertStyleName( ( *aNextStyleIt )->sStyleIdentifierD ));
|
||||
aSortedPropVals.Insert( aNew );
|
||||
break;
|
||||
@@ -1170,7 +1170,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
|
||||
if(!m_pImpl->m_xTextDefaults.is())
|
||||
{
|
||||
m_pImpl->m_xTextDefaults = uno::Reference< beans::XPropertySet>(
|
||||
m_pImpl->m_rDMapper.GetTextFactory()->createInstance(::rtl::OUString("com.sun.star.text.Defaults")),
|
||||
m_pImpl->m_rDMapper.GetTextFactory()->createInstance("com.sun.star.text.Defaults"),
|
||||
uno::UNO_QUERY_THROW );
|
||||
}
|
||||
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
|
||||
@@ -1221,7 +1221,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
|
||||
uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW );
|
||||
uno::Reference< container::XNameAccess > xStyleFamilies = xStylesSupplier->getStyleFamilies();
|
||||
uno::Reference<container::XNameContainer> xCharStyles;
|
||||
xStyleFamilies->getByName(::rtl::OUString("CharacterStyles")) >>= xCharStyles;
|
||||
xStyleFamilies->getByName("CharacterStyles") >>= xCharStyles;
|
||||
//search for all character styles with the name sListLabel + <index>
|
||||
sal_Int32 nStyleFound = 0;
|
||||
uno::Sequence< ::rtl::OUString > aStyleNames = xCharStyles->getElementNames();
|
||||
|
||||
Reference in New Issue
Block a user