summaryrefslogtreecommitdiff
path: root/xmloff/source/text
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/XMLCalculationSettingsContext.cxx4
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx12
-rw-r--r--xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx34
-rw-r--r--xmloff/source/text/XMLIndexBibliographyEntryContext.cxx4
-rw-r--r--xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx8
-rw-r--r--xmloff/source/text/XMLIndexSimpleEntryContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTOCSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTOCStylesContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTableSourceContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexUserSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLLineNumberingImportContext.cxx20
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx4
-rw-r--r--xmloff/source/text/XMLSectionFootnoteConfigImport.cxx22
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx7
-rw-r--r--xmloff/source/text/XMLSectionSourceImportContext.cxx7
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx18
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx73
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx6
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx10
-rw-r--r--xmloff/source/text/txtfldi.cxx300
-rw-r--r--xmloff/source/text/txtparai.cxx20
-rw-r--r--xmloff/source/text/txtstyli.cxx24
-rw-r--r--xmloff/source/text/txtvfldi.cxx58
26 files changed, 191 insertions, 470 deletions
diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx
index c4fcd7f46840..ecb684dbfbb4 100644
--- a/xmloff/source/text/XMLCalculationSettingsContext.cxx
+++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx
@@ -77,9 +77,7 @@ void XMLCalculationSettingsContext::EndElement()
{
Reference < XPropertySet > xPropSet ( xTextDoc, UNO_QUERY );
OUString sTwoDigitYear ( "TwoDigitYear" );
- Any aAny;
- aAny <<= nYear;
- xPropSet->setPropertyValue ( sTwoDigitYear, aAny );
+ xPropSet->setPropertyValue ( sTwoDigitYear, Any(nYear) );
}
}
}
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index b2edb7c5175d..19b91e3ab4f2 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -385,11 +385,9 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
rConfig->setPropertyValue(sPropertyParagraphStyleName, aAny);
}
- aAny <<= sPrefix;
- rConfig->setPropertyValue(sPropertyPrefix, aAny);
+ rConfig->setPropertyValue(sPropertyPrefix, Any(sPrefix));
- aAny <<= sSuffix;
- rConfig->setPropertyValue(sPropertySuffix, aAny);
+ rConfig->setPropertyValue(sPropertySuffix, Any(sSuffix));
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat,
@@ -399,11 +397,9 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
if( NumberingType::CHAR_SPECIAL == nNumType )
nNumType = NumberingType::ARABIC;
- aAny <<= nNumType;
- rConfig->setPropertyValue(sPropertyNumberingType, aAny);
+ rConfig->setPropertyValue(sPropertyNumberingType, Any(nNumType));
- aAny <<= nOffset;
- rConfig->setPropertyValue(sPropertyStartAt, aAny);
+ rConfig->setPropertyValue(sPropertyStartAt, Any(nOffset));
if (!bIsEndnote)
{
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index 3e4344cc6765..3d94e6bf1e3c 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -226,8 +226,7 @@ void XMLIndexAlphabeticalSourceContext::EndElement()
if (!sAlgorithm.isEmpty())
{
- aAny <<= sAlgorithm;
- rIndexPropertySet->setPropertyValue(sSortAlgorithm, aAny);
+ rIndexPropertySet->setPropertyValue(sSortAlgorithm, css::uno::Any(sAlgorithm));
}
if ( !maLanguageTagODF.isEmpty() )
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index 19e15810f37c..23fb8da97c80 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -157,13 +157,12 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList )
{
- OUString sKey;
- sal_Bool bSort(sal_True);
-
// process children here and use default context!
if ( ( nPrefix == XML_NAMESPACE_TEXT ) &&
IsXMLToken( rLocalName, XML_SORT_KEY ) )
{
+ OUString sKey;
+ bool bSort(true);
sal_Int16 nLength = xAttrList->getLength();
for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
{
@@ -195,20 +194,16 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext
if (SvXMLUnitConverter::convertEnum(nKey, sKey,
aBibliographyDataFieldMap))
{
-
- Any aAny;
Sequence<PropertyValue> aKey(2);
PropertyValue aNameValue;
aNameValue.Name = sSortKey;
- aAny <<= (sal_Int16)nKey;
- aNameValue.Value = aAny;
+ aNameValue.Value = Any((sal_Int16)nKey);
aKey[0] = aNameValue;
PropertyValue aSortValue;
aSortValue.Name = sIsSortAscending;
- aAny.setValue(&bSort, cppu::UnoType<bool>::get());
- aSortValue.Value = aAny;
+ aSortValue.Value = Any(bSort);
aKey[1] = aSortValue;
aSortKeys.push_back(aKey);
@@ -251,17 +246,10 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
Reference<XPropertySet> xPropSet( xIfc, UNO_QUERY );
Any aAny;
- aAny <<= sSuffix;
- xPropSet->setPropertyValue(sBracketAfter, aAny);
-
- aAny <<= sPrefix;
- xPropSet->setPropertyValue(sBracketBefore, aAny);
-
- aAny.setValue(&bNumberedEntries, cppu::UnoType<bool>::get());
- xPropSet->setPropertyValue(sIsNumberEntries, aAny);
-
- aAny.setValue(&bSortByPosition, cppu::UnoType<bool>::get());
- xPropSet->setPropertyValue(sIsSortByPosition, aAny);
+ xPropSet->setPropertyValue(sBracketAfter, Any(sSuffix));
+ xPropSet->setPropertyValue(sBracketBefore, Any(sPrefix));
+ xPropSet->setPropertyValue(sIsNumberEntries, Any(bNumberedEntries));
+ xPropSet->setPropertyValue(sIsSortByPosition, Any(bSortByPosition));
if( !maLanguageTagODF.isEmpty() )
{
@@ -271,8 +259,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
if( !sAlgorithm.isEmpty() )
{
- aAny <<= sAlgorithm;
- xPropSet->setPropertyValue(sSortAlgorithm, aAny);
+ xPropSet->setPropertyValue(sSortAlgorithm, Any(sAlgorithm));
}
sal_Int32 nCount = aSortKeys.size();
@@ -281,8 +268,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
{
aKeysSeq[i] = aSortKeys[i];
}
- aAny <<= aKeysSeq;
- xPropSet->setPropertyValue(sSortKeys, aAny);
+ xPropSet->setPropertyValue(sSortKeys, Any(aKeysSeq));
}
// else: can't get FieldMaster -> ignore
}
diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
index f775857c77fe..73f78e49a35e 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
@@ -157,9 +157,7 @@ void XMLIndexBibliographyEntryContext::FillPropertyValues(
// bibliography data field
sal_Int32 nIndex = bCharStyleNameOK ? 2 : 1;
rValues[nIndex].Name = rTemplateContext.sBibliographyDataField;
- Any aAny;
- aAny <<= nBibliographyInfo;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nBibliographyInfo);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
index a61ffaad93a7..d360c889071c 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -179,17 +179,13 @@ void XMLIndexChapterInfoEntryContext::FillPropertyValues(
{
// chapter info field
rValues[nIndex].Name = rTemplateContext.sChapterFormat;
- Any aAny;
- aAny <<= nChapterInfo;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nChapterInfo);
nIndex++;
}
if( bOutlineLevelOK )
{
rValues[nIndex].Name = rTemplateContext.sChapterLevel;
- Any aAny;
- aAny <<= nOutlineLevel;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nOutlineLevel);
}
}
diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
index 3267404f54ba..99d030789311 100644
--- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
@@ -110,8 +110,7 @@ void XMLIndexSimpleEntryContext::FillPropertyValues(
// token type
rValues[0].Name = rTemplateContext.sTokenType;
- aAny <<= rEntryType;
- rValues[0].Value = aAny;
+ rValues[0].Value = css::uno::Any(rEntryType);
// char style
if (bCharStyleNameOK)
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 9ed5e223c363..fd9876368dfa 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -246,8 +246,7 @@ void XMLIndexTOCContext::StartElement(
if (!sIndexName.isEmpty())
{
- aAny <<= sIndexName;
- xTOCPropertySet->setPropertyValue( sName, aAny );
+ xTOCPropertySet->setPropertyValue( sName, Any(sIndexName) );
}
}
}
diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
index 59f8497f40b5..32b18e4a75da 100644
--- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
@@ -146,8 +146,7 @@ void XMLIndexTOCSourceContext::EndElement()
aAny.setValue(&bUseParagraphStyles, cppu::UnoType<bool>::get());
rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, aAny);
- aAny <<= (sal_Int16)nOutlineLevel;
- rIndexPropertySet->setPropertyValue(sLevel, aAny);
+ rIndexPropertySet->setPropertyValue(sLevel, css::uno::Any((sal_Int16)nOutlineLevel));
// process common attributes
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
index d218d9ad9c93..f3a3bc8cd219 100644
--- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
@@ -106,8 +106,7 @@ void XMLIndexTOCStylesContext::EndElement()
aAny >>= xIndexReplace;
// set style names
- aAny <<= aStyleNamesSequence;
- xIndexReplace->replaceByIndex(nOutlineLevel, aAny);
+ xIndexReplace->replaceByIndex(nOutlineLevel, Any(aStyleNamesSequence));
}
}
diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx
index 871a75589604..724b95d40e55 100644
--- a/xmloff/source/text/XMLIndexTableSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx
@@ -133,14 +133,12 @@ void XMLIndexTableSourceContext::EndElement()
if (bSequenceOK)
{
- aAny <<= sSequence;
- rIndexPropertySet->setPropertyValue(sLabelCategory, aAny);
+ rIndexPropertySet->setPropertyValue(sLabelCategory, css::uno::Any(sSequence));
}
if (bDisplayFormatOK)
{
- aAny <<= nDisplayFormat;
- rIndexPropertySet->setPropertyValue(sLabelDisplayType, aAny);
+ rIndexPropertySet->setPropertyValue(sLabelDisplayType, css::uno::Any(nDisplayFormat));
}
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx
index cb5842b34738..1ee033a9c2b4 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -188,8 +188,7 @@ void XMLIndexTemplateContext::EndElement()
aAny >>= xIndexReplace;
// ... and insert
- aAny <<= aValueSequence;
- xIndexReplace->replaceByIndex(nOutlineLevel, aAny);
+ xIndexReplace->replaceByIndex(nOutlineLevel, Any(aValueSequence));
if (bStyleNameOK)
{
@@ -209,9 +208,8 @@ void XMLIndexTemplateContext::EndElement()
if( rStyles.is() &&
rStyles->hasByName( sDisplayStyleName ) )
{
- aAny <<= sDisplayStyleName;
rPropertySet->setPropertyValue(
- OUString::createFromAscii(pStyleProperty), aAny);
+ OUString::createFromAscii(pStyleProperty), css::uno::Any(sDisplayStyleName));
}
}
}
diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx
index a4a2d5cedac1..b853d4bbcbdb 100644
--- a/xmloff/source/text/XMLIndexUserSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx
@@ -176,8 +176,7 @@ void XMLIndexUserSourceContext::EndElement()
if( !sIndexName.isEmpty() )
{
- aAny <<= sIndexName;
- rIndexPropertySet->setPropertyValue(sUserIndexName, aAny);
+ rIndexPropertySet->setPropertyValue(sUserIndexName, css::uno::Any(sIndexName));
}
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx
index d04edaa32e6a..71bc60a5d7bd 100644
--- a/xmloff/source/text/XMLLineNumberingImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx
@@ -233,25 +233,18 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
xLineNumbering->setPropertyValue(sCharStyleName, aAny);
}
- aAny <<= sSeparator;
- xLineNumbering->setPropertyValue(sSeparatorText, aAny);
-
- aAny <<= nOffset;
- xLineNumbering->setPropertyValue(sDistance, aAny);
-
- aAny <<= nNumberPosition;
- xLineNumbering->setPropertyValue(sNumberPosition, aAny);
+ xLineNumbering->setPropertyValue(sSeparatorText, Any(sSeparator));
+ xLineNumbering->setPropertyValue(sDistance, Any(nOffset));
+ xLineNumbering->setPropertyValue(sNumberPosition, Any(nNumberPosition));
if (nIncrement >= 0)
{
- aAny <<= nIncrement;
- xLineNumbering->setPropertyValue(sInterval, aAny);
+ xLineNumbering->setPropertyValue(sInterval, Any(nIncrement));
}
if (nSeparatorIncrement >= 0)
{
- aAny <<= nSeparatorIncrement;
- xLineNumbering->setPropertyValue(sSeparatorInterval, aAny);
+ xLineNumbering->setPropertyValue(sSeparatorInterval, Any(nSeparatorIncrement));
}
aAny.setValue(&bNumberLines, cppu::UnoType<bool>::get());
@@ -270,8 +263,7 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumFormat,
sNumLetterSync );
- aAny <<= nNumType;
- xLineNumbering->setPropertyValue(sNumberingType, aAny);
+ xLineNumbering->setPropertyValue(sNumberingType, Any(nNumType));
}
}
}
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index 330f777613c5..d08480bb52d2 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -118,9 +118,7 @@ void XMLPropertyBackpatcher<A>::SetProperty(
if (aIDMap.count(sName))
{
// we know this ID -> set property
- Any aAny;
- aAny <<= aIDMap[sName];
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, css::uno::Any(aIDMap[sName]));
}
else
{
diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
index 8f3571220797..4e9973d055dd 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
@@ -128,53 +128,45 @@ void XMLSectionFootnoteConfigImport::StartElement(
}
// OK, now we have all values and can fill the XMLPropertyState vector
- Any aAny;
- aAny.setValue( &bNumOwn, cppu::UnoType<bool>::get() );
sal_Int32 nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_OWN : CTF_SECTION_FOOTNOTE_NUM_OWN );
- XMLPropertyState aNumOwn( nIndex, aAny );
+ XMLPropertyState aNumOwn( nIndex, css::uno::Any(bNumOwn) );
rProperties.push_back( aNumOwn );
- aAny.setValue( &bNumRestart, cppu::UnoType<bool>::get() );
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_RESTART : CTF_SECTION_FOOTNOTE_NUM_RESTART );
- XMLPropertyState aNumRestart( nIndex, aAny );
+ XMLPropertyState aNumRestart( nIndex, css::uno::Any(bNumRestart) );
rProperties.push_back( aNumRestart );
- aAny <<= nNumRestartAt;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_RESTART_AT :
CTF_SECTION_FOOTNOTE_NUM_RESTART_AT );
- XMLPropertyState aNumRestartAtState( nIndex, aAny );
+ XMLPropertyState aNumRestartAtState( nIndex, css::uno::Any(nNumRestartAt) );
rProperties.push_back( aNumRestartAtState );
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumFormat,
sNumLetterSync );
- aAny <<= nNumType;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_TYPE : CTF_SECTION_FOOTNOTE_NUM_TYPE );
- XMLPropertyState aNumFormatState( nIndex, aAny );
+ XMLPropertyState aNumFormatState( nIndex, css::uno::Any(nNumType) );
rProperties.push_back( aNumFormatState );
- aAny <<= sNumPrefix;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_PREFIX : CTF_SECTION_FOOTNOTE_NUM_PREFIX );
- XMLPropertyState aPrefixState( nIndex, aAny );
+ XMLPropertyState aPrefixState( nIndex, css::uno::Any(sNumPrefix) );
rProperties.push_back( aPrefixState );
- aAny <<= sNumSuffix;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_SUFFIX : CTF_SECTION_FOOTNOTE_NUM_SUFFIX );
- XMLPropertyState aSuffixState( nIndex, aAny );
+ XMLPropertyState aSuffixState( nIndex, css::uno::Any(sNumSuffix) );
rProperties.push_back( aSuffixState );
- aAny.setValue( &bEnd, cppu::UnoType<bool>::get() );
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_END : CTF_SECTION_FOOTNOTE_END );
- XMLPropertyState aEndState( nIndex, aAny );
+ XMLPropertyState aEndState( nIndex, css::uno::Any(bEnd) );
rProperties.push_back( aEndState );
}
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index 7e9bbda0250e..ef567ed29ef6 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -183,8 +183,7 @@ void XMLSectionImportContext::StartElement(
if (bCondOK)
{
- aAny <<= sCond;
- xPropSet->setPropertyValue( sCondition, aAny );
+ xPropSet->setPropertyValue( sCondition, Any(sCond) );
}
}
@@ -192,9 +191,7 @@ void XMLSectionImportContext::StartElement(
if ( bSequenceOK &&
IsXMLToken(GetLocalName(), XML_SECTION) )
{
- Any aAny;
- aAny <<= aSequence;
- xPropSet->setPropertyValue(sProtectionKey, aAny);
+ xPropSet->setPropertyValue(sProtectionKey, Any(aSequence));
}
// protection
diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx
index 91ab4bf94448..78d4847a3dbb 100644
--- a/xmloff/source/text/XMLSectionSourceImportContext.cxx
+++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx
@@ -110,21 +110,18 @@ void XMLSectionSourceImportContext::StartElement(
const OUString sFileLink("FileLink");
const OUString sLinkRegion("LinkRegion");
- Any aAny;
if (!sURL.isEmpty() || !sFilterName.isEmpty())
{
SectionFileLink aFileLink;
aFileLink.FileURL = GetImport().GetAbsoluteReference( sURL );
aFileLink.FilterName = sFilterName;
- aAny <<= aFileLink;
- rSectionPropertySet->setPropertyValue(sFileLink, aAny);
+ rSectionPropertySet->setPropertyValue(sFileLink, Any(aFileLink));
}
if (!sSectionName.isEmpty())
{
- aAny <<= sSectionName;
- rSectionPropertySet->setPropertyValue(sLinkRegion, aAny);
+ rSectionPropertySet->setPropertyValue(sLinkRegion, Any(sSectionName));
}
}
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index b99a4506e6e2..cdc18f4021ae 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -452,33 +452,27 @@ void XMLTextColumnsContext::EndElement( )
{
if( pColumnSep->GetWidth() )
{
- aAny <<= pColumnSep->GetWidth();
- xPropSet->setPropertyValue( sSeparatorLineWidth, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineWidth, Any(pColumnSep->GetWidth()) );
}
if( pColumnSep->GetHeight() )
{
- aAny <<= pColumnSep->GetHeight();
xPropSet->setPropertyValue( sSeparatorLineRelativeHeight,
- aAny );
+ Any(pColumnSep->GetHeight()) );
}
if ( pColumnSep->GetStyle() )
{
- aAny <<= pColumnSep->GetStyle();
- xPropSet->setPropertyValue( sSeparatorLineStyle, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineStyle, Any(pColumnSep->GetStyle()) );
}
- aAny <<= pColumnSep->GetColor();
- xPropSet->setPropertyValue( sSeparatorLineColor, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineColor, Any(pColumnSep->GetColor()) );
- aAny <<= pColumnSep->GetVertAlign();
- xPropSet->setPropertyValue( sSeparatorLineVerticalAlignment, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineVerticalAlignment, Any(pColumnSep->GetVertAlign()) );
}
// handle 'automatic columns': column distance
if( bAutomatic )
{
- aAny <<= nAutomaticDistance;
- xPropSet->setPropertyValue( sAutomaticDistance, aAny );
+ xPropSet->setPropertyValue( sAutomaticDistance, Any(nAutomaticDistance) );
}
}
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 20768ff1fd55..82191a9ad3f7 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -285,7 +285,6 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
{
const SdXMLImExViewBox aViewBox( sViewBox, GetImport().GetMM100UnitConverter());
basegfx::B2DPolyPolygon aPolyPolygon;
- Any aAny;
if( bPath )
{
@@ -320,24 +319,21 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
com::sun::star::drawing::PointSequenceSequence aPointSequenceSequence;
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(aPolyPolygon, aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue( sContourPolyPolygon, aAny );
+ xPropSet->setPropertyValue( sContourPolyPolygon, Any(aPointSequenceSequence) );
}
const OUString sIsPixelContour("IsPixelContour");
if( xPropSetInfo->hasPropertyByName( sIsPixelContour ) )
{
- aAny.setValue( &bPixelWidth, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsPixelContour, aAny );
+ xPropSet->setPropertyValue( sIsPixelContour, Any(bPixelWidth) );
}
const OUString sIsAutomaticContour("IsAutomaticContour");
if( xPropSetInfo->hasPropertyByName( sIsAutomaticContour ) )
{
- aAny.setValue( &bAuto, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsAutomaticContour, aAny );
+ xPropSet->setPropertyValue( sIsAutomaticContour, Any(bAuto) );
}
}
}
@@ -626,16 +622,14 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
if( rStyles.is() &&
rStyles->hasByName( sDisplayStyleName ) )
{
- aAny <<= sDisplayStyleName;
- xPropSet->setPropertyValue( sFrameStyleName, aAny );
+ xPropSet->setPropertyValue( sFrameStyleName, Any(sDisplayStyleName) );
}
}
// anchor type (must be set before any other properties, because
// otherwise some orientations cannot be set or will be changed
// afterwards)
- aAny <<= eAnchorType;
- xPropSet->setPropertyValue( sAnchorType, aAny );
+ xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
// hard properties
if( pStyle )
@@ -647,8 +641,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
aAny >>= nHoriOrient;
if( HoriOrientation::NONE == nHoriOrient )
{
- aAny <<= nX;
- xPropSet->setPropertyValue( sHoriOrientPosition, aAny );
+ xPropSet->setPropertyValue( sHoriOrientPosition, Any(nX) );
}
sal_Int16 nVertOrient = VertOrientation::NONE;
@@ -656,26 +649,21 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
aAny >>= nVertOrient;
if( VertOrientation::NONE == nVertOrient )
{
- aAny <<= nY;
- xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
}
// width
if( nWidth > 0 )
{
- aAny <<= nWidth;
- xPropSet->setPropertyValue( sWidth, aAny );
+ xPropSet->setPropertyValue( sWidth, Any(nWidth) );
}
if( nRelWidth > 0 || nWidth > 0 )
{
- aAny <<= nRelWidth;
- xPropSet->setPropertyValue( sRelativeWidth, aAny );
+ xPropSet->setPropertyValue( sRelativeWidth, Any(nRelWidth) );
}
if( bSyncWidth || nWidth > 0 )
{
- sal_Bool bTmp = bSyncWidth;
- aAny.setValue( &bTmp, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsSyncWidthToHeight, aAny );
+ xPropSet->setPropertyValue( sIsSyncWidthToHeight, Any(bSyncWidth) );
}
if( xPropSetInfo->hasPropertyByName( sWidthType ) &&
(bMinWidth || nWidth > 0 || nRelWidth > 0 ) )
@@ -683,25 +671,20 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sal_Int16 nSizeType =
(bMinWidth && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- aAny <<= nSizeType;
- xPropSet->setPropertyValue( sWidthType, aAny );
+ xPropSet->setPropertyValue( sWidthType, Any(nSizeType) );
}
if( nHeight > 0 )
{
- aAny <<= nHeight;
- xPropSet->setPropertyValue( sHeight, aAny );
+ xPropSet->setPropertyValue( sHeight, Any(nHeight) );
}
if( nRelHeight > 0 || nHeight > 0 )
{
- aAny <<= nRelHeight;
- xPropSet->setPropertyValue( sRelativeHeight, aAny );
+ xPropSet->setPropertyValue( sRelativeHeight, Any(nRelHeight) );
}
if( bSyncHeight || nHeight > 0 )
{
- sal_Bool bTmp = bSyncHeight;
- aAny.setValue( &bTmp, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsSyncHeightToWidth, aAny );
+ xPropSet->setPropertyValue( sIsSyncHeightToWidth, Any(bSyncHeight) );
}
if( xPropSetInfo->hasPropertyByName( sSizeType ) &&
(bMinHeight || nHeight > 0 || nRelHeight > 0 ) )
@@ -709,8 +692,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sal_Int16 nSizeType =
(bMinHeight && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- aAny <<= nSizeType;
- xPropSet->setPropertyValue( sSizeType, aAny );
+ xPropSet->setPropertyValue( sSizeType, Any(nSizeType) );
}
if( XML_TEXT_FRAME_GRAPHIC == nType )
@@ -733,24 +715,20 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sHRef = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream );
xBase64Stream = nullptr;
}
- aAny <<= sHRef;
- xPropSet->setPropertyValue( sGraphicURL, aAny );
+ xPropSet->setPropertyValue( sGraphicURL, Any(sHRef) );
// filter name
- aAny <<=sFilterName;
- xPropSet->setPropertyValue( sGraphicFilter, aAny );
+ xPropSet->setPropertyValue( sGraphicFilter, Any(sFilterName) );
// rotation
- aAny <<= nRotation;
- xPropSet->setPropertyValue( sGraphicRotation, aAny );
+ xPropSet->setPropertyValue( sGraphicRotation, Any(nRotation) );
}
// page number (must be set after the frame is inserted, because it
// will be overwritten then inserting the frame.
if( TextContentAnchorType_AT_PAGE == eAnchorType && nPage > 0 )
{
- aAny <<= nPage;
- xPropSet->setPropertyValue( sAnchorPageNo, aAny );
+ xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
}
if( XML_TEXT_FRAME_OBJECT != nType &&
@@ -1287,26 +1265,21 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef,
!xPropSetInfo->hasPropertyByName(s_HyperLinkURL))
return;
- Any aAny;
- aAny <<= rHRef;
- xPropSet->setPropertyValue( s_HyperLinkURL, aAny );
+ xPropSet->setPropertyValue( s_HyperLinkURL, Any(rHRef) );
if (xPropSetInfo->hasPropertyByName(s_HyperLinkName))
{
- aAny <<= rName;
- xPropSet->setPropertyValue(s_HyperLinkName, aAny);
+ xPropSet->setPropertyValue(s_HyperLinkName, Any(rName));
}
if (xPropSetInfo->hasPropertyByName(s_HyperLinkTarget))
{
- aAny <<= rTargetFrameName;
- xPropSet->setPropertyValue( s_HyperLinkTarget, aAny );
+ xPropSet->setPropertyValue( s_HyperLinkTarget, Any(rTargetFrameName) );
}
if (xPropSetInfo->hasPropertyByName(s_ServerMap))
{
- aAny.setValue( &bMap, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue(s_ServerMap, aAny);
+ xPropSet->setPropertyValue(s_ServerMap, Any(bMap));
}
}
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 267bf0eed1c4..40416adf2c43 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -137,8 +137,7 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
if( !xStyle.is() )
return;
- aAny <<= xStyle;
- xPageStyles->insertByName( sDisplayName, aAny );
+ xPageStyles->insertByName( sDisplayName, Any(xStyle) );
bNew = true;
}
@@ -283,8 +282,7 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
aAny >>= sCurrFollow;
if( sCurrFollow != sDisplayFollow )
{
- aAny <<= sDisplayFollow;
- xPropSet->setPropertyValue( sFollowStyle, aAny );
+ xPropSet->setPropertyValue( sFollowStyle, Any(sDisplayFollow) );
}
}
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 60aae4701189..be9f7f05651e 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -120,11 +120,9 @@ void XMLTextShapeImportHelper::addShape(
}
Reference < XPropertySet > xPropSet( rShape, UNO_QUERY );
- Any aAny;
// anchor type
- aAny <<= eAnchorType;
- xPropSet->setPropertyValue( sAnchorType, aAny );
+ xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
Reference < XTextContent > xTxtCntnt( rShape, UNO_QUERY );
xTxtImport->InsertTextContent( xTxtCntnt );
@@ -137,13 +135,11 @@ void XMLTextShapeImportHelper::addShape(
// only set positive page numbers
if ( nPage > 0 )
{
- aAny <<= nPage;
- xPropSet->setPropertyValue( sAnchorPageNo, aAny );
+ xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
}
break;
case TextContentAnchorType_AS_CHARACTER:
- aAny <<= nY;
- xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
break;
default:
break;
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 7836ce61f63d..80d22879f773 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -707,13 +707,10 @@ void XMLSenderFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropSet)
{
// set members
- Any aAny;
- aAny <<= nSubType;
- rPropSet->setPropertyValue(sPropertyFieldSubType, aAny);
+ rPropSet->setPropertyValue(sPropertyFieldSubType, Any(nSubType));
// set fixed
- aAny.setValue( &bFixed, cppu::UnoType<bool>::get() );
- rPropSet->setPropertyValue(sPropertyFixed, aAny);
+ rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
// set content if fixed
if (bFixed)
@@ -726,8 +723,7 @@ void XMLSenderFieldImportContext::PrepareField(
}
else
{
- aAny <<= GetContent();
- rPropSet->setPropertyValue(sPropertyContent, aAny);
+ rPropSet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
}
}
@@ -766,11 +762,9 @@ void XMLAuthorFieldImportContext::PrepareField(
{
// set members
Any aAny;
- aAny.setValue( &bAuthorFullName, cppu::UnoType<bool>::get() );
- rPropSet->setPropertyValue(sPropertyAuthorFullName, aAny);
+ rPropSet->setPropertyValue(sPropertyAuthorFullName, Any(bAuthorFullName));
- aAny.setValue( &bFixed, cppu::UnoType<bool>::get() );
- rPropSet->setPropertyValue(sPropertyFixed, aAny);
+ rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
// set content if fixed
if (bFixed)
@@ -842,8 +836,7 @@ void XMLPageContinuationImportContext::PrepareField(
{
Any aAny;
- aAny <<= eSelectPage;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(eSelectPage));
aAny <<= (sStringOK ? sString : GetContent());
xPropertySet->setPropertyValue(sPropertyUserText, aAny);
@@ -909,8 +902,6 @@ void XMLPageNumberImportContext::ProcessAttribute(
void XMLPageNumberImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// all properties are optional
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
@@ -928,8 +919,7 @@ void XMLPageNumberImportContext::PrepareField(
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyOffset))
@@ -948,14 +938,12 @@ void XMLPageNumberImportContext::PrepareField(
default:
SAL_WARN("xmloff.text", "unknown page number type");
}
- aAny <<= nPageAdjust;
- xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+ xPropertySet->setPropertyValue(sPropertyOffset, Any(nPageAdjust));
}
if (xPropertySetInfo->hasPropertyByName(sPropertySubType))
{
- aAny <<= eSelectPage;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(eSelectPage));
}
}
@@ -1020,8 +1008,7 @@ void XMLPlaceholderFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet) {
Any aAny;
- aAny <<= sDescription;
- xPropertySet->setPropertyValue(sPropertyHint, aAny);
+ xPropertySet->setPropertyValue(sPropertyHint, Any(sDescription));
// remove <...> around content (if present)
OUString aContent = GetContent();
@@ -1039,8 +1026,7 @@ void XMLPlaceholderFieldImportContext::PrepareField(
aAny <<= aContent.copy(nStart, nLength);
xPropertySet->setPropertyValue(sPropertyPlaceholder, aAny);
- aAny <<= nPlaceholderType;
- xPropertySet->setPropertyValue(sPropertyPlaceholderType, aAny);
+ xPropertySet->setPropertyValue(sPropertyPlaceholderType, Any(nPlaceholderType));
}
@@ -1120,25 +1106,20 @@ void XMLTimeFieldImportContext::ProcessAttribute(
void XMLTimeFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
-
// all properties are optional (except IsDate)
Reference<XPropertySetInfo> xPropertySetInfo(
rPropertySet->getPropertySetInfo());
if (xPropertySetInfo->hasPropertyByName(sPropertyFixed))
{
- aAny.setValue( &bFixed, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue(sPropertyFixed, aAny);
+ rPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed));
}
- aAny.setValue( &bIsDate, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue(sPropertyIsDate, aAny);
+ rPropertySet->setPropertyValue(sPropertyIsDate, Any(bIsDate));
if (xPropertySetInfo->hasPropertyByName(sPropertyAdjust))
{
- aAny <<= nAdjust;
- rPropertySet->setPropertyValue(sPropertyAdjust, aAny);
+ rPropertySet->setPropertyValue(sPropertyAdjust, Any(nAdjust));
}
// set value
@@ -1157,13 +1138,11 @@ void XMLTimeFieldImportContext::PrepareField(
{
if (xPropertySetInfo->hasPropertyByName(sPropertyDateTimeValue))
{
- aAny <<= aDateTimeValue;
- rPropertySet->setPropertyValue(sPropertyDateTimeValue,aAny);
+ rPropertySet->setPropertyValue(sPropertyDateTimeValue, Any(aDateTimeValue));
}
else if (xPropertySetInfo->hasPropertyByName(sPropertyDateTime))
{
- aAny <<= aDateTimeValue;
- rPropertySet->setPropertyValue(sPropertyDateTime, aAny);
+ rPropertySet->setPropertyValue(sPropertyDateTime, Any(aDateTimeValue));
}
}
}
@@ -1172,14 +1151,12 @@ void XMLTimeFieldImportContext::PrepareField(
if (bFormatOK &&
xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat))
{
- aAny <<= nFormatKey;
- rPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ rPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormatKey));
if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- sal_Bool bIsFixedLanguage = ! bIsDefaultLanguage;
- aAny.setValue( &bIsFixedLanguage, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue( sPropertyIsFixedLanguage, aAny );
+ bool bIsFixedLanguage = ! bIsDefaultLanguage;
+ rPropertySet->setPropertyValue( sPropertyIsFixedLanguage, Any(bIsFixedLanguage) );
}
}
}
@@ -1337,34 +1314,27 @@ SvXMLImportContext* XMLDatabaseFieldImportContext::CreateChildContext(
void XMLDatabaseFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sTableName;
- xPropertySet->setPropertyValue(sPropertyTableName, aAny);
+ xPropertySet->setPropertyValue(sPropertyTableName, Any(sTableName));
if( bDatabaseNameOK )
{
- aAny <<= sDatabaseName;
- xPropertySet->setPropertyValue(sPropertyDataBaseName, aAny);
+ xPropertySet->setPropertyValue(sPropertyDataBaseName, Any(sDatabaseName));
}
else if( bDatabaseURLOK )
{
- aAny <<= sDatabaseURL;
- xPropertySet->setPropertyValue(sPropertyDataBaseURL, aAny);
+ xPropertySet->setPropertyValue(sPropertyDataBaseURL, Any(sDatabaseURL));
}
// #99980# load/save command type for all fields; also load
// old documents without command type
if( bCommandTypeOK )
{
- aAny <<= nCommandType;
- xPropertySet->setPropertyValue( sPropertyDataCommandType, aAny );
+ xPropertySet->setPropertyValue( sPropertyDataCommandType, Any(nCommandType) );
}
if( bUseDisplay && bDisplayOK )
{
- aAny.setValue( &bDisplay, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue( sPropertyIsVisible, aAny );
+ xPropertySet->setPropertyValue( sPropertyIsVisible, Any(bDisplay) );
}
}
@@ -1491,10 +1461,7 @@ void XMLDatabaseSelectImportContext::ProcessAttribute(
void XMLDatabaseSelectImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nNumber;
- xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+ xPropertySet->setPropertyValue(sPropertySetNumber, Any(nNumber));
XMLDatabaseNextImportContext::PrepareField(xPropertySet);
}
@@ -1552,19 +1519,15 @@ void XMLDatabaseNumberImportContext::ProcessAttribute(
void XMLDatabaseNumberImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
sal_Int16 nNumType = style::NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumberFormat,
sNumberSync );
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
if (bValueOK)
{
- aAny <<= nValue;
- xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+ xPropertySet->setPropertyValue(sPropertySetNumber, Any(nValue));
}
XMLDatabaseFieldImportContext::PrepareField(xPropertySet);
@@ -1612,8 +1575,7 @@ void XMLSimpleDocInfoImportContext::PrepareField(
if (xPropertySetInfo->hasPropertyByName(sPropertyFixed))
{
Any aAny;
- aAny.setValue(&bFixed, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue(sPropertyFixed, aAny);
+ rPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed));
// set Content and CurrentPresentation (if fixed)
if (bFixed)
@@ -1744,9 +1706,7 @@ void XMLRevisionDocInfoImportContext::PrepareField(
sal_Int32 nTmp;
if (::sax::Converter::convertNumber(nTmp, GetContent()))
{
- Any aAny;
- aAny <<= nTmp;
- rPropertySet->setPropertyValue(sPropertyRevision, aAny);
+ rPropertySet->setPropertyValue(sPropertyRevision, Any(nTmp));
}
}
}
@@ -1833,25 +1793,20 @@ void XMLDateTimeDocInfoImportContext::PrepareField(
// process fixed and presentation
XMLSimpleDocInfoImportContext::PrepareField(xPropertySet);
- Any aAny;
-
if (bHasDateTime)
{
- aAny.setValue( &bIsDate, cppu::UnoType<bool>::get());
- xPropertySet->setPropertyValue(sPropertyIsDate, aAny);
+ xPropertySet->setPropertyValue(sPropertyIsDate, Any(bIsDate));
}
if (bFormatOK)
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormat));
if( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- sal_Bool bIsFixedLanguage = ! bIsDefaultLanguage;
- aAny.setValue( &bIsFixedLanguage, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, aAny );
+ bool bIsFixedLanguage = ! bIsDefaultLanguage;
+ xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, Any(bIsFixedLanguage) );
}
}
@@ -1917,25 +1872,21 @@ void XMLUserDocInfoImportContext::PrepareField(
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet> & xPropertySet)
{
- uno::Any aAny;
if ( !aName.isEmpty() )
{
- aAny <<= aName;
- xPropertySet->setPropertyValue(sPropertyName, aAny);
+ xPropertySet->setPropertyValue(sPropertyName, Any(aName));
}
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
if (bFormatOK &&
xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat))
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormat));
if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- sal_Bool bIsFixedLanguage = ! bIsDefaultLanguage;
- aAny.setValue( &bIsFixedLanguage, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, aAny );
+ bool bIsFixedLanguage = ! bIsDefaultLanguage;
+ xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, Any(bIsFixedLanguage) );
}
}
@@ -1989,12 +1940,8 @@ void XMLHiddenParagraphImportContext::ProcessAttribute(
void XMLHiddenParagraphImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny.setValue( &bIsHidden, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue(sPropertyIsHidden, aAny);
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2063,22 +2010,11 @@ void XMLConditionalTextImportContext::ProcessAttribute(
void XMLConditionalTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny <<= sFalseContent;
- xPropertySet->setPropertyValue(sPropertyFalseContent, aAny);
-
- aAny <<= sTrueContent;
- xPropertySet->setPropertyValue(sPropertyTrueContent, aAny);
-
- aAny.setValue( &bCurrentValue, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue(sPropertyIsConditionTrue, aAny);
-
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyFalseContent, Any(sFalseContent));
+ xPropertySet->setPropertyValue(sPropertyTrueContent, Any(sTrueContent));
+ xPropertySet->setPropertyValue(sPropertyIsConditionTrue, Any(bCurrentValue));
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -2140,16 +2076,9 @@ void XMLHiddenTextImportContext::ProcessAttribute(
void XMLHiddenTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny <<= sString;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
-
- aAny.setValue( &bIsHidden, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue(sPropertyIsHidden, aAny);
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sString));
+ xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2214,28 +2143,23 @@ void XMLFileNameImportContext::ProcessAttribute(
void XMLFileNameImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// properties are optional
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
if (xPropertySetInfo->hasPropertyByName(sPropertyFixed))
{
- aAny <<= bFixed;
- xPropertySet->setPropertyValue(sPropertyFixed, aAny);
+ xPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyFileFormat))
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyFileFormat, Any(nFormat));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyCurrentPresentation))
{
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
}
@@ -2291,10 +2215,7 @@ void XMLTemplateNameImportContext::ProcessAttribute(
void XMLTemplateNameImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyFileFormat, Any(nFormat));
}
@@ -2364,13 +2285,8 @@ void XMLChapterImportContext::ProcessAttribute(
void XMLChapterImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyChapterFormat, aAny);
-
- aAny <<= nLevel;
- xPropertySet->setPropertyValue(sPropertyLevel, aAny);
+ xPropertySet->setPropertyValue(sPropertyChapterFormat, Any(nFormat));
+ xPropertySet->setPropertyValue(sPropertyLevel, Any(nLevel));
}
@@ -2410,8 +2326,6 @@ void XMLCountFieldImportContext::ProcessAttribute(
void XMLCountFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// properties optional
// (only page count, but do for all to save common implementation)
@@ -2428,8 +2342,7 @@ void XMLCountFieldImportContext::PrepareField(
}
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
}
}
@@ -2507,8 +2420,6 @@ void XMLPageVarGetFieldImportContext::ProcessAttribute(
void XMLPageVarGetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
sal_Int16 nNumType;
if( bNumberFormatOK )
{
@@ -2519,12 +2430,10 @@ void XMLPageVarGetFieldImportContext::PrepareField(
}
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
// display old content (#96657#)
- aAny <<= GetContent();
- xPropertySet->setPropertyValue( sAPI_current_presentation, aAny );
+ xPropertySet->setPropertyValue( sAPI_current_presentation, Any(GetContent()) );
}
@@ -2576,13 +2485,8 @@ void XMLPageVarSetFieldImportContext::ProcessAttribute(
void XMLPageVarSetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny.setValue(&bActive, cppu::UnoType<bool>::get());
- xPropertySet->setPropertyValue(sPropertyOn, aAny);
-
- aAny <<= nAdjust;
- xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+ xPropertySet->setPropertyValue(sPropertyOn, Any(bActive));
+ xPropertySet->setPropertyValue(sPropertyOffset, Any(nAdjust));
}
@@ -2711,14 +2615,9 @@ void XMLMacroFieldImportContext::PrepareField(
sMacroName = sMacro;
}
- aAny <<= sScriptURL;
- xPropertySet->setPropertyValue(sPropertyScriptURL, aAny);
-
- aAny <<= sMacroName;
- xPropertySet->setPropertyValue(sPropertyMacroName, aAny);
-
- aAny <<= sLibraryName;
- xPropertySet->setPropertyValue(sPropertyMacroLibrary, aAny);
+ xPropertySet->setPropertyValue(sPropertyScriptURL, Any(sScriptURL));
+ xPropertySet->setPropertyValue(sPropertyMacroName, Any(sMacroName));
+ xPropertySet->setPropertyValue(sPropertyMacroLibrary, Any(sLibraryName));
}
@@ -2828,20 +2727,15 @@ void XMLReferenceFieldImportContext::ProcessAttribute(
void XMLReferenceFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nType;
- xPropertySet->setPropertyValue(sPropertyReferenceFieldPart, aAny);
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldPart, Any(nType));
- aAny <<= nSource;
- xPropertySet->setPropertyValue(sPropertyReferenceFieldSource, aAny);
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldSource, Any(nSource));
switch (nElementToken)
{
case XML_TOK_TEXT_REFERENCE_REF:
case XML_TOK_TEXT_BOOKMARK_REF:
- aAny <<= sName;
- xPropertySet->setPropertyValue(sPropertySourceName, aAny);
+ xPropertySet->setPropertyValue(sPropertySourceName, Any(sName));
break;
case XML_TOK_TEXT_NOTE_REF:
@@ -2853,8 +2747,7 @@ void XMLReferenceFieldImportContext::PrepareField(
break;
}
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -3010,24 +2903,17 @@ void XMLDdeFieldDeclImportContext::StartElement(
xPropSet->getPropertySetInfo()->hasPropertyByName(
sPropertyDDECommandType))
{
- Any aAny;
-
- aAny <<= sName;
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, Any(sName));
- aAny <<= sCommandApplication;
- xPropSet->setPropertyValue(sPropertyDDECommandType, aAny);
+ xPropSet->setPropertyValue(sPropertyDDECommandType, Any(sCommandApplication));
- aAny <<= sCommandTopic;
- xPropSet->setPropertyValue(sPropertyDDECommandFile, aAny);
+ xPropSet->setPropertyValue(sPropertyDDECommandFile, Any(sCommandTopic));
- aAny <<= sCommandItem;
xPropSet->setPropertyValue(sPropertyDDECommandElement,
- aAny);
+ Any(sCommandItem));
- aAny.setValue(&bUpdate, cppu::UnoType<bool>::get());
xPropSet->setPropertyValue(sPropertyIsAutomaticUpdate,
- aAny);
+ Any(bUpdate));
}
// else: ignore (can't get XPropertySet, or DDE
// properties are not supported)
@@ -3220,19 +3106,14 @@ void XMLUrlFieldImportContext::ProcessAttribute(
void XMLUrlFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sURL;
- xPropertySet->setPropertyValue(sPropertyURL, aAny);
+ xPropertySet->setPropertyValue(sPropertyURL, Any(sURL));
if (bFrameOK)
{
- aAny <<= sFrame;
- xPropertySet->setPropertyValue(sPropertyTargetFrame, aAny);
+ xPropertySet->setPropertyValue(sPropertyTargetFrame, Any(sFrame));
}
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyRepresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyRepresentation, Any(GetContent()));
}
@@ -3348,9 +3229,7 @@ void XMLBibliographyFieldImportContext::PrepareField(
}
// set sequence
- Any aAny;
- aAny <<= aValueSequence;
- xPropertySet->setPropertyValue(sPropertyFields, aAny);
+ xPropertySet->setPropertyValue(sPropertyFields, Any(aValueSequence));
}
const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName(
@@ -3763,22 +3642,17 @@ void XMLScriptImportContext::ProcessAttribute(
void XMLScriptImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// if href attribute was present, we use it. Else we use element content
if (! bContentOK)
{
sContent = GetContent();
}
- aAny <<= sContent;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sContent));
// URL or script text? We use URL if we have an href-attribute
- aAny.setValue(&bContentOK, cppu::UnoType<bool>::get());
- xPropertySet->setPropertyValue(sPropertyURLContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyURLContent, Any(bContentOK));
- aAny <<= sScriptType;
- xPropertySet->setPropertyValue(sPropertyScriptType, aAny);
+ xPropertySet->setPropertyValue(sPropertyScriptType, Any(sScriptType));
}
@@ -3822,9 +3696,7 @@ void XMLMeasureFieldImportContext::ProcessAttribute(
void XMLMeasureFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= mnKind;
- xPropertySet->setPropertyValue("Kind", aAny);
+ xPropertySet->setPropertyValue("Kind", Any(mnKind));
}
@@ -3937,34 +3809,28 @@ void XMLDropDownFieldImportContext::PrepareField(
pSequence[n] = aLabels[n];
// now set values:
- Any aAny;
- aAny <<= aSequence;
- xPropertySet->setPropertyValue( sPropertyItems, aAny );
+ xPropertySet->setPropertyValue( sPropertyItems, Any(aSequence) );
if( nSelected >= 0 && nSelected < nLength )
{
- aAny <<= pSequence[nSelected];
- xPropertySet->setPropertyValue( sPropertySelectedItem, aAny );
+ xPropertySet->setPropertyValue( sPropertySelectedItem, Any(pSequence[nSelected]) );
}
// set name
if( bNameOK )
{
- aAny <<= sName;
- xPropertySet->setPropertyValue( sPropertyName, aAny );
+ xPropertySet->setPropertyValue( sPropertyName, Any(sName) );
}
// set help
if( bHelpOK )
{
- aAny <<= sHelp;
- xPropertySet->setPropertyValue( sPropertyHelp, aAny );
+ xPropertySet->setPropertyValue( sPropertyHelp, Any(sHelp) );
}
// set hint
if( bHintOK )
{
- aAny <<= sHint;
- xPropertySet->setPropertyValue( sPropertyToolTip, aAny );
+ xPropertySet->setPropertyValue( sPropertyToolTip, Any(sHint) );
}
}
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index f2ac9f27bb14..65cf9d5c6c65 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -975,17 +975,13 @@ void XMLMetaFieldImportContext::InsertMeta(
if (-1 != nKey)
{
- static OUString sPropertyIsFixedLanguage(
- OUString("IsFixedLanguage") );
- Any any;
- any <<= nKey;
- xPropertySet->setPropertyValue("NumberFormat", any);
+ OUString sPropertyIsFixedLanguage("IsFixedLanguage");
+ xPropertySet->setPropertyValue("NumberFormat", Any(nKey));
if ( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- any <<= static_cast<bool>(!isDefaultLanguage);
xPropertySet->setPropertyValue( sPropertyIsFixedLanguage,
- any );
+ Any(!isDefaultLanguage) );
}
}
}
@@ -2166,10 +2162,7 @@ XMLParaContext::~XMLParaContext()
{
// set anchor position for at-character anchored objects
Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY);
- Any aPos;
- aPos <<= xRange;
- OUString sTextRange( "TextRange" );
- xPropSet->setPropertyValue(sTextRange, aPos);
+ xPropSet->setPropertyValue("TextRange", Any(xRange));
}
}
}
@@ -2198,10 +2191,7 @@ XMLParaContext::~XMLParaContext()
{
// set anchor position for at-character anchored objects
Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY);
- Any aPos;
- aPos <<= xRange;
- OUString sTextRange( "TextRange" );
- xPropSet->setPropertyValue(sTextRange, aPos);
+ xPropSet->setPropertyValue("TextRange", Any(xRange));
}
}
}
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 17a4b0ce5e14..bfbf9f9d5694 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -227,9 +227,7 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
xPropSetInfo->hasPropertyByName( sCategory ) &&
SvXMLUnitConverter::convertEnum( nCategory, sCategoryVal, aCategoryMap ) )
{
- Any aAny;
- aAny <<= (sal_Int16)nCategory;
- xPropSet->setPropertyValue( sCategory, aAny );
+ xPropSet->setPropertyValue( sCategory, Any((sal_Int16)nCategory) );
}
// tell the style about it's events (if applicable)
@@ -286,11 +284,9 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if( xPropSetInfo->hasPropertyByName( sOutlineLevel ))
{
- Any aAny;
if( nOutlineLevel >= 0 )
{
- aAny <<= nOutlineLevel;
- xPropSet->setPropertyValue( sOutlineLevel, aAny );
+ xPropSet->setPropertyValue( sOutlineLevel, Any(nOutlineLevel) );
}
}
@@ -328,9 +324,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
{
if ( sListStyleName.isEmpty() )
{
- Any aAny;
- aAny <<= sListStyleName /* empty string */;
- xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ xPropSet->setPropertyValue( sNumberingStyleName, Any(sListStyleName) ); /* empty string */;
}
else
{
@@ -346,9 +340,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if ( rNumStyles.is() &&
rNumStyles->hasByName( sDisplayListStyleName ) )
{
- Any aAny;
- aAny <<= sDisplayListStyleName;
- xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ xPropSet->setPropertyValue( sNumberingStyleName, Any(sDisplayListStyleName) );
}
}
}
@@ -367,9 +359,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
rTextStyles->hasByName( sDisplayDropCapTextStyleName ) &&
xPropSetInfo->hasPropertyByName( sDropCapCharStyleName ) )
{
- Any aAny;
- aAny <<= sDisplayDropCapTextStyleName;
- xPropSet->setPropertyValue( sDropCapCharStyleName, aAny );
+ xPropSet->setPropertyValue( sDropCapCharStyleName, Any(sDisplayDropCapTextStyleName) );
}
}
@@ -386,9 +376,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
rPageStyles->hasByName( sDisplayName )) ) &&
xPropSetInfo->hasPropertyByName( sPageDescName ) )
{
- Any aAny;
- aAny <<= sDisplayName;
- xPropSet->setPropertyValue( sPageDescName, aAny );
+ xPropSet->setPropertyValue( sPageDescName, Any(sDisplayName) );
}
}
}
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 80f565db7b04..f46bb42be976 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -212,31 +212,23 @@ void XMLVarFieldImportContext::PrepareField(
if (bFormulaOK)
{
- Any aAny;
- aAny <<= sFormula;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sFormula));
}
}
if (bSetDescription && bDescriptionOK)
{
- Any aAny;
- aAny <<= sDescription;
- xPropertySet->setPropertyValue(sPropertyHint, aAny);
+ xPropertySet->setPropertyValue(sPropertyHint, Any(sDescription));
}
if (bSetHelp && bHelpOK)
{
- Any aAny;
- aAny <<= sHelp;
- xPropertySet->setPropertyValue(sPropertyHelp, aAny);
+ xPropertySet->setPropertyValue(sPropertyHelp, Any(sHelp));
}
if (bSetHint && bHintOK)
{
- Any aAny;
- aAny <<= sHint;
- xPropertySet->setPropertyValue(sPropertyTooltip, aAny);
+ xPropertySet->setPropertyValue(sPropertyTooltip, Any(sHint));
}
if (bSetVisible && bDisplayOK)
@@ -417,13 +409,12 @@ void XMLSequenceFieldImportContext::PrepareField(
// set format
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat, sNumFormatSync );
- Any aAny;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nNumType));
// handle reference name
if (bRefNameOK)
{
+ Any aAny;
aAny = xPropertySet->getPropertyValue(sPropertySequenceValue);
sal_Int16 nValue = 0;
aAny >>= nValue;
@@ -541,9 +532,7 @@ XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
void XMLUserFieldInputImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= GetName();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetName()));
// delegate to super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -571,9 +560,7 @@ void XMLVariableGetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
// set name
- Any aAny;
- aAny <<= GetName();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetName()));
// the remainder is handled by super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -604,9 +591,7 @@ void XMLExpressionFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
sal_Int16 nSubType = SetVariableType::FORMULA;
- Any aAny;
- aAny <<= nSubType;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(nSubType));
// delegate to super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -637,9 +622,7 @@ void XMLTextInputFieldImportContext::PrepareField(
{
XMLVarFieldImportContext::PrepareField(xPropertySet);
- Any aAny;
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
@@ -844,15 +827,13 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
switch (eVarType)
{
case VarTypeSequence:
- aAny <<= nNumLevel;
- xFieldMaster->setPropertyValue(sPropertyNumberingLevel, aAny);
+ xFieldMaster->setPropertyValue(sPropertyNumberingLevel, Any(nNumLevel));
if (nNumLevel >= 0)
{
OUString sStr(&cSeparationChar, 1);
- aAny <<= sStr;
xFieldMaster->setPropertyValue(
- sPropertyNumberingSeparator, aAny);
+ sPropertyNumberingSeparator, Any(sStr));
}
break;
case VarTypeSimple:
@@ -990,13 +971,11 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
xMaster = xTmp;
// set name
- Any aAny;
- aAny <<= sName;
- xMaster->setPropertyValue(sAPI_name, aAny);
+ xMaster->setPropertyValue(sAPI_name, Any(sName));
if (eVarType != VarTypeUserField) {
// set subtype for setexp field
-
+ Any aAny;
aAny <<= ((eVarType == VarTypeSimple) ?
SetVariableType::VAR :
SetVariableType::SEQUENCE);
@@ -1086,8 +1065,7 @@ void XMLDatabaseDisplayImportContext::EndElement()
sAPI_fieldmaster_database))
{
Any aAny;
- aAny <<= sColumnName;
- xMaster->setPropertyValue(sPropertyColumnName, aAny);
+ xMaster->setPropertyValue(sPropertyColumnName, Any(sColumnName));
// fieldmaster takes database, table and column name
XMLDatabaseFieldImportContext::PrepareField(xMaster);
@@ -1355,8 +1333,7 @@ void XMLValueImportHelper::PrepareField(
// format/style
if (bSetStyle && bFormatOK)
{
- aAny <<= nFormatKey;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormatKey));
if( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
@@ -1377,8 +1354,7 @@ void XMLValueImportHelper::PrepareField(
}
else
{
- aAny <<= fValue;
- xPropertySet->setPropertyValue(sPropertyValue, aAny);
+ xPropertySet->setPropertyValue(sPropertyValue, Any(fValue));
}
}
}