summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMatthew Pottage <matthewpottage@invincitech.com>2015-07-01 16:51:45 +0100
committerNoel Grandin <noelgrandin@gmail.com>2015-07-16 09:11:55 +0000
commit091f6c382394390206f784a5ec79842709e0f3bc (patch)
tree9e43414643259d2eacfdd7d75125770b83bc3f8e /writerfilter
parent4439e5f689c8564a092cf40337ead04e1d024f03 (diff)
Removed singleton PropertyNameSupplier and replaced it with single function.
Measurements showed that the "optimisation" of caching PropertyIds and their string equivalent leads to an increase of approx. 6 times in the total overall time spent in PropertyNameSupplier::getName(eId), when running the unit tests. PropertyNameSupplier was the only PropertyNameSupplier (no derived classes). This means that getPropertyName can easily provide the same functionality. Change-Id: I933b67c11d4cc35395a0c70e15f1c24ac9842ab0 Reviewed-on: https://gerrit.libreoffice.org/16665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx34
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx364
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx7
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx6
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx91
-rw-r--r--writerfilter/source/dmapper/ModelEventListener.cxx6
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx34
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx6
-rw-r--r--writerfilter/source/dmapper/PropertyIds.cxx761
-rw-r--r--writerfilter/source/dmapper/PropertyIds.hxx15
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx88
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx36
-rw-r--r--writerfilter/source/dmapper/TrackChangesHandler.cxx18
13 files changed, 669 insertions, 797 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index becde28daa91..8a875ae982d8 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -104,13 +104,13 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
{
// #i24363# tab stops relative to indent
m_pImpl->SetDocumentSettingsProperty(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_TABS_RELATIVE_TO_INDENT ),
+ getPropertyName( PROP_TABS_RELATIVE_TO_INDENT ),
uno::makeAny( false ) );
m_pImpl->SetDocumentSettingsProperty(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_SURROUND_TEXT_WRAP_SMALL ),
+ getPropertyName( PROP_SURROUND_TEXT_WRAP_SMALL ),
uno::makeAny( true ) );
m_pImpl->SetDocumentSettingsProperty(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ),
+ getPropertyName( PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ),
uno::makeAny( true ) );
// Don't load the default style definitions to avoid weird mix
@@ -271,7 +271,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
{
uno::Reference< beans::XPropertySet > xAnchorProps( m_pImpl->GetTopContext()->GetFootnote()->getAnchor(), uno::UNO_QUERY );
xAnchorProps->setPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_CHAR_FONT_NAME),
+ getPropertyName( PROP_CHAR_FONT_NAME),
uno::makeAny( sStringValue ));
}
else //a real symbol
@@ -1166,7 +1166,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
Value::Pointer_t pValue = rSprm.getValue();
sal_Int32 nIntValue = pValue->getInt();
const OUString sStringValue = pValue->getString();
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
switch(nSprmId)
{
@@ -1525,7 +1524,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
uno::Reference<beans::XPropertySet> xCharStyle(m_pImpl->GetCurrentNumberingCharStyle());
if (xCharStyle.is())
- xCharStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_CHAR_WEIGHT), aBold);
+ xCharStyle->setPropertyValue(getPropertyName(PROP_CHAR_WEIGHT), aBold);
if (nSprmId == NS_ooxml::LN_EG_RPrBase_b)
m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "b", OUString::number(nIntValue));
else if (nSprmId == NS_ooxml::LN_EG_RPrBase_bCs)
@@ -1605,7 +1604,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
uno::Reference<beans::XPropertySet> xCharStyle(m_pImpl->GetCurrentNumberingCharStyle());
if (xCharStyle.is())
- xCharStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_CHAR_HEIGHT), aVal);
+ xCharStyle->setPropertyValue(getPropertyName(PROP_CHAR_HEIGHT), aVal);
}
}
// Make sure char sizes defined in the stylesheets don't affect char props from direct formatting.
@@ -1865,13 +1864,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
{
uno::Reference< text::XLineNumberingProperties > xLineNumberingProperties( m_pImpl->GetTextDocument(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xLineNumberingPropSet = xLineNumberingProperties->getLineNumberingProperties();
- PropertyNameSupplier& rNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_IS_ON ), uno::makeAny(true) );
+ xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_IS_ON ), uno::makeAny(true) );
if( aSettings.nInterval )
- xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_INTERVAL ), uno::makeAny((sal_Int16)aSettings.nInterval) );
+ xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_INTERVAL ), uno::makeAny((sal_Int16)aSettings.nInterval) );
if( aSettings.nDistance )
- xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_DISTANCE ), uno::makeAny(aSettings.nDistance) );
- xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_RESTART_AT_EACH_PAGE ), uno::makeAny(aSettings.bRestartAtEachPage) );
+ xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_DISTANCE ), uno::makeAny(aSettings.nDistance) );
+ xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_RESTART_AT_EACH_PAGE ), uno::makeAny(aSettings.bRestartAtEachPage) );
}
catch( const uno::Exception& )
{
@@ -1978,13 +1976,13 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
if( xTOC.is() )
{
uno::Reference<text::XTextColumns> xTextColumns;
- xTOC->getPropertyValue(rPropNameSupplier.GetName( PROP_TEXT_COLUMNS )) >>= xTextColumns;
+ xTOC->getPropertyValue(getPropertyName( PROP_TEXT_COLUMNS )) >>= xTextColumns;
if (xTextColumns.is())
{
uno::Reference< beans::XPropertySet > xColumnPropSet( xTextColumns, uno::UNO_QUERY_THROW );
if ( xColumnPropSet.is() )
- xColumnPropSet->setPropertyValue( rPropNameSupplier.GetName( PROP_AUTOMATIC_DISTANCE ), uno::makeAny( pSectHdl->GetSpace() ));
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TEXT_COLUMNS ), uno::makeAny( xTextColumns ) );
+ xColumnPropSet->setPropertyValue( getPropertyName( PROP_AUTOMATIC_DISTANCE ), uno::makeAny( pSectHdl->GetSpace() ));
+ xTOC->setPropertyValue( getPropertyName( PROP_TEXT_COLUMNS ), uno::makeAny( xTextColumns ) );
}
}
}
@@ -2194,7 +2192,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
if( NS_ooxml::LN_EG_FtnEdnNumProps_numStart == nSprmId && xFtnEdnSettings.is())
{
xFtnEdnSettings->setPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_START_AT),
+ getPropertyName( PROP_START_AT),
uno::makeAny( sal_Int16( nIntValue - 1 )));
}
else if( NS_ooxml::LN_EG_FtnEdnNumProps_numRestart == nSprmId && xFtnEdnSettings.is())
@@ -2208,14 +2206,14 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
default: break;
}
xFtnEdnSettings->setPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_FOOTNOTE_COUNTING ),
+ getPropertyName( PROP_FOOTNOTE_COUNTING ),
uno::makeAny( nFootnoteCounting ));
}
else if (xFtnEdnSettings.is())
{
sal_Int16 nNumType = ConversionHelper::ConvertNumberingType( nIntValue );
xFtnEdnSettings->setPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_NUMBERING_TYPE),
+ getPropertyName( PROP_NUMBERING_TYPE),
uno::makeAny( nNumType ));
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f8ae16de285b..cfa1b833582d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -88,7 +88,7 @@ namespace writerfilter {
namespace dmapper{
//line numbering for header/footer
-void lcl_linenumberingHeaderFooter( PropertyNameSupplier& rPropNameSupplier, uno::Reference<container::XNameContainer> xStyles, const OUString& rname, DomainMapper_Impl* dmapper )
+void lcl_linenumberingHeaderFooter( uno::Reference<container::XNameContainer> xStyles, const OUString& rname, DomainMapper_Impl* dmapper )
{
const StyleSheetEntryPtr pEntry = dmapper->GetStyleSheetTable()->FindStyleSheetByISTD( rname );
if (!pEntry)
@@ -106,7 +106,7 @@ void lcl_linenumberingHeaderFooter( PropertyNameSupplier& rPropNameSupplier, uno
if( !xStyle.is() )
return;
uno::Reference<beans::XPropertySet> xPropertySet( xStyle, uno::UNO_QUERY );
- xPropertySet->setPropertyValue( rPropNameSupplier.GetName( PROP_PARA_LINE_NUMBER_COUNT ), uno::makeAny( ( bool )( nListId >= 0 ) ) );
+ xPropertySet->setPropertyValue( getPropertyName( PROP_PARA_LINE_NUMBER_COUNT ), uno::makeAny( ( bool )( nListId >= 0 ) ) );
}
}
}
@@ -133,18 +133,18 @@ void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet >& rxFie
}
}
-void lcl_handleTextField( const uno::Reference< beans::XPropertySet >& rxFieldProps, FFDataHandler::Pointer_t pFFDataHandler, PropertyNameSupplier& rPropNameSupplier )
+void lcl_handleTextField( const uno::Reference< beans::XPropertySet >& rxFieldProps, FFDataHandler::Pointer_t pFFDataHandler )
{
if ( rxFieldProps.is() && pFFDataHandler )
{
rxFieldProps->setPropertyValue
- (rPropNameSupplier.GetName(PROP_HINT),
+ (getPropertyName(PROP_HINT),
uno::makeAny(pFFDataHandler->getStatusText()));
rxFieldProps->setPropertyValue
- (rPropNameSupplier.GetName(PROP_HELP),
+ (getPropertyName(PROP_HELP),
uno::makeAny(pFFDataHandler->getHelpText()));
rxFieldProps->setPropertyValue
- (rPropNameSupplier.GetName(PROP_CONTENT),
+ (getPropertyName(PROP_CONTENT),
uno::makeAny(pFFDataHandler->getTextDefault()));
}
}
@@ -776,10 +776,9 @@ void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& rFramePr
sal_uInt32 nBorderPropertyCount = sizeof( aBorderProperties ) / sizeof(PropertyIds);
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
for( sal_uInt32 nProperty = 0; nProperty < nBorderPropertyCount; ++nProperty)
{
- OUString sPropertyName = rPropNameSupplier.GetName(aBorderProperties[nProperty]);
+ OUString sPropertyName = getPropertyName(aBorderProperties[nProperty]);
beans::PropertyValue aValue;
aValue.Name = sPropertyName;
aValue.Value = xTextRangeProperties->getPropertyValue(sPropertyName);
@@ -826,7 +825,6 @@ void lcl_AddRangeAndStyle(
void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
if (m_aTextAppendStack.empty())
return;
TextAppendContext& rAppendContext = m_aTextAppendStack.top();
@@ -853,34 +851,34 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
bool bAutoWidth = nWidth < 1;
if( bAutoWidth )
nWidth = DEFAULT_FRAME_MIN_WIDTH;
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_WIDTH), nWidth));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_WIDTH), nWidth));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_HEIGHT),
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HEIGHT),
rAppendContext.pLastParagraphProperties->Geth() > 0 ?
rAppendContext.pLastParagraphProperties->Geth() :
pStyleProperties->Geth() > 0 ? pStyleProperties->Geth() : DEFAULT_FRAME_MIN_HEIGHT));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_SIZE_TYPE), sal_Int16(
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SIZE_TYPE), sal_Int16(
rAppendContext.pLastParagraphProperties->GethRule() >= 0 ?
rAppendContext.pLastParagraphProperties->GethRule() :
pStyleProperties->GethRule() >=0 ? pStyleProperties->GethRule() : text::SizeType::VARIABLE)));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_WIDTH_TYPE), bAutoWidth ? text::SizeType::MIN : text::SizeType::FIX));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_WIDTH_TYPE), bAutoWidth ? text::SizeType::MIN : text::SizeType::FIX));
sal_Int16 nHoriOrient = sal_Int16(
rAppendContext.pLastParagraphProperties->GetxAlign() >= 0 ?
rAppendContext.pLastParagraphProperties->GetxAlign() :
pStyleProperties->GetxAlign() >= 0 ? pStyleProperties->GetxAlign() : text::HoriOrientation::NONE );
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_HORI_ORIENT), nHoriOrient));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HORI_ORIENT), nHoriOrient));
//set a non negative default value
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_HORI_ORIENT_POSITION),
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HORI_ORIENT_POSITION),
rAppendContext.pLastParagraphProperties->IsxValid() ?
rAppendContext.pLastParagraphProperties->Getx() :
pStyleProperties->IsxValid() ? pStyleProperties->Getx() : DEFAULT_VALUE));
//Default the anchor in case FramePr_hAnchor is missing ECMA 17.3.1.11
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_HORI_ORIENT_RELATION), sal_Int16(
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HORI_ORIENT_RELATION), sal_Int16(
rAppendContext.pLastParagraphProperties->GethAnchor() >= 0 ?
rAppendContext.pLastParagraphProperties->GethAnchor() :
pStyleProperties->GethAnchor() >=0 ? pStyleProperties->GethAnchor() : text::RelOrientation::FRAME )));
@@ -889,21 +887,21 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
rAppendContext.pLastParagraphProperties->GetyAlign() >= 0 ?
rAppendContext.pLastParagraphProperties->GetyAlign() :
pStyleProperties->GetyAlign() >= 0 ? pStyleProperties->GetyAlign() : text::VertOrientation::NONE );
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT), nVertOrient));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT), nVertOrient));
//set a non negative default value
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT_POSITION),
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_POSITION),
rAppendContext.pLastParagraphProperties->IsyValid() ?
rAppendContext.pLastParagraphProperties->Gety() :
pStyleProperties->IsyValid() ? pStyleProperties->Gety() : DEFAULT_VALUE));
//Default the anchor in case FramePr_vAnchor is missing ECMA 17.3.1.11
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT_RELATION), sal_Int16(
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION), sal_Int16(
rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 ?
rAppendContext.pLastParagraphProperties->GetvAnchor() :
pStyleProperties->GetvAnchor() >= 0 ? pStyleProperties->GetvAnchor() : text::RelOrientation::FRAME )));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_SURROUND), text::WrapTextMode(
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SURROUND), text::WrapTextMode(
rAppendContext.pLastParagraphProperties->GetWrap() >= 0 ?
rAppendContext.pLastParagraphProperties->GetWrap() :
pStyleProperties->GetWrap() >= 0 ? pStyleProperties->GetWrap() : 0 )));
@@ -918,8 +916,8 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
rAppendContext.pLastParagraphProperties->GethSpace() :
pStyleProperties->GethSpace() >= 0 ? pStyleProperties->GethSpace() : 0;
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_LEFT_MARGIN), nHoriOrient == text::HoriOrientation::LEFT ? 0 : nLeftDist));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_RIGHT_MARGIN), nHoriOrient == text::HoriOrientation::RIGHT ? 0 : nRightDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_LEFT_MARGIN), nHoriOrient == text::HoriOrientation::LEFT ? 0 : nLeftDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_RIGHT_MARGIN), nHoriOrient == text::HoriOrientation::RIGHT ? 0 : nRightDist));
sal_Int32 nBottomDist;
sal_Int32 nTopDist = nBottomDist =
@@ -927,12 +925,12 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
rAppendContext.pLastParagraphProperties->GetvSpace() :
pStyleProperties->GetvSpace() >= 0 ? pStyleProperties->GetvSpace() : 0;
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_TOP_MARGIN), nVertOrient == text::VertOrientation::TOP ? 0 : nTopDist));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_BOTTOM_MARGIN), nVertOrient == text::VertOrientation::BOTTOM ? 0 : nBottomDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_TOP_MARGIN), nVertOrient == text::VertOrientation::TOP ? 0 : nTopDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_BOTTOM_MARGIN), nVertOrient == text::VertOrientation::BOTTOM ? 0 : nBottomDist));
// If there is no fill, the Word default is 100% transparency.
// Otherwise CellColorHandler has priority, and this setting
// will be ignored.
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_BACK_COLOR_TRANSPARENCY), sal_Int32(100)));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_BACK_COLOR_TRANSPARENCY), sal_Int32(100)));
beans::PropertyValue aRet;
uno::Sequence<beans::PropertyValue> aGrabBag(1);
@@ -951,50 +949,50 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
bool bAutoWidth = nWidth < 1;
if( bAutoWidth )
nWidth = DEFAULT_FRAME_MIN_WIDTH;
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_WIDTH), nWidth));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_WIDTH), nWidth));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_SIZE_TYPE), sal_Int16(
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SIZE_TYPE), sal_Int16(
rAppendContext.pLastParagraphProperties->GethRule() >= 0 ?
rAppendContext.pLastParagraphProperties->GethRule() :
text::SizeType::VARIABLE)));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_WIDTH_TYPE), bAutoWidth ? text::SizeType::MIN : text::SizeType::FIX));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_WIDTH_TYPE), bAutoWidth ? text::SizeType::MIN : text::SizeType::FIX));
sal_Int16 nHoriOrient = sal_Int16(
rAppendContext.pLastParagraphProperties->GetxAlign() >= 0 ?
rAppendContext.pLastParagraphProperties->GetxAlign() :
text::HoriOrientation::NONE );
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_HORI_ORIENT), nHoriOrient));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HORI_ORIENT), nHoriOrient));
sal_Int16 nVertOrient = sal_Int16(
rAppendContext.pLastParagraphProperties->GetyAlign() >= 0 ?
rAppendContext.pLastParagraphProperties->GetyAlign() :
text::VertOrientation::NONE );
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT), nVertOrient));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT), nVertOrient));
sal_Int32 nVertDist = rAppendContext.pLastParagraphProperties->GethSpace();
if( nVertDist < 0 )
nVertDist = 0;
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_LEFT_MARGIN), nVertOrient == text::VertOrientation::TOP ? 0 : nVertDist));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_RIGHT_MARGIN), nVertOrient == text::VertOrientation::BOTTOM ? 0 : nVertDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_LEFT_MARGIN), nVertOrient == text::VertOrientation::TOP ? 0 : nVertDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_RIGHT_MARGIN), nVertOrient == text::VertOrientation::BOTTOM ? 0 : nVertDist));
sal_Int32 nHoriDist = rAppendContext.pLastParagraphProperties->GetvSpace();
if( nHoriDist < 0 )
nHoriDist = 0;
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_TOP_MARGIN), nHoriOrient == text::HoriOrientation::LEFT ? 0 : nHoriDist));
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_BOTTOM_MARGIN), nHoriOrient == text::HoriOrientation::RIGHT ? 0 : nHoriDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_TOP_MARGIN), nHoriOrient == text::HoriOrientation::LEFT ? 0 : nHoriDist));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_BOTTOM_MARGIN), nHoriOrient == text::HoriOrientation::RIGHT ? 0 : nHoriDist));
if( rAppendContext.pLastParagraphProperties->Geth() > 0 )
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_HEIGHT), rAppendContext.pLastParagraphProperties->Geth()));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HEIGHT), rAppendContext.pLastParagraphProperties->Geth()));
if( rAppendContext.pLastParagraphProperties->IsxValid() )
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_HORI_ORIENT_POSITION), rAppendContext.pLastParagraphProperties->Getx()));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HORI_ORIENT_POSITION), rAppendContext.pLastParagraphProperties->Getx()));
if( rAppendContext.pLastParagraphProperties->GethAnchor() >= 0 )
aFrameProperties.push_back(comphelper::makePropertyValue("HoriOrientRelation", sal_Int16(rAppendContext.pLastParagraphProperties->GethAnchor())));
if( rAppendContext.pLastParagraphProperties->IsyValid() )
- aFrameProperties.push_back(comphelper::makePropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT_POSITION), rAppendContext.pLastParagraphProperties->Gety()));
+ aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_POSITION), rAppendContext.pLastParagraphProperties->Gety()));
if( rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 )
aFrameProperties.push_back(comphelper::makePropertyValue("VertOrientRelation", sal_Int16(rAppendContext.pLastParagraphProperties->GetvAnchor())));
@@ -1032,7 +1030,6 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
uno::Reference< text::XTextAppend > xTextAppend;
if (!m_aTextAppendStack.empty())
xTextAppend = rAppendContext.xTextAppend;
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().attribute("isTextAppend", sal_uInt32(xTextAppend.is()));
@@ -1071,8 +1068,8 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
//select paragraph
xParaCursor->gotoStartOfParagraph( true );
uno::Reference< beans::XPropertyState > xParaProperties( xParaCursor, uno::UNO_QUERY_THROW );
- xParaProperties->setPropertyToDefault(rPropNameSupplier.GetName(PROP_CHAR_ESCAPEMENT));
- xParaProperties->setPropertyToDefault(rPropNameSupplier.GetName(PROP_CHAR_HEIGHT));
+ xParaProperties->setPropertyToDefault(getPropertyName(PROP_CHAR_ESCAPEMENT));
+ xParaProperties->setPropertyToDefault(getPropertyName(PROP_CHAR_HEIGHT));
//handles (2) and part of (6)
pToBeSavedProperties.reset( new ParagraphProperties(*pParaContext) );
sal_Int32 nCount = xParaCursor->getString().getLength();
@@ -1130,7 +1127,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
if( aDrop.Lines > 1 )
{
beans::PropertyValue aValue;
- aValue.Name = rPropNameSupplier.GetName(PROP_DROP_CAP_FORMAT);
+ aValue.Name = getPropertyName(PROP_DROP_CAP_FORMAT);
aValue.Value <<= aDrop;
aProperties.push_back(aValue);
}
@@ -1339,7 +1336,7 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pO
OUString aCLSID = pOLEHandler->getCLSID(m_xComponentContext);
if (aCLSID.isEmpty())
- xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_STREAM_NAME ),
+ xOLEProperties->setPropertyValue(getPropertyName( PROP_STREAM_NAME ),
uno::makeAny( rStreamName ));
else
xOLEProperties->setPropertyValue("CLSID", uno::makeAny(OUString(aCLSID)));
@@ -1349,13 +1346,13 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pO
aSize.Width = 1000;
if( !aSize.Height )
aSize.Height = 1000;
- xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_WIDTH ),
+ xOLEProperties->setPropertyValue(getPropertyName( PROP_WIDTH ),
uno::makeAny(aSize.Width));
- xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_HEIGHT ),
+ xOLEProperties->setPropertyValue(getPropertyName( PROP_HEIGHT ),
uno::makeAny(aSize.Height));
uno::Reference< graphic::XGraphic > xGraphic = pOLEHandler->getReplacement();
- xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_GRAPHIC ),
+ xOLEProperties->setPropertyValue(getPropertyName( PROP_GRAPHIC ),
uno::makeAny(xGraphic));
uno::Reference<beans::XPropertySet> xReplacementProperties(pOLEHandler->getShape(), uno::UNO_QUERY);
if (xReplacementProperties.is())
@@ -1374,7 +1371,7 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pO
else
// mimic the treatment of graphics here.. it seems anchoring as character
// gives a better ( visually ) result
- xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ANCHOR_TYPE ), uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) );
+ xOLEProperties->setPropertyValue(getPropertyName( PROP_ANCHOR_TYPE ), uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) );
// remove ( if valid ) associated shape ( used for graphic replacement )
SAL_WARN_IF(m_aAnchoredStack.empty(), "writerfilter.dmapper", "no anchor stack");
if (!m_aAnchoredStack.empty())
@@ -1408,20 +1405,20 @@ void DomainMapper_Impl::appendStarMath( const Value& val )
uno::Reference< text::XTextContent > xStarMath( m_xTextFactory->createInstance(sEmbeddedService), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xStarMathProperties(xStarMath, uno::UNO_QUERY_THROW);
- xStarMathProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_EMBEDDED_OBJECT ),
+ xStarMathProperties->setPropertyValue(getPropertyName( PROP_EMBEDDED_OBJECT ),
val.getAny());
uno::Reference< uno::XInterface > xInterface( formula->getComponent(), uno::UNO_QUERY );
Size size( 1000, 1000 );
if( oox::FormulaImportBase* formulaimport = dynamic_cast< oox::FormulaImportBase* >( xInterface.get()))
size = formulaimport->getFormulaSize();
- xStarMathProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_WIDTH ),
+ xStarMathProperties->setPropertyValue(getPropertyName( PROP_WIDTH ),
uno::makeAny( sal_Int32(size.Width())));
- xStarMathProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_HEIGHT ),
+ xStarMathProperties->setPropertyValue(getPropertyName( PROP_HEIGHT ),
uno::makeAny( sal_Int32(size.Height())));
// mimic the treatment of graphics here.. it seems anchoring as character
// gives a better ( visually ) result
- xStarMathProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ANCHOR_TYPE ),
+ xStarMathProperties->setPropertyValue(getPropertyName( PROP_ANCHOR_TYPE ),
uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) );
appendTextContent( xStarMath, uno::Sequence< beans::PropertyValue >() );
}
@@ -1498,11 +1495,9 @@ void DomainMapper_Impl::PushPageHeaderFooter(bool bHeader, SectionPropertyMap::P
bool bFirst = eType == SectionPropertyMap::PAGE_FIRST;
if ((!bLeft && !GetSettingsTable()->GetEvenAndOddHeaders()) || (GetSettingsTable()->GetEvenAndOddHeaders()))
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
//switch on header/footer use
xPageStyle->setPropertyValue(
- rPropNameSupplier.GetName(ePropIsOn),
+ getPropertyName(ePropIsOn),
uno::makeAny(sal_True));
if (bFirst)
@@ -1512,18 +1507,18 @@ void DomainMapper_Impl::PushPageHeaderFooter(bool bHeader, SectionPropertyMap::P
{
// This is a first page and has a follow style, then enable the header/footer there as well to be consistent.
uno::Reference<beans::XPropertySet> xFollowStyle(GetPageStyles()->getByName(aFollowStyle), uno::UNO_QUERY);
- xFollowStyle->setPropertyValue(rPropNameSupplier.GetName(ePropIsOn), uno::makeAny(sal_True));
+ xFollowStyle->setPropertyValue(getPropertyName(ePropIsOn), uno::makeAny(sal_True));
}
}
// If the 'Different Even & Odd Pages' flag is turned on - do not ignore it
// Even if the 'Even' header/footer is blank - the flag should be imported (so it would look in LO like in Word)
if (!bFirst && GetSettingsTable()->GetEvenAndOddHeaders())
- xPageStyle->setPropertyValue(rPropNameSupplier.GetName(ePropShared), uno::makeAny(false));
+ xPageStyle->setPropertyValue(getPropertyName(ePropShared), uno::makeAny(false));
//set the interface
uno::Reference< text::XText > xText;
- xPageStyle->getPropertyValue(rPropNameSupplier.GetName(bLeft? ePropTextLeft: ePropText)) >>= xText;
+ xPageStyle->getPropertyValue(getPropertyName(bLeft? ePropTextLeft: ePropText)) >>= xText;
m_aTextAppendStack.push(TextAppendContext(uno::Reference< text::XTextAppend >(xText, uno::UNO_QUERY_THROW),
m_bIsNewDoc? uno::Reference<text::XTextCursor>(): m_xBodyText->createTextCursorByRange(xText->getStart())));
@@ -1636,20 +1631,19 @@ void DomainMapper_Impl::CreateRedline(uno::Reference<text::XTextRange> const& xR
try
{
OUString sType;
- PropertyNameSupplier & rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier( );
switch ( pRedline->m_nToken & 0xffff )
{
case XML_mod:
- sType = rPropNameSupplier.GetName( PROP_FORMAT );
+ sType = getPropertyName( PROP_FORMAT );
break;
case XML_ins:
- sType = rPropNameSupplier.GetName( PROP_INSERT );
+ sType = getPropertyName( PROP_INSERT );
break;
case XML_del:
- sType = rPropNameSupplier.GetName( PROP_DELETE );
+ sType = getPropertyName( PROP_DELETE );
break;
case XML_ParagraphFormat:
- sType = rPropNameSupplier.GetName( PROP_PARAGRAPH_FORMAT );
+ sType = getPropertyName( PROP_PARAGRAPH_FORMAT );
break;
default:
throw lang::IllegalArgumentException("illegal redline token type", nullptr, 0);
@@ -1657,11 +1651,11 @@ void DomainMapper_Impl::CreateRedline(uno::Reference<text::XTextRange> const& xR
uno::Reference < text::XRedline > xRedline( xRange, uno::UNO_QUERY_THROW );
beans::PropertyValues aRedlineProperties( 3 );
beans::PropertyValue * pRedlineProperties = aRedlineProperties.getArray( );
- pRedlineProperties[0].Name = rPropNameSupplier.GetName( PROP_REDLINE_AUTHOR );
+ pRedlineProperties[0].Name = getPropertyName( PROP_REDLINE_AUTHOR );
pRedlineProperties[0].Value <<= pRedline->m_sAuthor;
- pRedlineProperties[1].Name = rPropNameSupplier.GetName( PROP_REDLINE_DATE_TIME );
+ pRedlineProperties[1].Name = getPropertyName( PROP_REDLINE_DATE_TIME );
pRedlineProperties[1].Value <<= ConversionHelper::ConvertDateStringToDateTime( pRedline->m_sDate );
- pRedlineProperties[2].Name = rPropNameSupplier.GetName( PROP_REDLINE_REVERT_PROPERTIES );
+ pRedlineProperties[2].Name = getPropertyName( PROP_REDLINE_REVERT_PROPERTIES );
pRedlineProperties[2].Value <<= pRedline->m_aRevertProperties;
xRedline->makeRedline( sType, aRedlineProperties );
}
@@ -1862,12 +1856,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
m_aAnchoredStack.push(xTextContent);
uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY);
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
m_xEmbedded.set(m_xTextFactory->createInstance("com.sun.star.text.TextEmbeddedObject"), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xEmbeddedProperties(m_xEmbedded, uno::UNO_QUERY_THROW);
- xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_EMBEDDED_OBJECT), xShapePropertySet->getPropertyValue(rPropNameSupplier.GetName(PROP_EMBEDDED_OBJECT)));
- xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_ANCHOR_TYPE), uno::makeAny(text::TextContentAnchorType_AS_CHARACTER));
+ xEmbeddedProperties->setPropertyValue(getPropertyName(PROP_EMBEDDED_OBJECT), xShapePropertySet->getPropertyValue(getPropertyName(PROP_EMBEDDED_OBJECT)));
+ xEmbeddedProperties->setPropertyValue(getPropertyName(PROP_ANCHOR_TYPE), uno::makeAny(text::TextContentAnchorType_AS_CHARACTER));
// So that the original bitmap-only shape will be replaced by the embedded object.
m_aAnchoredStack.top().bToRemove = true;
m_aTextAppendStack.pop();
@@ -1884,14 +1876,12 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
uno::Reference< text::XTextContent > xTxtContent( xShape, uno::UNO_QUERY_THROW );
m_aAnchoredStack.push( xTxtContent );
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().unoPropertySet(xProps);
#endif
text::TextContentAnchorType nAnchorType(text::TextContentAnchorType_AT_PARAGRAPH);
- xProps->getPropertyValue(rPropNameSupplier.GetName( PROP_ANCHOR_TYPE )) >>= nAnchorType;
+ xProps->getPropertyValue(getPropertyName( PROP_ANCHOR_TYPE )) >>= nAnchorType;
bool checkZOrderStatus = false;
if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
{
@@ -1947,7 +1937,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
PropertyMapPtr paragraphContext = GetTopContextOfType( CONTEXT_PARAGRAPH );
boost::optional<PropertyMap::Property> aPropMargin = paragraphContext->getProperty(PROP_PARA_BOTTOM_MARGIN);
if(aPropMargin)
- xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), aPropMargin->second );
+ xProps->setPropertyValue( getPropertyName( PROP_BOTTOM_MARGIN ), aPropMargin->second );
}
else
{
@@ -1963,7 +1953,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
aGrabBag[i].Value >>= zOrder;
xShapePropertySet->setPropertyValue( "ZOrder", uno::makeAny(pZOrderHelper->findZOrder(zOrder)));
pZOrderHelper->addItem(xShapePropertySet, zOrder);
- xShapePropertySet->setPropertyValue(rPropNameSupplier.GetName( PROP_OPAQUE ), uno::makeAny( false ) );
+ xShapePropertySet->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::makeAny( false ) );
checkZOrderStatus = true;
}
else if ( aGrabBag[i].Name == "TxbxHasLink" )
@@ -1996,7 +1986,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
}
if (!m_bInHeaderFooterImport && !checkZOrderStatus)
xProps->setPropertyValue(
- rPropNameSupplier.GetName( PROP_OPAQUE ),
+ getPropertyName( PROP_OPAQUE ),
uno::makeAny( true ) );
}
m_bParaChanged = true;
@@ -2015,11 +2005,10 @@ void DomainMapper_Impl::UpdateEmbeddedShapeProps(const uno::Reference< drawing::
if (!xShape.is())
return;
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
uno::Reference<beans::XPropertySet> xEmbeddedProperties(m_xEmbedded, uno::UNO_QUERY_THROW);
awt::Size aSize = xShape->getSize( );
- xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_WIDTH), uno::makeAny(sal_Int32(aSize.Width)));
- xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HEIGHT), uno::makeAny(sal_Int32(aSize.Height)));
+ xEmbeddedProperties->setPropertyValue(getPropertyName(PROP_WIDTH), uno::makeAny(sal_Int32(aSize.Width)));
+ xEmbeddedProperties->setPropertyValue(getPropertyName(PROP_HEIGHT), uno::makeAny(sal_Int32(aSize.Height)));
}
@@ -2439,10 +2428,10 @@ void DomainMapper_Impl::SetNumberFormat( const OUString& rCommand,
nKey = xNumberSupplier->getNumberFormats()->addNewConverted( sFormat, aUSLocale, aCurrentLocale );
}
xPropertySet->setPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName(PROP_NUMBER_FORMAT),
+ getPropertyName(PROP_NUMBER_FORMAT),
uno::makeAny( nKey ));
xPropertySet->getPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName(PROP_NUMBER_FORMAT ) ) >>= nKey;
+ getPropertyName(PROP_NUMBER_FORMAT ) ) >>= nKey;
}
catch(const uno::Exception&)
{
@@ -2634,7 +2623,7 @@ uno::Reference<beans::XPropertySet> DomainMapper_Impl::FindOrCreateFieldMaster(c
m_xTextFactory->createInstance(sFieldMasterService), uno::UNO_QUERY_THROW);
//set the master's name
xMaster->setPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName(PROP_NAME),
+ getPropertyName(PROP_NAME),
uno::makeAny(rFieldMasterName));
}
return xMaster;
@@ -2905,7 +2894,6 @@ const FieldConversionMap_t & lcl_GetEnhancedFieldConversion()
void DomainMapper_Impl::handleFieldAsk
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const& xFieldProperties)
{
@@ -2921,7 +2909,7 @@ void DomainMapper_Impl::handleFieldAsk
FindOrCreateFieldMaster
("com.sun.star.text.FieldMaster.SetExpression", sVariable );
// An ASK field is always a string of characters
- xMaster->setPropertyValue(rPropNameSupplier.GetName(PROP_SUB_TYPE), uno::makeAny(text::SetVariableType::STRING));
+ xMaster->setPropertyValue(getPropertyName(PROP_SUB_TYPE), uno::makeAny(text::SetVariableType::STRING));
// attach the master to the field
uno::Reference< text::XDependentTextField > xDependentField
@@ -2930,14 +2918,14 @@ void DomainMapper_Impl::handleFieldAsk
// set input flag at the field
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true ));
+ getPropertyName(PROP_IS_INPUT), uno::makeAny( true ));
// set the prompt
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HINT),
+ getPropertyName(PROP_HINT),
uno::makeAny( sHint ));
- xFieldProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_SUB_TYPE), uno::makeAny(text::SetVariableType::STRING));
+ xFieldProperties->setPropertyValue(getPropertyName(PROP_SUB_TYPE), uno::makeAny(text::SetVariableType::STRING));
// The ASK has no field value to display
- xFieldProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_IS_VISIBLE), uno::makeAny(sal_False));
+ xFieldProperties->setPropertyValue(getPropertyName(PROP_IS_VISIBLE), uno::makeAny(sal_False));
}
else
{
@@ -2949,7 +2937,6 @@ void DomainMapper_Impl::handleFieldAsk
void DomainMapper_Impl::handleAutoNum
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const& xFieldProperties)
{
@@ -2959,12 +2946,12 @@ void DomainMapper_Impl::handleAutoNum
("com.sun.star.text.FieldMaster.SetExpression",
"AutoNr");
- xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE),
+ xMaster->setPropertyValue( getPropertyName(PROP_SUB_TYPE),
uno::makeAny(text::SetVariableType::SEQUENCE));
//apply the numbering type
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ getPropertyName(PROP_NUMBERING_TYPE),
uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
// attach the master to the field
uno::Reference< text::XDependentTextField > xDependentField
@@ -2974,19 +2961,18 @@ void DomainMapper_Impl::handleAutoNum
void DomainMapper_Impl::handleAuthor
(OUString const& rFirstParam,
- PropertyNameSupplier& rPropNameSupplier,
uno::Reference< uno::XInterface > & /*xFieldInterface*/,
uno::Reference< beans::XPropertySet > const& xFieldProperties,
FieldId eFieldId )
{
if ( eFieldId != FIELD_USERINITIALS )
xFieldProperties->setPropertyValue
- ( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true ));
+ ( getPropertyName(PROP_FULL_NAME), uno::makeAny( true ));
if (!rFirstParam.isEmpty())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ),
+ getPropertyName( PROP_IS_FIXED ),
uno::makeAny( true ));
//PROP_CURRENT_PRESENTATION is set later anyway
}
@@ -2995,7 +2981,6 @@ void DomainMapper_Impl::handleAuthor
void DomainMapper_Impl::handleDocProperty
(FieldContextPtr pContext,
OUString const& rFirstParam,
- PropertyNameSupplier& rPropNameSupplier,
uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const&)
{
@@ -3074,23 +3059,23 @@ void DomainMapper_Impl::handleAuthor
if( bIsCustomField )
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NAME), uno::makeAny(rFirstParam));
+ getPropertyName(PROP_NAME), uno::makeAny(rFirstParam));
pContext->SetCustomField( xFieldProperties );
}
else
{
if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC))
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ getPropertyName(PROP_NUMBERING_TYPE),
uno::makeAny( style::NumberingType::ARABIC ));
else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME))
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_FULL_NAME),
+ getPropertyName(PROP_FULL_NAME),
uno::makeAny( true ));
else if(0 != (aDocProperties[nMap].nFlags & SET_DATE))
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_DATE),
+ getPropertyName(PROP_IS_DATE),
uno::makeAny( true ));
SetNumberFormat( pContext->GetCommand(), xFieldProperties );
}
@@ -3103,8 +3088,7 @@ void DomainMapper_Impl::handleAuthor
}
uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyperlinks, const OUString& sChapterNoSeparator,
- const uno::Sequence< beans::PropertyValues >& aLevel,
- PropertyNameSupplier& rPropNameSupplier )
+ const uno::Sequence< beans::PropertyValues >& aLevel )
{
//create a copy of the level and add two new entries - hyperlink start and end
bool bChapterNoSeparator = !sChapterNoSeparator.isEmpty();
@@ -3114,26 +3098,26 @@ uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyper
if( bHyperlinks )
{
beans::PropertyValues aHyperlink(1);
- aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START );
+ aHyperlink[0].Name = getPropertyName( PROP_TOKEN_TYPE );
+ aHyperlink[0].Value <<= getPropertyName( PROP_TOKEN_HYPERLINK_START );
pNewLevel[0] = aHyperlink;
- aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END );
+ aHyperlink[0].Value <<= getPropertyName( PROP_TOKEN_HYPERLINK_END );
pNewLevel[aNewLevel.getLength() -1] = aHyperlink;
}
if( bChapterNoSeparator )
{
beans::PropertyValues aChapterNo(2);
- aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO );
- aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT );
+ aChapterNo[0].Name = getPropertyName( PROP_TOKEN_TYPE );
+ aChapterNo[0].Value <<= getPropertyName( PROP_TOKEN_CHAPTER_INFO );
+ aChapterNo[1].Name = getPropertyName( PROP_CHAPTER_FORMAT );
//todo: is ChapterFormat::Number correct?
aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER;
pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo;
beans::PropertyValues aChapterSeparator(2);
- aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT );
- aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT );
+ aChapterSeparator[0].Name = getPropertyName( PROP_TOKEN_TYPE );
+ aChapterSeparator[0].Value <<= getPropertyName( PROP_TOKEN_TEXT );
+ aChapterSeparator[1].Name = getPropertyName( PROP_TEXT );
aChapterSeparator[1].Value <<= sChapterNoSeparator;
pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator;
}
@@ -3151,7 +3135,6 @@ uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyper
void DomainMapper_Impl::handleToc
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
uno::Reference< uno::XInterface > & /*xFieldInterface*/,
uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/,
const OUString & sTOCServiceName)
@@ -3284,18 +3267,18 @@ void DomainMapper_Impl::handleToc
: sTOCServiceName),
uno::UNO_QUERY_THROW);
if (xTOC.is())
- xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(OUString()));
+ xTOC->setPropertyValue(getPropertyName( PROP_TITLE ), uno::makeAny(OUString()));
if (!aBookmarkName.isEmpty())
- xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_TOC_BOOKMARK), uno::makeAny(aBookmarkName));
+ xTOC->setPropertyValue(getPropertyName(PROP_TOC_BOOKMARK), uno::makeAny(aBookmarkName));
if( !bTableOfFigures && xTOC.is() )
{
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) );
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline ));
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries ));
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS ), uno::makeAny( bHideTabLeaderPageNumbers ));
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TAB_IN_TOC ), uno::makeAny( bIsTabEntry ));
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TOC_NEW_LINE ), uno::makeAny( bNewLine ));
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TOC_PARAGRAPH_OUTLINE_LEVEL ), uno::makeAny( bParagraphOutlineLevel ));
+ xTOC->setPropertyValue( getPropertyName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) );
+ xTOC->setPropertyValue( getPropertyName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline ));
+ xTOC->setPropertyValue( getPropertyName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries ));
+ xTOC->setPropertyValue( getPropertyName( PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS ), uno::makeAny( bHideTabLeaderPageNumbers ));
+ xTOC->setPropertyValue( getPropertyName( PROP_TAB_IN_TOC ), uno::makeAny( bIsTabEntry ));
+ xTOC->setPropertyValue( getPropertyName( PROP_TOC_NEW_LINE ), uno::makeAny( bNewLine ));
+ xTOC->setPropertyValue( getPropertyName( PROP_TOC_PARAGRAPH_OUTLINE_LEVEL ), uno::makeAny( bParagraphOutlineLevel ));
if( !sTemplate.isEmpty() )
{
//the string contains comma separated the names and related levels
@@ -3316,7 +3299,7 @@ void DomainMapper_Impl::handleToc
aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) );
}
uno::Reference< container::XIndexReplace> xParaStyles;
- xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles;
+ xTOC->getPropertyValue(getPropertyName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles;
for( nLevel = 1; nLevel < 10; ++nLevel)
{
sal_Int32 nLevelCount = aMap.count( nLevel );
@@ -3332,13 +3315,13 @@ void DomainMapper_Impl::handleToc
xParaStyles->replaceByIndex(nLevel - 1, uno::makeAny(aStyles));
}
}
- xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true ));
+ xTOC->setPropertyValue(getPropertyName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true ));
}
if(bHyperlinks || !sChapterNoSeparator.isEmpty())
{
uno::Reference< container::XIndexReplace> xLevelFormats;
- xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
+ xTOC->getPropertyValue(getPropertyName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
sal_Int32 nLevelCount = xLevelFormats->getCount();
//start with level 1, 0 is the header level
for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel)
@@ -3348,7 +3331,7 @@ void DomainMapper_Impl::handleToc
uno::Sequence< beans::PropertyValues > aNewLevel = lcl_createTOXLevelHyperlinks(
bHyperlinks, sChapterNoSeparator,
- aLevel, rPropNameSupplier );
+ aLevel );
xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) );
}
}
@@ -3356,19 +3339,19 @@ void DomainMapper_Impl::handleToc
else if (bTableOfFigures && xTOC.is())
{
if (!sFigureSequence.isEmpty())
- xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_LABEL_CATEGORY),
+ xTOC->setPropertyValue(getPropertyName(PROP_LABEL_CATEGORY),
uno::makeAny(sFigureSequence));
if ( bHyperlinks )
{
uno::Reference< container::XIndexReplace> xLevelFormats;
- xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
+ xTOC->getPropertyValue(getPropertyName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
uno::Sequence< beans::PropertyValues > aLevel;
xLevelFormats->getByIndex( 1 ) >>= aLevel;
uno::Sequence< beans::PropertyValues > aNewLevel = lcl_createTOXLevelHyperlinks(
bHyperlinks, sChapterNoSeparator,
- aLevel, rPropNameSupplier );
+ aLevel );
xLevelFormats->replaceByIndex( 1, uno::makeAny( aNewLevel ) );
}
}
@@ -3396,7 +3379,6 @@ void DomainMapper_Impl::handleToc
void DomainMapper_Impl::handleBibliography
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
const OUString & sTOCServiceName)
{
uno::Reference< beans::XPropertySet > xTOC;
@@ -3408,7 +3390,7 @@ void DomainMapper_Impl::handleBibliography
sTOCServiceName),
uno::UNO_QUERY_THROW);
if (xTOC.is())
- xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(OUString()));
+ xTOC->setPropertyValue(getPropertyName( PROP_TITLE ), uno::makeAny(OUString()));
pContext->SetTOC( xTOC );
m_bParaHadField = false;
@@ -3419,7 +3401,6 @@ void DomainMapper_Impl::handleBibliography
void DomainMapper_Impl::handleIndex
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
uno::Reference< uno::XInterface > & /*xFieldInterface*/,
uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/,
const OUString & sTOCServiceName)
@@ -3438,7 +3419,7 @@ void DomainMapper_Impl::handleIndex
uno::UNO_QUERY_THROW);
if (xTOC.is())
{
- xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(OUString()));
+ xTOC->setPropertyValue(getPropertyName( PROP_TITLE ), uno::makeAny(OUString()));
if( lcl_FindInCommand( pContext->GetCommand(), 'r', sValue ))
{
@@ -3452,7 +3433,7 @@ void DomainMapper_Impl::handleIndex
{
if(!sValue.isEmpty())
sIndexEntryType = sValue ;
- xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_INDEX_ENTRY_TYPE ), uno::makeAny(sIndexEntryType));
+ xTOC->setPropertyValue(getPropertyName( PROP_INDEX_ENTRY_TYPE ), uno::makeAny(sIndexEntryType));
}
}
pContext->SetTOC( xTOC );
@@ -3465,11 +3446,11 @@ void DomainMapper_Impl::handleIndex
{
sValue = sValue.replaceAll("\"", "");
uno::Reference<text::XTextColumns> xTextColumns;
- xTOC->getPropertyValue(rPropNameSupplier.GetName( PROP_TEXT_COLUMNS )) >>= xTextColumns;
+ xTOC->getPropertyValue(getPropertyName( PROP_TEXT_COLUMNS )) >>= xTextColumns;
if (xTextColumns.is())
{
xTextColumns->setColumnCount( sValue.toInt32() );
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TEXT_COLUMNS ), uno::makeAny( xTextColumns ) );
+ xTOC->setPropertyValue( getPropertyName( PROP_TEXT_COLUMNS ), uno::makeAny( xTextColumns ) );
}
}
}
@@ -3578,23 +3559,22 @@ void DomainMapper_Impl::CloseFieldCommand()
xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
}
}
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
switch( aIt->second.eFieldId )
{
case FIELD_ADDRESSBLOCK: break;
case FIELD_ADVANCE : break;
case FIELD_ASK :
- handleFieldAsk(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties);
+ handleFieldAsk(pContext, xFieldInterface, xFieldProperties);
break;
case FIELD_AUTONUM :
case FIELD_AUTONUMLGL :
case FIELD_AUTONUMOUT :
- handleAutoNum(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties);
+ handleAutoNum(pContext, xFieldInterface, xFieldProperties);
break;
case FIELD_AUTHOR :
case FIELD_USERNAME :
case FIELD_USERINITIALS :
- handleAuthor(sFirstParam, rPropNameSupplier,
+ handleAuthor(sFirstParam,
xFieldInterface, xFieldProperties,
aIt->second.eFieldId);
break;
@@ -3605,17 +3585,17 @@ void DomainMapper_Impl::CloseFieldCommand()
if (pContext->IsFieldLocked())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_FIXED),
+ getPropertyName(PROP_IS_FIXED),
uno::makeAny( true ));
m_bSetDateValue = true;
}
else
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_FIXED),
+ getPropertyName(PROP_IS_FIXED),
uno::makeAny( false ));
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_DATE),
+ getPropertyName(PROP_IS_DATE),
uno::makeAny( true ));
SetNumberFormat( pContext->GetCommand(), xFieldProperties );
}
@@ -3632,19 +3612,19 @@ void DomainMapper_Impl::CloseFieldCommand()
// overwrite the Comments document property
// #TODO implement the above too
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( false ));
+ getPropertyName( PROP_IS_FIXED ), uno::makeAny( false ));
//PROP_CURRENT_PRESENTATION is set later anyway
}
break;
case FIELD_CREATEDATE :
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_DATE ), uno::makeAny( true ));
+ getPropertyName( PROP_IS_DATE ), uno::makeAny( true ));
SetNumberFormat( pContext->GetCommand(), xFieldProperties );
}
break;
case FIELD_DOCPROPERTY :
- handleDocProperty(pContext, sFirstParam, rPropNameSupplier,
+ handleDocProperty(pContext, sFirstParam,
xFieldInterface, xFieldProperties);
break;
case FIELD_DOCVARIABLE :
@@ -3672,7 +3652,7 @@ void DomainMapper_Impl::CloseFieldCommand()
xFieldProperties =
uno::Reference< beans::XPropertySet >( xFieldInterface,
uno::UNO_QUERY_THROW);
- xFieldProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_CONTENT), uno::makeAny(aResult.sResult));
+ xFieldProperties->setPropertyValue(getPropertyName(PROP_CONTENT), uno::makeAny(aResult.sResult));
}
else
{
@@ -3711,7 +3691,7 @@ void DomainMapper_Impl::CloseFieldCommand()
sal_Int32 nIndex = 0;
if (xFieldProperties.is())
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HINT), uno::makeAny( pContext->GetCommand().getToken( 1, '\"', nIndex)));
+ getPropertyName(PROP_HINT), uno::makeAny( pContext->GetCommand().getToken( 1, '\"', nIndex)));
}
break;
case FIELD_FILENAME:
@@ -3719,7 +3699,7 @@ void DomainMapper_Impl::CloseFieldCommand()
sal_Int32 nNumberingTypeIndex = pContext->GetCommand().indexOf("\\p");
if (xFieldProperties.is())
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_FILE_FORMAT),
+ getPropertyName(PROP_FILE_FORMAT),
uno::makeAny( nNumberingTypeIndex > 0 ? text::FilenameDisplayFormat::FULL : text::FilenameDisplayFormat::NAME_AND_EXT ));
}
break;
@@ -3754,7 +3734,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if ( aIt->second.eFieldId == FIELD_FORMDROPDOWN )
lcl_handleDropdownField( xFieldProperties, pContext->getFFDataHandler() );
else
- lcl_handleTextField( xFieldProperties, pContext->getFFDataHandler(), rPropNameSupplier );
+ lcl_handleTextField( xFieldProperties, pContext->getFFDataHandler() );
}
}
break;
@@ -3819,7 +3799,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if (!sFirstParam.isEmpty())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
+ getPropertyName( PROP_IS_FIXED ), uno::makeAny( true ));
//PROP_CURRENT_PRESENTATION is set later anyway
}
}
@@ -3832,13 +3812,13 @@ void DomainMapper_Impl::CloseFieldCommand()
OUString sMacro = pContext->GetCommand().getToken( 0, ' ', nIndex);
if (xFieldProperties.is())
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_MACRO_NAME), uno::makeAny( sMacro ));
+ getPropertyName(PROP_MACRO_NAME), uno::makeAny( sMacro ));
//extract quick help text
if(xFieldProperties.is() && pContext->GetCommand().getLength() > nIndex + 1)
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HINT),
+ getPropertyName(PROP_HINT),
uno::makeAny( pContext->GetCommand().copy( nIndex )));
}
}
@@ -3865,10 +3845,10 @@ void DomainMapper_Impl::CloseFieldCommand()
if (xFieldProperties.is())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ getPropertyName(PROP_NUMBERING_TYPE),
uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_SUB_TYPE),
+ getPropertyName(PROP_SUB_TYPE),
uno::makeAny( text::PageNumberType_CURRENT ));
}
@@ -3888,10 +3868,10 @@ void DomainMapper_Impl::CloseFieldCommand()
+ sFirstParam))
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_REFERENCE_FIELD_SOURCE),
+ getPropertyName(PROP_REFERENCE_FIELD_SOURCE),
uno::makeAny( sal_Int16(text::ReferenceFieldSource::BOOKMARK)) );
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_SOURCE_NAME),
+ getPropertyName(PROP_SOURCE_NAME),
uno::makeAny(sFirstParam) );
sal_Int16 nFieldPart = (bPageRef ? text::ReferenceFieldPart::PAGE : text::ReferenceFieldPart::TEXT);
OUString sValue;
@@ -3916,16 +3896,16 @@ void DomainMapper_Impl::CloseFieldCommand()
nFieldPart = text::ReferenceFieldPart::NUMBER_FULL_CONTEXT;
}
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_REFERENCE_FIELD_PART ), uno::makeAny( nFieldPart ));
+ getPropertyName( PROP_REFERENCE_FIELD_PART ), uno::makeAny( nFieldPart ));
}
else
{
xFieldInterface = m_xTextFactory->createInstance("com.sun.star.text.TextField.GetExpression");
xFieldProperties.set(xFieldInterface, uno::UNO_QUERY);
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_CONTENT),
+ getPropertyName(PROP_CONTENT),
uno::makeAny(sFirstParam));
- xFieldProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_SUB_TYPE), uno::makeAny(text::SetVariableType::STRING));
+ xFieldProperties->setPropertyValue(getPropertyName(PROP_SUB_TYPE), uno::makeAny(text::SetVariableType::STRING));
}
}
break;
@@ -3949,12 +3929,12 @@ void DomainMapper_Impl::CloseFieldCommand()
sSeqName);
xMaster->setPropertyValue(
- rPropNameSupplier.GetName(PROP_SUB_TYPE),
+ getPropertyName(PROP_SUB_TYPE),
uno::makeAny(text::SetVariableType::SEQUENCE));
// apply the numbering type
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ getPropertyName(PROP_NUMBERING_TYPE),
uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
// attach the master to the field
@@ -3974,7 +3954,7 @@ void DomainMapper_Impl::CloseFieldCommand()
// TODO \s isn't handled, but the spec isn't easy to understand without
// an example for this one.
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_CONTENT),
+ getPropertyName(PROP_CONTENT),
uno::makeAny(sFormula));
// Take care of the numeric formatting definition, default is Arabic
@@ -3982,7 +3962,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if (nNumberingType == style::NumberingType::PAGE_DESCRIPTOR)
nNumberingType = style::NumberingType::ARABIC;
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ getPropertyName(PROP_NUMBERING_TYPE),
uno::makeAny(nNumberingType));
}
break;
@@ -3994,7 +3974,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if (!sFirstParam.isEmpty())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
+ getPropertyName( PROP_IS_FIXED ), uno::makeAny( true ));
//PROP_CURRENT_PRESENTATION is set later anyway
}
}
@@ -4006,7 +3986,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if (pContext->IsFieldLocked())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_FIXED),
+ getPropertyName(PROP_IS_FIXED),
uno::makeAny( true ));
m_bSetDateValue = true;
}
@@ -4018,7 +3998,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if (!sFirstParam.isEmpty())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
+ getPropertyName( PROP_IS_FIXED ), uno::makeAny( true ));
//PROP_CURRENT_PRESENTATION is set later anyway
}
}
@@ -4026,15 +4006,15 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_USERADDRESS : //todo: user address collects street, city ...
break;
case FIELD_INDEX:
- handleIndex(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties,
+ handleIndex(pContext, xFieldInterface, xFieldProperties,
OUString::createFromAscii(aIt->second.cFieldServiceName));
break;
case FIELD_BIBLIOGRAPHY:
- handleBibliography(pContext, rPropNameSupplier,
+ handleBibliography(pContext,
OUString::createFromAscii(aIt->second.cFieldServiceName));
break;
case FIELD_TOC:
- handleToc(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties,
+ handleToc(pContext, xFieldInterface, xFieldProperties,
OUString::createFromAscii(aIt->second.cFieldServiceName));
break;
case FIELD_XE:
@@ -4095,7 +4075,7 @@ void DomainMapper_Impl::CloseFieldCommand()
uno::UNO_QUERY_THROW);
if (!sFirstParam.isEmpty())
{
- xTC->setPropertyValue(rPropNameSupplier.GetName(PROP_ALTERNATIVE_TEXT),
+ xTC->setPropertyValue(getPropertyName(PROP_ALTERNATIVE_TEXT),
uno::makeAny(sFirstParam));
}
OUString sValue;
@@ -4109,7 +4089,7 @@ void DomainMapper_Impl::CloseFieldCommand()
{
sal_Int32 nLevel = sValue.toInt32();
if( !sValue.isEmpty() && nLevel >= 0 && nLevel <= 10 )
- xTC->setPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL), uno::makeAny( (sal_Int16)nLevel ));
+ xTC->setPropertyValue(getPropertyName(PROP_LEVEL), uno::makeAny( (sal_Int16)nLevel ));
}
// if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue ))
// \n Suppress page numbers
@@ -4124,7 +4104,7 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_NUMPAGES:
if (xFieldProperties.is())
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ getPropertyName(PROP_NUMBERING_TYPE),
uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
break;
}
@@ -4230,7 +4210,6 @@ void DomainMapper_Impl::SetFieldResult(OUString const& rResult)
uno::Reference<text::XTextField> xTextField = pContext->GetTextField();
try
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
OSL_ENSURE( xTextField.is()
//||m_xTOC.is() ||m_xTC.is()
//||m_sHyperlinkURL.getLength()
@@ -4244,7 +4223,7 @@ void DomainMapper_Impl::SetFieldResult(OUString const& rResult)
// user field content has to be set at the field master
uno::Reference< text::XDependentTextField > xDependentField( xTextField, uno::UNO_QUERY_THROW );
xDependentField->getTextFieldMaster()->setPropertyValue(
- rPropNameSupplier.GetName(PROP_CONTENT),
+ getPropertyName(PROP_CONTENT),
uno::makeAny( rResult ));
}
else if ( m_bSetCitation )
@@ -4317,11 +4296,11 @@ void DomainMapper_Impl::SetFieldResult(OUString const& rResult)
if (bIsSetExpression)
{ // this will throw for field types without Content
uno::Any aValue(xFieldProperties->getPropertyValue(
- rPropNameSupplier.GetName(PROP_CONTENT)));
+ getPropertyName(PROP_CONTENT)));
aValue >>= sValue;
}
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(bIsSetExpression && sValue.isEmpty()? PROP_CONTENT : PROP_CURRENT_PRESENTATION),
+ getPropertyName(bIsSetExpression && sValue.isEmpty()? PROP_CONTENT : PROP_CURRENT_PRESENTATION),
uno::makeAny( rResult ));
}
}
@@ -4467,11 +4446,10 @@ void DomainMapper_Impl::PopFieldContext()
}
else if(!pContext->GetHyperlinkURL().isEmpty())
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
xCrsr->gotoEnd( true );
uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW );
- xCrsrProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno::
+ xCrsrProperties->setPropertyValue(getPropertyName(PROP_HYPER_LINK_U_R_L), uno::
makeAny(pContext->GetHyperlinkURL()));
if (m_bStartTOC) {
@@ -4721,33 +4699,30 @@ void DomainMapper_Impl::SetLineNumbering( sal_Int32 nLnnMod, sal_uInt32 nLnc, sa
{
if( !m_bLineNumberingSet )
{
- const PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
try
{
uno::Reference< text::XLineNumberingProperties > xLineProperties( m_xTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProperties = xLineProperties->getLineNumberingProperties();
uno::Any aTrue( uno::makeAny( true ));
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_IS_ON ), aTrue);
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_COUNT_EMPTY_LINES ), aTrue );
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_COUNT_LINES_IN_FRAMES ), uno::makeAny( false ) );
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_INTERVAL ), uno::makeAny( static_cast< sal_Int16 >( nLnnMod )));
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_DISTANCE ), uno::makeAny( ConversionHelper::convertTwipToMM100(ndxaLnn) ));
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_NUMBER_POSITION ), uno::makeAny( style::LineNumberPosition::LEFT));
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_NUMBERING_TYPE ), uno::makeAny( style::NumberingType::ARABIC));
- xProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_RESTART_AT_EACH_PAGE ), uno::makeAny( nLnc == NS_ooxml::LN_Value_ST_LineNumberRestart_newPage ));
+ xProperties->setPropertyValue( getPropertyName( PROP_IS_ON ), aTrue);
+ xProperties->setPropertyValue( getPropertyName( PROP_COUNT_EMPTY_LINES ), aTrue );
+ xProperties->setPropertyValue( getPropertyName( PROP_COUNT_LINES_IN_FRAMES ), uno::makeAny( false ) );
+ xProperties->setPropertyValue( getPropertyName( PROP_INTERVAL ), uno::makeAny( static_cast< sal_Int16 >( nLnnMod )));
+ xProperties->setPropertyValue( getPropertyName( PROP_DISTANCE ), uno::makeAny( ConversionHelper::convertTwipToMM100(ndxaLnn) ));
+ xProperties->setPropertyValue( getPropertyName( PROP_NUMBER_POSITION ), uno::makeAny( style::LineNumberPosition::LEFT));
+ xProperties->setPropertyValue( getPropertyName( PROP_NUMBERING_TYPE ), uno::makeAny( style::NumberingType::ARABIC));
+ xProperties->setPropertyValue( getPropertyName( PROP_RESTART_AT_EACH_PAGE ), uno::makeAny( nLnc == NS_ooxml::LN_Value_ST_LineNumberRestart_newPage ));
}
catch( const uno::Exception& )
{}
}
m_bLineNumberingSet = true;
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( GetTextDocument(), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xStyleFamilies = xStylesSupplier->getStyleFamilies();
uno::Reference<container::XNameContainer> xStyles;
- xStyleFamilies->getByName(rPropNameSupplier.GetName( PROP_PARAGRAPH_STYLES )) >>= xStyles;
- lcl_linenumberingHeaderFooter( rPropNameSupplier, xStyles, "Header", this );
- lcl_linenumberingHeaderFooter( rPropNameSupplier, xStyles, "Footer", this );
+ xStyleFamilies->getByName(getPropertyName( PROP_PARAGRAPH_STYLES )) >>= xStyles;
+ lcl_linenumberingHeaderFooter( xStyles, "Header", this );
+ lcl_linenumberingHeaderFooter( xStyles, "Footer", this );
}
@@ -4950,16 +4925,15 @@ void DomainMapper_Impl::ApplySettingsTable()
{
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) );
+ xTextDefaults->setPropertyValue( getPropertyName( PROP_TAB_STOP_DISTANCE ), uno::makeAny(nDefTab) );
if (m_pSettingsTable->GetLinkStyles())
{
- PropertyNameSupplier& rSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
// If linked styles are enabled, set paragraph defaults from Word's default template
- xTextDefaults->setPropertyValue(rSupplier.GetName(PROP_PARA_BOTTOM_MARGIN), uno::makeAny(ConversionHelper::convertTwipToMM100(200)));
+ xTextDefaults->setPropertyValue(getPropertyName(PROP_PARA_BOTTOM_MARGIN), uno::makeAny(ConversionHelper::convertTwipToMM100(200)));
style::LineSpacing aSpacing;
aSpacing.Mode = style::LineSpacingMode::PROP;
aSpacing.Height = sal_Int16(115);
- xTextDefaults->setPropertyValue(rSupplier.GetName(PROP_PARA_LINE_SPACING), uno::makeAny(aSpacing));
+ xTextDefaults->setPropertyValue(getPropertyName(PROP_PARA_LINE_SPACING), uno::makeAny(aSpacing));
}
if (m_pSettingsTable->GetZoomFactor())
@@ -4983,9 +4957,9 @@ void DomainMapper_Impl::ApplySettingsTable()
if (m_pSettingsTable->GetUsePrinterMetrics())
xSettings->setPropertyValue("PrinterIndependentLayout", uno::makeAny(document::PrinterIndependentLayout::DISABLED));
if( m_pSettingsTable->GetEmbedTrueTypeFonts())
- xSettings->setPropertyValue( PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_EMBED_FONTS ), uno::makeAny(true) );
+ xSettings->setPropertyValue( getPropertyName( PROP_EMBED_FONTS ), uno::makeAny(true) );
if( m_pSettingsTable->GetEmbedSystemFonts())
- xSettings->setPropertyValue( PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_EMBED_SYSTEM_FONTS ), uno::makeAny(true) );
+ xSettings->setPropertyValue( getPropertyName( PROP_EMBED_SYSTEM_FONTS ), uno::makeAny(true) );
xSettings->setPropertyValue("AddParaTableSpacing", uno::makeAny(m_pSettingsTable->GetDoNotUseHTMLParagraphAutoSpacing()));
}
catch(const uno::Exception&)
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index b2b24b408daf..05a0cc70c2d4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -626,42 +626,35 @@ public:
void AppendFieldCommand(OUString& rPartOfCommand);
void handleFieldAsk
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
void handleAutoNum
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
static void handleAuthor
(OUString const& rFirstParam,
- PropertyNameSupplier& rPropNameSupplier,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
FieldId eFieldId);
void handleDocProperty
(FieldContextPtr pContext,
OUString const& rFirstParam,
- PropertyNameSupplier& rPropNameSupplier,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
void handleToc
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
const OUString & sTOCServiceName);
void handleIndex
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
const OUString & sTOCServiceName);
void handleBibliography
(FieldContextPtr pContext,
- PropertyNameSupplier& rPropNameSupplier,
const OUString & sTOCServiceName);
/// The field command has to be closed (cFieldSep appeared).
void CloseFieldCommand();
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index f44431c2f496..7e21f0f2dfb1 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -271,15 +271,13 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool bOldSt
return 0;
sal_Int32 itemZOrder(0);
--it;
- if( it->second->getPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier()
- .GetName( PROP_Z_ORDER )) >>= itemZOrder )
+ if( it->second->getPropertyValue(getPropertyName( PROP_Z_ORDER )) >>= itemZOrder )
return itemZOrder + 1; // after the topmost
}
else
{
sal_Int32 itemZOrder(0);
- if( it->second->getPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier()
- .GetName( PROP_Z_ORDER )) >>= itemZOrder )
+ if( it->second->getPropertyValue(getPropertyName( PROP_Z_ORDER )) >>= itemZOrder )
return itemZOrder; // before the item
}
SAL_WARN( "writerfilter", "findZOrder() didn't find item z-order" );
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 1d9078d53270..4720f89b80dd 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -358,53 +358,48 @@ public:
void applyMargins(uno::Reference< beans::XPropertySet > xGraphicObjectProperties) const
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_LEFT_MARGIN ), uno::makeAny(nLeftMargin));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_RIGHT_MARGIN ), uno::makeAny(nRightMargin));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_TOP_MARGIN ), uno::makeAny(nTopMargin));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), uno::makeAny(nBottomMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_LEFT_MARGIN ), uno::makeAny(nLeftMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_RIGHT_MARGIN ), uno::makeAny(nRightMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_TOP_MARGIN ), uno::makeAny(nTopMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_BOTTOM_MARGIN ), uno::makeAny(nBottomMargin));
}
void applyPosition(uno::Reference< beans::XPropertySet > xGraphicObjectProperties) const
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_HORI_ORIENT ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT ),
uno::makeAny(nHoriOrient));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_VERT_ORIENT ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_VERT_ORIENT ),
uno::makeAny(nVertOrient));
}
void applyRelativePosition(uno::Reference< beans::XPropertySet > xGraphicObjectProperties, bool bRelativeOnly = false) const
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
if (!bRelativeOnly)
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_HORI_ORIENT_POSITION),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT_POSITION),
uno::makeAny(nLeftPosition));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_HORI_ORIENT_RELATION ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT_RELATION ),
uno::makeAny(nHoriRelation));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_PAGE_TOGGLE ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_PAGE_TOGGLE ),
uno::makeAny(bPageToggle));
if (!bRelativeOnly)
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_VERT_ORIENT_POSITION),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_VERT_ORIENT_POSITION),
uno::makeAny(nTopPosition));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_VERT_ORIENT_RELATION ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_VERT_ORIENT_RELATION ),
uno::makeAny(nVertRelation));
}
void applyZOrder(uno::Reference<beans::XPropertySet>& xGraphicObjectProperties) const
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
if (zOrder >= 0)
{
GraphicZOrderHelper* pZOrderHelper = rDomainMapper.graphicZOrderHelper();
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_Z_ORDER), uno::makeAny(pZOrderHelper->findZOrder(zOrder)));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_Z_ORDER), uno::makeAny(pZOrderHelper->findZOrder(zOrder)));
pZOrderHelper->addItem(xGraphicObjectProperties, zOrder);
}
}
void applyName(uno::Reference<beans::XPropertySet>& xGraphicObjectProperties) const
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
try
{
if( !sName.isEmpty() )
@@ -412,9 +407,9 @@ public:
uno::Reference< container::XNamed > xNamed( xGraphicObjectProperties, uno::UNO_QUERY_THROW );
xNamed->setName( sName );
}
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_DESCRIPTION ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_DESCRIPTION ),
uno::makeAny( sAlternativeText ));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_TITLE ),
uno::makeAny( title ));
}
catch( const uno::Exception& e )
@@ -764,10 +759,8 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
(m_xShape, uno::UNO_QUERY_THROW);
- PropertyNameSupplier& rPropNameSupplier =
- PropertyNameSupplier::GetPropertyNameSupplier();
xShapeProps->setPropertyValue
- (rPropNameSupplier.GetName(PROP_ANCHOR_TYPE),
+ (getPropertyName(PROP_ANCHOR_TYPE),
uno::makeAny
(text::TextContentAnchorType_AS_CHARACTER));
@@ -785,7 +778,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
{
bKeepRotation = true;
xShapeProps->setPropertyValue
- (rPropNameSupplier.GetName(PROP_TEXT_RANGE),
+ (getPropertyName(PROP_TEXT_RANGE),
uno::makeAny
(m_pImpl->rDomainMapper.GetCurrentTextRange()));
}
@@ -1138,13 +1131,11 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
if(xGraphic.is())
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
uno::Reference< beans::XPropertySet > xGraphicObjectProperties(
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),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_GRAPHIC), uno::makeAny( xGraphic ));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_ANCHOR_TYPE),
uno::makeAny( m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR ?
text::TextContentAnchorType_AT_CHARACTER :
text::TextContentAnchorType_AS_CHARACTER ));
@@ -1177,7 +1168,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
};
for( sal_Int32 nBorder = 0; nBorder < 4; ++nBorder )
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( aBorderProps[nBorder]), uno::makeAny(aBorderLine));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( aBorderProps[nBorder]), uno::makeAny(aBorderLine));
// setting graphic object shadow proerties
if (m_pImpl->bShadow)
@@ -1208,15 +1199,15 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
aShadow.Location = table::ShadowLocation_TOP_LEFT;
}
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_SHADOW_FORMAT), uno::makeAny(aShadow));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_SHADOW_FORMAT), uno::makeAny(aShadow));
}
// setting properties for all types
if( m_pImpl->bPositionProtected )
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_POSITION_PROTECTED ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_POSITION_PROTECTED ),
uno::makeAny(true));
if( m_pImpl->bSizeProtected )
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SIZE_PROTECTED ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SIZE_PROTECTED ),
uno::makeAny(true));
sal_Int32 nWidth = m_pImpl->nRightPosition - m_pImpl->nLeftPosition;
@@ -1270,18 +1261,18 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
bool bOpaque = m_pImpl->bOpaque && !m_pImpl->rDomainMapper.IsInHeaderFooter( );
if( !bOpaque )
{
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_OPAQUE ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_OPAQUE ),
uno::makeAny(bOpaque));
}
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SURROUND ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SURROUND ),
uno::makeAny(m_pImpl->nWrap));
if( m_pImpl->bLayoutInCell && m_pImpl->nWrap != text::WrapTextMode_THROUGHT )
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_FOLLOW_TEXT_FLOW ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_FOLLOW_TEXT_FLOW ),
uno::makeAny(true));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SURROUND_CONTOUR ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SURROUND_CONTOUR ),
uno::makeAny(m_pImpl->bContour));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_OUTSIDE ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_CONTOUR_OUTSIDE ),
uno::makeAny(m_pImpl->bContourOutside));
m_pImpl->applyMargins(xGraphicObjectProperties);
}
@@ -1295,30 +1286,30 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
m_pImpl->nBrightness = 0;
}
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_ADJUST_CONTRAST ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_ADJUST_CONTRAST ),
uno::makeAny((sal_Int16)m_pImpl->nContrast));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_ADJUST_LUMINANCE ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_ADJUST_LUMINANCE ),
uno::makeAny((sal_Int16)m_pImpl->nBrightness));
if(m_pImpl->eColorMode != drawing::ColorMode_STANDARD)
{
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_GRAPHIC_COLOR_MODE ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_GRAPHIC_COLOR_MODE ),
uno::makeAny(m_pImpl->eColorMode));
}
if(m_pImpl->fGamma > 0. )
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_GAMMA ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_GAMMA ),
uno::makeAny(m_pImpl->fGamma ));
if(m_pImpl->bHoriFlip)
{
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_HORI_MIRRORED_ON_EVEN_PAGES ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_MIRRORED_ON_EVEN_PAGES ),
uno::makeAny( m_pImpl->bHoriFlip ));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_HORI_MIRRORED_ON_ODD_PAGES ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_MIRRORED_ON_ODD_PAGES ),
uno::makeAny( m_pImpl->bHoriFlip ));
}
if( m_pImpl->bVertFlip )
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_VERT_MIRRORED ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_VERT_MIRRORED ),
uno::makeAny( m_pImpl->bVertFlip ));
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_BACK_COLOR ),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_BACK_COLOR ),
uno::makeAny( m_pImpl->nFillColor ));
m_pImpl->applyZOrder(xGraphicObjectProperties);
@@ -1326,8 +1317,8 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
//there seems to be no way to detect the original size via _real_ API
uno::Reference< beans::XPropertySet > xGraphicProperties( xGraphic, uno::UNO_QUERY_THROW );
awt::Size aGraphicSize, aGraphicSizePixel;
- xGraphicProperties->getPropertyValue(rPropNameSupplier.GetName( PROP_SIZE100th_M_M )) >>= aGraphicSize;
- xGraphicProperties->getPropertyValue(rPropNameSupplier.GetName( PROP_SIZE_PIXEL )) >>= aGraphicSizePixel;
+ xGraphicProperties->getPropertyValue(getPropertyName( PROP_SIZE100th_M_M )) >>= aGraphicSize;
+ xGraphicProperties->getPropertyValue(getPropertyName( PROP_SIZE_PIXEL )) >>= aGraphicSizePixel;
uno::Any aContourPolyPolygon;
if( aGraphicSize.Width && aGraphicSize.Height &&
@@ -1337,13 +1328,13 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
aContourPolyPolygon <<= pCorrected->getPointSequenceSequence();
}
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_POLY_POLYGON),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_CONTOUR_POLY_POLYGON),
aContourPolyPolygon);
if(m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_INLINE || m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
{
if( m_pImpl->getXSize() && m_pImpl->getYSize() )
- xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_SIZE),
+ xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_SIZE),
uno::makeAny( awt::Size( m_pImpl->getXSize(), m_pImpl->getYSize() )));
m_pImpl->applyMargins(xGraphicObjectProperties);
m_pImpl->applyName(xGraphicObjectProperties);
@@ -1361,10 +1352,8 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
void GraphicImport::data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t /*ref*/)
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
beans::PropertyValues aMediaProperties( 1 );
- aMediaProperties[0].Name = rPropNameSupplier.GetName(PROP_INPUT_STREAM);
+ aMediaProperties[0].Name = getPropertyName(PROP_INPUT_STREAM);
uno::Reference< io::XInputStream > xIStream = new XInputStreamHelper( buf, len, m_pImpl->bIsBitmap );
aMediaProperties[0].Value <<= xIStream;
diff --git a/writerfilter/source/dmapper/ModelEventListener.cxx b/writerfilter/source/dmapper/ModelEventListener.cxx
index 895853248507..372970b30d1d 100644
--- a/writerfilter/source/dmapper/ModelEventListener.cxx
+++ b/writerfilter/source/dmapper/ModelEventListener.cxx
@@ -56,8 +56,6 @@ void ModelEventListener::notifyEvent( const document::EventObject& rEvent ) thro
{
try
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
//remove listener
uno::Reference<document::XEventBroadcaster>(rEvent.Source, uno::UNO_QUERY )->removeEventListener(
uno::Reference<document::XEventListener>(this));
@@ -72,9 +70,9 @@ void ModelEventListener::notifyEvent( const document::EventObject& rEvent ) thro
{
uno::Reference<beans::XPropertySet> xPropertySet(xEnumeration->nextElement(), uno::UNO_QUERY);
sal_Int16 nSource = 0;
- xPropertySet->getPropertyValue(rPropNameSupplier.GetName(PROP_REFERENCE_FIELD_SOURCE)) >>= nSource;
+ xPropertySet->getPropertyValue(getPropertyName(PROP_REFERENCE_FIELD_SOURCE)) >>= nSource;
sal_Int16 nPart = 0;
- xPropertySet->getPropertyValue(rPropNameSupplier.GetName(PROP_REFERENCE_FIELD_PART)) >>= nPart;
+ xPropertySet->getPropertyValue(getPropertyName(PROP_REFERENCE_FIELD_PART)) >>= nPart;
if (nSource == text::ReferenceFieldSource::BOOKMARK && nPart == text::ReferenceFieldPart::PAGE)
++nIndex;
}
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 8d93fb8aa0cc..67c25c8b4108 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -39,7 +39,7 @@
using namespace com::sun::star;
#define MAKE_PROPVAL(NameId, Value) \
- beans::PropertyValue(aPropNameSupplier.GetName(NameId), 0, uno::makeAny(Value), beans::PropertyState_DIRECT_VALUE )
+ beans::PropertyValue(getPropertyName(NameId), 0, uno::makeAny(Value), beans::PropertyState_DIRECT_VALUE )
#define NUMBERING_MAX_LEVELS 10
@@ -244,7 +244,6 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
text::HoriOrientation::RIGHT,
};
- PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
std::vector<beans::PropertyValue> aNumberingProperties;
if( m_nIStartAt >= 0)
@@ -319,14 +318,14 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
boost::optional<PropertyMap::Property> aProp = getProperty(aReadIds[i]);
if (aProp)
aNumberingProperties.push_back(
- beans::PropertyValue( aPropNameSupplier.GetName(aProp->first), 0, aProp->second, beans::PropertyState_DIRECT_VALUE )
+ beans::PropertyValue( getPropertyName(aProp->first), 0, aProp->second, beans::PropertyState_DIRECT_VALUE )
);
}
boost::optional<PropertyMap::Property> aPropFont = getProperty(PROP_CHAR_FONT_NAME);
if(aPropFont && !isOutlineNumbering())
aNumberingProperties.push_back(
- beans::PropertyValue( aPropNameSupplier.GetName(PROP_BULLET_FONT_NAME), 0, aPropFont->second, beans::PropertyState_DIRECT_VALUE )
+ beans::PropertyValue( getPropertyName(PROP_BULLET_FONT_NAME), 0, aPropFont->second, beans::PropertyState_DIRECT_VALUE )
);
return comphelper::containerToSequence(aNumberingProperties);
@@ -336,11 +335,10 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
void ListLevel::AddParaProperties( uno::Sequence< beans::PropertyValue >* props )
{
uno::Sequence< beans::PropertyValue >& aProps = *props;
- PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- OUString sFirstLineIndent = aPropNameSupplier.GetName(
+ OUString sFirstLineIndent = getPropertyName(
PROP_FIRST_LINE_INDENT );
- OUString sIndentAt = aPropNameSupplier.GetName(
+ OUString sIndentAt = getPropertyName(
PROP_INDENT_AT );
bool hasFirstLineIndent = lcl_findProperty( aProps, sFirstLineIndent );
@@ -354,9 +352,9 @@ void ListLevel::AddParaProperties( uno::Sequence< beans::PropertyValue >* props
// ParaFirstLineIndent -> FirstLineIndent
// ParaLeftMargin -> IndentAt
- OUString sParaIndent = aPropNameSupplier.GetName(
+ OUString sParaIndent = getPropertyName(
PROP_PARA_FIRST_LINE_INDENT );
- OUString sParaLeftMargin = aPropNameSupplier.GetName(
+ OUString sParaLeftMargin = getPropertyName(
PROP_PARA_LEFT_MARGIN );
sal_Int32 nLen = aParaProps.getLength( );
@@ -539,10 +537,8 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
uno::Any oStyle = xStyles->getByName( sStyleName );
xStyle.set( oStyle, uno::UNO_QUERY_THROW );
- PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
// Get the default OOo Numbering style rules
- uno::Any aRules = xStyle->getPropertyValue( aPropNameSupplier.GetName( PROP_NUMBERING_RULES ) );
+ uno::Any aRules = xStyle->getPropertyValue( getPropertyName( PROP_NUMBERING_RULES ) );
aRules >>= m_xNumRules;
uno::Sequence< uno::Sequence< beans::PropertyValue > > aProps = GetPropertyValues( );
@@ -580,7 +576,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
//create (or find) a character style containing the character
// attributes of the symbol and apply it to the numbering level
OUString sStyle = rDMapper.getOrCreateCharStyle( aStyleProps );
- aLvlProps.push_back(comphelper::makePropertyValue(aPropNameSupplier.GetName(PROP_CHAR_STYLE_NAME), sStyle));
+ aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_CHAR_STYLE_NAME), sStyle));
}
// Get the prefix / suffix / Parent numbering
@@ -597,7 +593,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
sal_Int16 nParentNum = ListLevel::GetParentNumbering(
sText, nLevel, rPrefix, rSuffix );
- aLvlProps.push_back(comphelper::makePropertyValue(aPropNameSupplier.GetName(PROP_PREFIX), rPrefix));
+ aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_PREFIX), rPrefix));
if (sText.isEmpty())
{
@@ -612,10 +608,10 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
}
}
- aLvlProps.push_back(comphelper::makePropertyValue(aPropNameSupplier.GetName(PROP_SUFFIX), rSuffix));
- aLvlProps.push_back(comphelper::makePropertyValue(aPropNameSupplier.GetName(PROP_PARENT_NUMBERING), nParentNum));
+ aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SUFFIX), rSuffix));
+ aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_PARENT_NUMBERING), nParentNum));
- aLvlProps.push_back(comphelper::makePropertyValue(aPropNameSupplier.GetName(PROP_POSITION_AND_SPACE_MODE), sal_Int16(text::PositionAndSpaceMode::LABEL_ALIGNMENT)));
+ aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_POSITION_AND_SPACE_MODE), sal_Int16(text::PositionAndSpaceMode::LABEL_ALIGNMENT)));
// Replace the numbering rules for the level
@@ -630,7 +626,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
xOutlines->getChapterNumberingRules( );
StyleSheetEntryPtr pParaStyle = pAbsLevel->GetParaStyle( );
- aLvlProps.push_back(comphelper::makePropertyValue(aPropNameSupplier.GetName(PROP_HEADING_STYLE_NAME), pParaStyle->sConvertedStyleName));
+ aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HEADING_STYLE_NAME), pParaStyle->sConvertedStyleName));
xOutlineRules->replaceByIndex(nLevel, uno::makeAny(comphelper::containerToSequence(aLvlProps)));
}
@@ -639,7 +635,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
}
// Create the numbering style for these rules
- OUString sNumRulesName = aPropNameSupplier.GetName( PROP_NUMBERING_RULES );
+ OUString sNumRulesName = getPropertyName( PROP_NUMBERING_RULES );
xStyle->setPropertyValue( sNumRulesName, uno::makeAny( m_xNumRules ) );
}
catch( const lang::IllegalArgumentException& e )
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index f72d8ef15409..6208750d0bd3 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -107,7 +107,6 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
{
m_xShape.set( xTempShape );
uno::Reference< beans::XPropertySet > xShapeProps( xTempShape, uno::UNO_QUERY );
- PropertyNameSupplier& rNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
try
{
@@ -118,7 +117,7 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
m_aShapeSize = xTempShape->getSize();
m_aShapePosition = xTempShape->getPosition();
- xShapeProps->getPropertyValue( rNameSupplier.GetName( PROP_BITMAP ) ) >>= m_xReplacement;
+ xShapeProps->getPropertyValue( getPropertyName( PROP_BITMAP ) ) >>= m_xReplacement;
}
catch( const uno::Exception& e )
{
@@ -161,10 +160,9 @@ void OLEHandler::lcl_sprm(Sprm & rSprm)
try
{
uno::Reference< beans::XPropertySet > xShapeProps( m_xShape, uno::UNO_QUERY_THROW );
- PropertyNameSupplier& rNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
xShapeProps->setPropertyValue(
- rNameSupplier.GetName( PROP_SURROUND ),
+ getPropertyName( PROP_SURROUND ),
uno::makeAny( m_nWrapMode ) );
}
catch( const uno::Exception& e )
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 059a5808a4a8..5bf3715ed799 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -16,417 +16,372 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <rtl/instance.hxx>
#include <rtl/ustring.hxx>
#include "PropertyIds.hxx"
-#include <map>
namespace writerfilter {
namespace dmapper{
-typedef ::std::map< PropertyIds, OUString> PropertyNameMap_t;
-
-struct PropertyNameSupplier_Impl
-{
- PropertyNameMap_t aNameMap;
-};
-
-
-
-PropertyNameSupplier::PropertyNameSupplier() :
- m_pImpl(new PropertyNameSupplier_Impl())
+OUString getPropertyName( PropertyIds eId )
{
-}
-
-
-PropertyNameSupplier::~PropertyNameSupplier()
-{
-}
-
-
-OUString PropertyNameSupplier::GetName( PropertyIds eId ) const
-{
- PropertyNameMap_t::iterator aIt = m_pImpl->aNameMap.find(eId);
- if(aIt == m_pImpl->aNameMap.end())
- {
- OUString sName;
- switch(eId)
- {
- case PROP_CHAR_WEIGHT: sName = "CharWeight"; break;
- case PROP_CHAR_POSTURE: sName = "CharPosture"; break;
- case PROP_CHAR_STRIKEOUT: sName = "CharStrikeout"; break;
- case PROP_CHAR_CONTOURED: sName = "CharContoured"; break;
- case PROP_CHAR_SHADOWED: sName = "CharShadowed"; break;
- case PROP_CHAR_CASE_MAP: sName = "CharCaseMap"; break;
- case PROP_CHAR_COLOR: sName = "CharColor"; break;
- case PROP_CHAR_RELIEF: sName = "CharRelief"; break;
- case PROP_CHAR_UNDERLINE: sName = "CharUnderline"; break;
- case PROP_CHAR_UNDERLINE_COLOR: sName = "CharUnderlineColor"; break;
- case PROP_CHAR_UNDERLINE_HAS_COLOR: sName = "CharUnderlineHasColor"; break;
- case PROP_CHAR_WORD_MODE: sName = "CharWordMode"; break;
- case PROP_CHAR_ESCAPEMENT : sName = "CharEscapement"; break;
- case PROP_CHAR_ESCAPEMENT_HEIGHT: sName = "CharEscapementHeight"; break;
- case PROP_CHAR_HEIGHT: sName = "CharHeight"; break;
- case PROP_CHAR_HEIGHT_COMPLEX: sName = "CharHeightComplex"; break;
- case PROP_CHAR_LOCALE: sName = "CharLocale"; break;
- case PROP_CHAR_LOCALE_ASIAN: sName = "CharLocaleAsian"; break;
- case PROP_CHAR_LOCALE_COMPLEX: sName = "CharLocaleComplex"; break;
- case PROP_CHAR_WEIGHT_COMPLEX : sName = "CharWeightComplex"; break;
- case PROP_CHAR_POSTURE_COMPLEX: sName = "CharPostureComplex"; break;
- case PROP_CHAR_CHAR_KERNING: sName = "CharKerning"; break;
- case PROP_CHAR_AUTO_KERNING: sName = "CharAutoKerning"; break;
- case PROP_CHAR_SCALE_WIDTH: sName = "CharScaleWidth"; break;
- case PROP_CHAR_STYLE_NAME: sName = "CharStyleName"; break;
- case PROP_CHAR_FONT_NAME: sName = "CharFontName"; break;
- case PROP_CHAR_FONT_STYLE: sName = "CharFontStyle"; break;
- case PROP_CHAR_FONT_FAMILY: sName = "CharFontFamily"; break;
- case PROP_CHAR_FONT_CHAR_SET: sName = "CharFontCharSet"; break;
- case PROP_CHAR_FONT_PITCH: sName = "CharFontPitch"; break;
- case PROP_CHAR_FONT_NAME_ASIAN : sName = "CharFontNameAsian"; break;
- case PROP_CHAR_HEIGHT_ASIAN : sName = "CharHeightAsian"; break;
- case PROP_CHAR_FONT_STYLE_ASIAN : sName = "CharFontStyleAsian"; break;
- case PROP_CHAR_FONT_FAMILY_ASIAN : sName = "CharFontFamilyAsian"; break;
- case PROP_CHAR_FONT_CHAR_SET_ASIAN : sName = "CharFontCharSetAsian"; break;
- case PROP_CHAR_FONT_PITCH_ASIAN : sName = "CharFontPitchAsian"; break;
- case PROP_CHAR_FONT_NAME_COMPLEX : sName = "CharFontNameComplex"; break;
- case PROP_CHAR_FONT_STYLE_COMPLEX : sName = "CharFontStyleComplex"; break;
- case PROP_CHAR_FONT_FAMILY_COMPLEX: sName = "CharFontFamilyComplex"; break;
- case PROP_CHAR_FONT_CHAR_SET_COMPLEX: sName = "CharFontCharSetComplex"; break;
- case PROP_CHAR_FONT_PITCH_COMPLEX: sName = "CharFontPitchComplex"; break;
- case PROP_CHAR_HIDDEN : sName = "CharHidden"; break;
- case PROP_CHAR_WEIGHT_ASIAN : sName = "CharWeightAsian"; break;
- case PROP_CHAR_POSTURE_ASIAN : sName = "CharPostureAsian"; break;
- case PROP_CHAR_BACK_COLOR: sName = "CharBackColor"; break;
- case PROP_CHAR_EMPHASIS: sName = "CharEmphasis"; break;
- case PROP_CHAR_COMBINE_IS_ON: sName = "CharCombineIsOn"; break;
- case PROP_CHAR_COMBINE_PREFIX: sName = "CharCombinePrefix"; break;
- case PROP_CHAR_COMBINE_SUFFIX: sName = "CharCombineSuffix"; break;
- case PROP_CHAR_ROTATION: sName = "CharRotation"; break;
- case PROP_CHAR_ROTATION_IS_FIT_TO_LINE: sName = "CharRotationIsFitToLine"; break;
- case PROP_CHAR_FLASH: sName = "CharFlash"; break;
- case PROP_CHAR_LEFT_BORDER: sName = "CharLeftBorder";break;
- case PROP_CHAR_RIGHT_BORDER: sName = "CharRightBorder";break;
- case PROP_CHAR_TOP_BORDER: sName = "CharTopBorder";break;
- case PROP_CHAR_BOTTOM_BORDER: sName = "CharBottomBorder";break;
- case PROP_CHAR_LEFT_BORDER_DISTANCE: sName = "CharLeftBorderDistance"; break;
- case PROP_CHAR_RIGHT_BORDER_DISTANCE: sName = "CharRightBorderDistance"; break;
- case PROP_CHAR_TOP_BORDER_DISTANCE: sName = "CharTopBorderDistance";break;
- case PROP_CHAR_BOTTOM_BORDER_DISTANCE: sName = "CharBottomBorderDistance"; break;
- case PROP_CHAR_SHADOW_FORMAT: sName = "CharShadowFormat"; break;
- case PROP_CHAR_HIGHLIGHT: sName = "CharHighlight"; break;
- case PROP_PARA_STYLE_NAME: sName = "ParaStyleName"; break;
- case PROP_PARA_ADJUST: sName = "ParaAdjust"; break;
- case PROP_PARA_VERT_ALIGNMENT: sName = "ParaVertAlignment"; break;
- case PROP_PARA_LAST_LINE_ADJUST: sName = "ParaLastLineAdjust"; break;
- case PROP_PARA_RIGHT_MARGIN : sName = "ParaRightMargin"; break;
- case PROP_PARA_LEFT_MARGIN : sName = "ParaLeftMargin"; break;
- case PROP_PARA_FIRST_LINE_INDENT: sName = "ParaFirstLineIndent"; break;
- case PROP_PARA_KEEP_TOGETHER: sName = "ParaKeepTogether"; break;
- case PROP_PARA_TOP_MARGIN: sName = "ParaTopMargin"; break;
- case PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING: sName = "ParaTopMarginBeforeAutoSpacing"; break;
- case PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING: sName = "ParaBottomMarginAfterAutoSpacing"; break;
- case PROP_PARA_CONTEXT_MARGIN: sName = "ParaContextMargin"; break;
- case PROP_PARA_BOTTOM_MARGIN: sName = "ParaBottomMargin"; break;
- case PROP_PARA_IS_HYPHENATION: sName = "ParaIsHyphenation"; break;
- case PROP_PARA_LINE_NUMBER_COUNT: sName = "ParaLineNumberCount"; break;
- case PROP_PARA_IS_HANGING_PUNCTUATION: sName = "ParaIsHangingPunctuation"; break;
- case PROP_PARA_LINE_SPACING: sName = "ParaLineSpacing"; break;
- case PROP_PARA_TAB_STOPS: sName = "ParaTabStops"; break;
- case PROP_PARA_WIDOWS: sName = "ParaWidows"; break;
- case PROP_PARA_ORPHANS: sName = "ParaOrphans"; break;
- case PROP_PARA_LINE_NUMBER_START_VALUE: sName = "ParaLineNumberStartValue"; break;
- case PROP_NUMBERING_LEVEL: sName = "NumberingLevel"; break;
- case PROP_NUMBERING_RULES: sName = "NumberingRules"; break;
- case PROP_NUMBERING_TYPE: sName = "NumberingType"; break;
- case PROP_START_WITH: sName = "StartWith"; break;
- case PROP_ADJUST: sName = "Adjust"; break;
- case PROP_PARENT_NUMBERING: sName = "ParentNumbering"; break;
- case PROP_RIGHT_MARGIN : sName = "RightMargin"; break;
- case PROP_LEFT_MARGIN : sName = "LeftMargin"; break;
- case PROP_TOP_MARGIN : sName = "TopMargin"; break;
- case PROP_BOTTOM_MARGIN : sName = "BottomMargin"; break;
- case PROP_FIRST_LINE_OFFSET: sName = "FirstLineOffset"; break;
- case PROP_LEFT_BORDER : sName = "LeftBorder";break;
- case PROP_RIGHT_BORDER : sName = "RightBorder";break;
- case PROP_TOP_BORDER : sName = "TopBorder";break;
- case PROP_BOTTOM_BORDER : sName = "BottomBorder";break;
- case PROP_TABLE_BORDER : sName = "TableBorder";break;
- case PROP_TABLE_ROW_DELETE : sName = "TableRowDelete"; break;
- case PROP_TABLE_ROW_INSERT : sName = "TableRowInsert"; break;
- case PROP_TABLE_CELL_DELETE : sName = "TableCellDelete"; break;
- case PROP_TABLE_CELL_INSERT : sName = "TableCellInsert"; break;
- case PROP_LEFT_BORDER_DISTANCE : sName = "LeftBorderDistance"; break;
- case PROP_RIGHT_BORDER_DISTANCE : sName = "RightBorderDistance"; break;
- case PROP_TOP_BORDER_DISTANCE : sName = "TopBorderDistance";break;
- case PROP_BOTTOM_BORDER_DISTANCE: sName = "BottomBorderDistance"; break;
- case PROP_CURRENT_PRESENTATION : sName = "CurrentPresentation"; break;
- case PROP_IS_FIXED : sName = "IsFixed"; break;
- case PROP_SUB_TYPE : sName = "SubType"; break;
- case PROP_FILE_FORMAT : sName = "FileFormat"; break;
- case PROP_HYPER_LINK_U_R_L : sName = "HyperLinkURL"; break;
- case PROP_NUMBER_FORMAT : sName = "NumberFormat"; break;
- case PROP_NAME : sName = "Name"; break;
- case PROP_IS_INPUT : sName = "IsInput"; break;
- case PROP_HINT : sName = "Hint"; break;
- case PROP_FULL_NAME : sName = "FullName"; break;
- case PROP_KEYWORDS : sName = "Keywords"; break;
- case PROP_DESCRIPTION : sName = "Description"; break;
- case PROP_MACRO_NAME : sName = "MacroName"; break;
- case PROP_SUBJECT : sName = "Subject"; break;
- case PROP_USER_DATA_TYPE : sName = "UserDataType"; break;
- case PROP_TITLE : sName = "Title"; break;
- case PROP_CONTENT : sName = "Content"; break;
- case PROP_DATA_COLUMN_NAME : sName = "DataColumnName"; break;
- case PROP_INPUT_STREAM : sName = "InputStream"; break;
- case PROP_GRAPHIC : sName = "Graphic"; break;
- case PROP_ANCHOR_TYPE : sName = "AnchorType"; break;
- case PROP_SIZE : sName = "Size"; break;
- case PROP_HORI_ORIENT : sName = "HoriOrient"; break;
- case PROP_HORI_ORIENT_POSITION : sName = "HoriOrientPosition"; break;
- case PROP_HORI_ORIENT_RELATION : sName = "HoriOrientRelation"; break;
- case PROP_VERT_ORIENT : sName = "VertOrient"; break;
- case PROP_VERT_ORIENT_POSITION : sName = "VertOrientPosition"; break;
- case PROP_VERT_ORIENT_RELATION : sName = "VertOrientRelation"; break;
- case PROP_GRAPHIC_CROP : sName = "GraphicCrop"; break;
- case PROP_SIZE100th_M_M : sName = "Size100thMM"; break;
- case PROP_SIZE_PIXEL : sName = "SizePixel"; break;
- case PROP_SURROUND : sName = "Surround"; break;
- case PROP_SURROUND_CONTOUR : sName = "SurroundContour"; break;
- case PROP_ADJUST_CONTRAST : sName = "AdjustContrast"; break;
- case PROP_ADJUST_LUMINANCE : sName = "AdjustLuminance"; break;
- case PROP_GRAPHIC_COLOR_MODE : sName = "GraphicColorMode"; break;
- case PROP_GAMMA : sName = "Gamma"; break;
- case PROP_HORI_MIRRORED_ON_EVEN_PAGES: sName = "HoriMirroredOnEvenPages"; break;
- case PROP_HORI_MIRRORED_ON_ODD_PAGES : sName = "HoriMirroredOnOddPages"; break;
- case PROP_VERT_MIRRORED : sName = "VertMirrored"; break;
- case PROP_CONTOUR_OUTSIDE : sName = "ContourOutside"; break;
- case PROP_CONTOUR_POLY_POLYGON : sName = "ContourPolyPolygon"; break;
- case PROP_PAGE_TOGGLE : sName = "PageToggle"; break;
- case PROP_BACK_COLOR : sName = "BackColor"; break;
- case PROP_BACK_COLOR_TRANSPARENCY: sName = "BackColorTransparency"; break;
- case PROP_ALTERNATIVE_TEXT : sName = "AlternativeText"; break;
- case PROP_HEADER_TEXT_LEFT : sName = "HeaderTextLeft"; break;
- case PROP_HEADER_TEXT : sName = "HeaderText"; break;
- case PROP_HEADER_IS_SHARED : sName = "HeaderIsShared"; break;
- case PROP_HEADER_IS_ON : sName = "HeaderIsOn"; break;
- case PROP_FOOTER_TEXT_LEFT : sName = "FooterTextLeft"; break;
- case PROP_FOOTER_TEXT : sName = "FooterText"; break;
- case PROP_FOOTER_IS_SHARED : sName = "FooterIsShared"; break;
- case PROP_FOOTER_IS_ON : sName = "FooterIsOn"; break;
- case PROP_FOOTNOTE_COUNTING : sName = "FootnoteCounting"; break;
- case PROP_WIDTH : sName = "Width"; break;
- case PROP_HEIGHT : sName = "Height"; break;
- case PROP_SEPARATOR_LINE_IS_ON : sName = "SeparatorLineIsOn"; break;
- case PROP_TEXT_COLUMNS : sName = "TextColumns"; break;
- case PROP_AUTOMATIC_DISTANCE : sName = "AutomaticDistance"; break;
- case PROP_IS_LANDSCAPE : sName = "IsLandscape"; break;
- case PROP_PRINTER_PAPER_TRAY_INDEX: sName = "PrinterPaperTrayIndex"; break;
- case PROP_FIRST_PAGE : sName = "First Page"; break;
- case PROP_DEFAULT : sName = "Default"; break;
- case PROP_PAGE_DESC_NAME : sName = "PageDescName"; break;
- case PROP_PAGE_NUMBER_OFFSET: sName = "PageNumberOffset"; break;
- case PROP_BREAK_TYPE : sName = "BreakType"; break;
- case PROP_FOOTER_IS_DYNAMIC_HEIGHT: sName = "FooterIsDynamicHeight"; break;
- case PROP_FOOTER_DYNAMIC_SPACING: sName = "FooterDynamicSpacing"; break;
- case PROP_FOOTER_HEIGHT : sName = "FooterHeight"; break;
- case PROP_FOOTER_BODY_DISTANCE : sName = "FooterBodyDistance"; break;
- case PROP_HEADER_IS_DYNAMIC_HEIGHT: sName = "HeaderIsDynamicHeight"; break;
- case PROP_HEADER_DYNAMIC_SPACING: sName = "HeaderDynamicSpacing"; break;
- case PROP_HEADER_HEIGHT : sName = "HeaderHeight"; break;
- case PROP_HEADER_BODY_DISTANCE : sName = "HeaderBodyDistance"; break;
- case PROP_WRITING_MODE : sName = "WritingMode"; break;
- case PROP_GRID_MODE : sName = "GridMode"; break;
- case PROP_GRID_DISPLAY : sName = "GridDisplay"; break;
- case PROP_GRID_PRINT : sName = "GridPrint"; break;
- case PROP_ADD_EXTERNAL_LEADING : sName = "AddExternalLeading"; break;
- case PROP_GRID_LINES : sName = "GridLines"; break;
- case PROP_GRID_BASE_HEIGHT : sName = "GridBaseHeight"; break;
- case PROP_GRID_RUBY_HEIGHT : sName = "GridRubyHeight"; break;
- case PROP_GRID_STANDARD_MODE : sName = "StandardPageMode"; break;
- case PROP_IS_ON : sName = "IsOn"; break;
- case PROP_RESTART_AT_EACH_PAGE : sName = "RestartAtEachPage"; break;
- case PROP_COUNT_EMPTY_LINES : sName = "CountEmptyLines"; break;
- case PROP_COUNT_LINES_IN_FRAMES : sName = "CountLinesInFrames"; break;
- case PROP_INTERVAL : sName = "Interval"; break;
- case PROP_DISTANCE : sName = "Distance"; break;
- case PROP_NUMBER_POSITION : sName = "NumberPosition"; break;
- case PROP_LEVEL : sName = "Level"; break;
- case PROP_LEVEL_FOLLOW : sName = "LabelFollowedBy"; break;
- case PROP_LEVEL_PARAGRAPH_STYLES : sName = "LevelParagraphStyles"; break;
- case PROP_LEVEL_FORMAT : sName = "LevelFormat"; break;
- case PROP_TOKEN_TYPE : sName = "TokenType"; break;
- case PROP_TOKEN_HYPERLINK_START : sName = "TokenHyperlinkStart"; break;
- case PROP_TOKEN_HYPERLINK_END : sName = "TokenHyperlinkEnd"; break;
- case PROP_TOKEN_CHAPTER_INFO : sName = "TokenChapterInfo"; break;
- case PROP_CHAPTER_FORMAT : sName = "ChapterFormat"; break;
- case PROP_TOKEN_TEXT : sName = "TokenText"; break;
- case PROP_TEXT : sName = "Text"; break;
- case PROP_CREATE_FROM_OUTLINE : sName = "CreateFromOutline"; break;
- case PROP_CREATE_FROM_MARKS : sName = "CreateFromMarks"; break;
- case PROP_STANDARD : sName = "Standard"; break;
- case PROP_IS_SPLIT_ALLOWED : sName = "IsSplitAllowed"; break;
- case META_PROP_VERTICAL_BORDER : sName = "VerticalBorder"; break;
- case META_PROP_HORIZONTAL_BORDER : sName = "HorizontalBorder"; break;
- case PROP_HEADER_ROW_COUNT : sName = "HeaderRowCount"; break;
- case PROP_IS_AUTO_HEIGHT : sName = "IsAutoHeight"; break;
- case PROP_SIZE_TYPE : sName = "SizeType"; break;
- case PROP_TABLE_COLUMN_SEPARATORS: sName = "TableColumnSeparators"; break;
- case META_PROP_TABLE_STYLE_NAME : sName = "TableStyleName"; break;
- case PROP_TABLE_REDLINE_PARAMS : sName = "TableRedlineParams"; break;
- case PROP_TABLE_REDLINE_AUTHOR : sName = "TableRedlineAuthor"; break;
- case PROP_TABLE_REDLINE_DATE : sName = "TableRedlineDate"; break;
- case PROP_TABLE_REDLINE_ID : sName = "TableRedlineID"; break;
- case PROP_TABLE_REDLINE_TOKEN : sName = "TableRedlineToken"; break;
- case PROP_REDLINE_AUTHOR : sName = "RedlineAuthor"; break;
- case PROP_REDLINE_DATE_TIME : sName = "RedlineDateTime"; break;
- case PROP_REDLINE_COMMENT : sName = "RedlineComment"; break;
- case PROP_REDLINE_TYPE : sName = "RedlineType"; break;
- case PROP_REDLINE_TOKEN : sName = "RedlineToken"; break;
- case PROP_REDLINE_REVERT_PROPERTIES: sName = "RedlineRevertProperties"; break;
- case PROP_REDLINE_SUCCESSOR_DATA: sName = "RedlineSuccessorData"; break;
- case PROP_REDLINE_IDENTIFIER : sName = "RedlineIdentifier"; break;
- case PROP_SIZE_PROTECTED : sName = "SizeProtected"; break;
- case PROP_POSITION_PROTECTED : sName = "PositionProtected"; break;
- case PROP_OPAQUE : sName = "Opaque"; break;
- case PROP_VERTICAL_MERGE : sName = "VerticalMerge"; break;
- case PROP_BULLET_CHAR : sName = "BulletChar"; break;
- case PROP_BULLET_FONT_NAME : sName = "BulletFontName"; break;
- case PROP_PARA_BACK_COLOR : sName = "ParaBackColor"; break;
- case PROP_TABS_RELATIVE_TO_INDENT: sName = "TabsRelativeToIndent"; break;
- case PROP_PREFIX : sName = "Prefix"; break;
- case PROP_SUFFIX : sName = "Suffix"; break;
- case PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES: sName = "CreateFromLevelParagraphStyles"; break;
- case PROP_DROP_CAP_FORMAT : sName = "DropCapFormat"; break;
- case PROP_REFERENCE_FIELD_PART : sName = "ReferenceFieldPart"; break;
- case PROP_SOURCE_NAME: sName = "SourceName"; break;
- case PROP_REFERENCE_FIELD_SOURCE : sName = "ReferenceFieldSource"; break;
- case PROP_WIDTH_TYPE : sName = "WidthType"; break;
- case PROP_TBL_LOOK : sName = "TblLook"; break;
- case PROP_TEXT_RANGE: sName = "TextRange"; break;
- case PROP_SERVICE_CHAR_STYLE : sName = "com.sun.star.style.CharacterStyle"; break;
- case PROP_SERVICE_PARA_STYLE : sName = "com.sun.star.style.ParagraphStyle"; break;
- case PROP_CHARACTER_STYLES : sName = "CharacterStyles"; break;
- case PROP_PARAGRAPH_STYLES : sName = "ParagraphStyles"; break;
- case PROP_PARAGRAPH_STYLE_NAME : sName = "ParagraphStyleName"; break;
- case PROP_TABLE_BORDER_DISTANCES: sName = "TableBorderDistances"; break;
- case META_PROP_CELL_MAR_TOP : sName = "MetaPropCellMarTop"; break;
- case META_PROP_CELL_MAR_BOTTOM : sName = "MetaPropCellMarBottom"; break;
- case META_PROP_CELL_MAR_LEFT : sName = "MetaPropCellMarLeft"; break;
- case META_PROP_CELL_MAR_RIGHT : sName = "MetaPropCellMarRight"; break;
- case PROP_START_AT : sName = "StartAt"; break;
- case PROP_ADD_PARA_TABLE_SPACING : sName = "AddParaTableSpacing"; break;
- case PROP_CHAR_PROP_HEIGHT : sName = "CharPropHeight"; break;
- case PROP_CHAR_PROP_HEIGHT_ASIAN : sName = "CharPropHeightAsian"; break;
- case PROP_CHAR_PROP_HEIGHT_COMPLEX: sName = "CharPropHeightComplex"; break;
- case PROP_FORMAT : sName = "Format"; break;
- case PROP_INSERT : sName = "Insert"; break;
- case PROP_DELETE : sName = "Delete"; break;
- case PROP_PARAGRAPH_FORMAT : sName = "ParagraphFormat"; break;
- case PROP_STREAM_NAME: sName = "StreamName"; break;
- case PROP_BITMAP : sName = "Bitmap"; break;
- case PROP_IS_DATE : sName = "IsDate"; break;
- case PROP_TAB_STOP_DISTANCE : sName = "TabStopDistance"; break;
- case PROP_INDENT_AT : sName = "IndentAt"; break;
- case PROP_FIRST_LINE_INDENT : sName = "FirstLineIndent"; break;
- case PROP_NUMBERING_STYLE_NAME : sName = "NumberingStyleName"; break;
- case PROP_OUTLINE_LEVEL : sName = "OutlineLevel"; break;
- case PROP_LISTTAB_STOP_POSITION : sName = "ListtabStopPosition"; break;
- case PROP_POSITION_AND_SPACE_MODE : sName = "PositionAndSpaceMode"; break;
- case PROP_PARA_SPLIT: sName = "ParaSplit"; break;
- case PROP_HELP: sName = "Help"; break;
- case PROP_HEADING_STYLE_NAME: sName = "HeadingStyleName"; break;
- case PROP_FRM_DIRECTION: sName = "FRMDirection"; break;
- case PROP_EMBEDDED_OBJECT : sName = "EmbeddedObject"; break;
- case PROP_IS_VISIBLE: sName = "IsVisible"; break;
- case PROP_PAGE_STYLE_LAYOUT: sName = "PageStyleLayout"; break;
- case PROP_Z_ORDER: sName = "ZOrder"; break;
- case PROP_EMBED_FONTS: sName = "EmbedFonts"; break;
- case PROP_EMBED_SYSTEM_FONTS: sName = "EmbedSystemFonts"; break;
- case PROP_SHADOW_FORMAT: sName = "ShadowFormat"; break;
- case PROP_RELATIVE_WIDTH: sName = "RelativeWidth"; break;
- case PROP_IS_WIDTH_RELATIVE: sName = "IsWidthRelative"; break;
- case PROP_GRAPHIC_URL: sName = "GraphicURL"; break;
- case PROP_GRAPHIC_BITMAP: sName = "GraphicBitmap"; break;
- case PROP_CHAR_SHADING_VALUE: sName = "CharShadingValue"; break;
- case PROP_CHAR_SHADING_MARKER: sName = "CharShadingMarker"; break;
- case PROP_LABEL_CATEGORY: sName = "LabelCategory"; break;
- case PROP_FIRST_IS_SHARED : sName = "FirstIsShared"; break;
- case PROP_MIRROR_INDENTS : sName = "MirrorIndents"; break;
- case PROP_SURROUND_TEXT_WRAP_SMALL: sName = "SurroundTextWrapSmall"; break;
- case PROP_PARA_SHADOW_FORMAT: sName = "ParaShadowFormat"; break;
- case PROP_FOOTNOTE_LINE_RELATIVE_WIDTH: sName = "FootnoteLineRelativeWidth"; break;
- case PROP_TBL_HEADER: sName = "TblHeader"; break;
- case PROP_CHAR_THEME_NAME_ASCII : sName = "CharThemeNameAscii"; break;
- case PROP_CHAR_THEME_NAME_CS : sName = "CharThemeNameCs"; break;
- case PROP_CHAR_THEME_NAME_H_ANSI : sName = "CharThemeNameHAnsi"; break;
- case PROP_CHAR_THEME_NAME_EAST_ASIA : sName = "CharThemeNameEastAsia"; break;
- case PROP_CHAR_THEME_FONT_NAME_ASCII : sName = "CharThemeFontNameAscii"; break;
- case PROP_CHAR_THEME_FONT_NAME_CS : sName = "CharThemeFontNameCs"; break;
- case PROP_CHAR_THEME_FONT_NAME_H_ANSI : sName = "CharThemeFontNameHAnsi"; break;
- case PROP_CHAR_THEME_FONT_NAME_EAST_ASIA: sName = "CharThemeFontNameEastAsia"; break;
- case PROP_CHAR_THEME_COLOR : sName = "CharThemeColor"; break;
- case PROP_CHAR_THEME_ORIGINAL_COLOR : sName = "CharThemeOriginalColor"; break;
- case PROP_CHAR_THEME_COLOR_SHADE : sName = "CharThemeColorShade"; break;
- case PROP_CHAR_THEME_FILL : sName = "CharThemeFill"; break;
- case PROP_HORIZONTAL_MERGE: sName = "HorizontalMerge"; break;
- case PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS : sName = "HideTabLeaderAndPageNumber" ; break ;
- case PROP_TAB_IN_TOC : sName = "TabInTOC"; break ;
- case PROP_TOC_BOOKMARK: sName = "TOCBookmark"; break;
- case PROP_TOC_NEW_LINE: sName = "TOCNewLine"; break;
- case PROP_TOC_PARAGRAPH_OUTLINE_LEVEL : sName = "TOCParagraphOutlineLevel"; break;
- case PROP_CHAR_THEME_COLOR_TINT : sName = "CharThemeColorTint"; break;
- case PROP_CHAR_GLOW_TEXT_EFFECT : sName = "CharGlowTextEffect"; break;
- case PROP_CHAR_SHADOW_TEXT_EFFECT : sName = "CharShadowTextEffect"; break;
- case PROP_CHAR_REFLECTION_TEXT_EFFECT : sName = "CharReflectionTextEffect"; break;
- case PROP_CHAR_TEXTOUTLINE_TEXT_EFFECT : sName = "CharTextOutlineTextEffect"; break;
- case PROP_CHAR_TEXTFILL_TEXT_EFFECT : sName = "CharTextFillTextEffect"; break;
- case PROP_CHAR_SCENE3D_TEXT_EFFECT : sName = "CharScene3DTextEffect"; break;
- case PROP_CHAR_PROPS3D_TEXT_EFFECT : sName = "CharProps3DTextEffect"; break;
- case PROP_CHAR_LIGATURES_TEXT_EFFECT : sName = "CharLigaturesTextEffect"; break;
- case PROP_CHAR_NUMFORM_TEXT_EFFECT : sName = "CharNumFormTextEffect"; break;
- case PROP_CHAR_NUMSPACING_TEXT_EFFECT : sName = "CharNumSpacingTextEffect"; break;
- case PROP_CHAR_STYLISTICSETS_TEXT_EFFECT : sName = "CharStylisticSetsTextEffect"; break;
- case PROP_CHAR_CNTXTALTS_TEXT_EFFECT : sName = "CharCntxtAltsTextEffect"; break;
- case PROP_SDTPR : sName = "SdtPr"; break;
- case PROP_INDEX_ENTRY_TYPE : sName = "IndexEntryType"; break;
- case PROP_CELL_INTEROP_GRAB_BAG : sName = "CellInteropGrabBag"; break;
- case PROP_TABLE_INTEROP_GRAB_BAG : sName = "TableInteropGrabBag"; break;
- case PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING : sName = "ApplyParagraphMarkFormatToNumbering"; break;
- case PROP_CELL_DIRECTION: sName = "CellDirection"; break;
- case PROP_SDT_END_BEFORE: sName = "SdtEndBefore"; break;
- case PROP_PARA_SDT_END_BEFORE: sName = "ParaSdtEndBefore"; break;
- case META_PROP_TABLE_LOOK: sName = "TableStyleLook"; break;
- case PROP_PARA_CNF_STYLE: sName = "ParaCnfStyle"; break;
- case PROP_CELL_CNF_STYLE: sName = "CellCnfStyle"; break;
- case PROP_ROW_CNF_STYLE: sName = "RowCnfStyle"; break;
- case PROP_CELL_HIDE_MARK: sName = "CellHideMark"; break;
- case PROP_FOLLOW_TEXT_FLOW: sName = "IsFollowingTextFlow"; break;
- case PROP_FILL_STYLE: sName = "FillStyle"; break;
- case PROP_FILL_COLOR: sName = "FillColor"; break;
- case PROP_SNAP_TO_GRID: sName = "SnapToGrid"; break;
- case PROP_GRID_SNAP_TO_CHARS: sName = "GridSnapToChars"; break;
- }
- ::std::pair<PropertyNameMap_t::iterator,bool> aInsertIt =
- m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName ));
- if(aInsertIt.second)
- aIt = aInsertIt.first;
+ OUString sName;
+ switch(eId) {
+ case PROP_CHAR_WEIGHT: sName = "CharWeight"; break;
+ case PROP_CHAR_POSTURE: sName = "CharPosture"; break;
+ case PROP_CHAR_STRIKEOUT: sName = "CharStrikeout"; break;
+ case PROP_CHAR_CONTOURED: sName = "CharContoured"; break;
+ case PROP_CHAR_SHADOWED: sName = "CharShadowed"; break;
+ case PROP_CHAR_CASE_MAP: sName = "CharCaseMap"; break;
+ case PROP_CHAR_COLOR: sName = "CharColor"; break;
+ case PROP_CHAR_RELIEF: sName = "CharRelief"; break;
+ case PROP_CHAR_UNDERLINE: sName = "CharUnderline"; break;
+ case PROP_CHAR_UNDERLINE_COLOR: sName = "CharUnderlineColor"; break;
+ case PROP_CHAR_UNDERLINE_HAS_COLOR: sName = "CharUnderlineHasColor"; break;
+ case PROP_CHAR_WORD_MODE: sName = "CharWordMode"; break;
+ case PROP_CHAR_ESCAPEMENT : sName = "CharEscapement"; break;
+ case PROP_CHAR_ESCAPEMENT_HEIGHT: sName = "CharEscapementHeight"; break;
+ case PROP_CHAR_HEIGHT: sName = "CharHeight"; break;
+ case PROP_CHAR_HEIGHT_COMPLEX: sName = "CharHeightComplex"; break;
+ case PROP_CHAR_LOCALE: sName = "CharLocale"; break;
+ case PROP_CHAR_LOCALE_ASIAN: sName = "CharLocaleAsian"; break;
+ case PROP_CHAR_LOCALE_COMPLEX: sName = "CharLocaleComplex"; break;
+ case PROP_CHAR_WEIGHT_COMPLEX : sName = "CharWeightComplex"; break;
+ case PROP_CHAR_POSTURE_COMPLEX: sName = "CharPostureComplex"; break;
+ case PROP_CHAR_CHAR_KERNING: sName = "CharKerning"; break;
+ case PROP_CHAR_AUTO_KERNING: sName = "CharAutoKerning"; break;
+ case PROP_CHAR_SCALE_WIDTH: sName = "CharScaleWidth"; break;
+ case PROP_CHAR_STYLE_NAME: sName = "CharStyleName"; break;
+ case PROP_CHAR_FONT_NAME: sName = "CharFontName"; break;
+ case PROP_CHAR_FONT_STYLE: sName = "CharFontStyle"; break;
+ case PROP_CHAR_FONT_FAMILY: sName = "CharFontFamily"; break;
+ case PROP_CHAR_FONT_CHAR_SET: sName = "CharFontCharSet"; break;
+ case PROP_CHAR_FONT_PITCH: sName = "CharFontPitch"; break;
+ case PROP_CHAR_FONT_NAME_ASIAN : sName = "CharFontNameAsian"; break;
+ case PROP_CHAR_HEIGHT_ASIAN : sName = "CharHeightAsian"; break;
+ case PROP_CHAR_FONT_STYLE_ASIAN : sName = "CharFontStyleAsian"; break;
+ case PROP_CHAR_FONT_FAMILY_ASIAN : sName = "CharFontFamilyAsian"; break;
+ case PROP_CHAR_FONT_CHAR_SET_ASIAN : sName = "CharFontCharSetAsian"; break;
+ case PROP_CHAR_FONT_PITCH_ASIAN : sName = "CharFontPitchAsian"; break;
+ case PROP_CHAR_FONT_NAME_COMPLEX : sName = "CharFontNameComplex"; break;
+ case PROP_CHAR_FONT_STYLE_COMPLEX : sName = "CharFontStyleComplex"; break;
+ case PROP_CHAR_FONT_FAMILY_COMPLEX: sName = "CharFontFamilyComplex"; break;
+ case PROP_CHAR_FONT_CHAR_SET_COMPLEX: sName = "CharFontCharSetComplex"; break;
+ case PROP_CHAR_FONT_PITCH_COMPLEX: sName = "CharFontPitchComplex"; break;
+ case PROP_CHAR_HIDDEN : sName = "CharHidden"; break;
+ case PROP_CHAR_WEIGHT_ASIAN : sName = "CharWeightAsian"; break;
+ case PROP_CHAR_POSTURE_ASIAN : sName = "CharPostureAsian"; break;
+ case PROP_CHAR_BACK_COLOR: sName = "CharBackColor"; break;
+ case PROP_CHAR_EMPHASIS: sName = "CharEmphasis"; break;
+ case PROP_CHAR_COMBINE_IS_ON: sName = "CharCombineIsOn"; break;
+ case PROP_CHAR_COMBINE_PREFIX: sName = "CharCombinePrefix"; break;
+ case PROP_CHAR_COMBINE_SUFFIX: sName = "CharCombineSuffix"; break;
+ case PROP_CHAR_ROTATION: sName = "CharRotation"; break;
+ case PROP_CHAR_ROTATION_IS_FIT_TO_LINE: sName = "CharRotationIsFitToLine"; break;
+ case PROP_CHAR_FLASH: sName = "CharFlash"; break;
+ case PROP_CHAR_LEFT_BORDER: sName = "CharLeftBorder";break;
+ case PROP_CHAR_RIGHT_BORDER: sName = "CharRightBorder";break;
+ case PROP_CHAR_TOP_BORDER: sName = "CharTopBorder";break;
+ case PROP_CHAR_BOTTOM_BORDER: sName = "CharBottomBorder";break;
+ case PROP_CHAR_LEFT_BORDER_DISTANCE: sName = "CharLeftBorderDistance"; break;
+ case PROP_CHAR_RIGHT_BORDER_DISTANCE: sName = "CharRightBorderDistance"; break;
+ case PROP_CHAR_TOP_BORDER_DISTANCE: sName = "CharTopBorderDistance";break;
+ case PROP_CHAR_BOTTOM_BORDER_DISTANCE: sName = "CharBottomBorderDistance"; break;
+ case PROP_CHAR_SHADOW_FORMAT: sName = "CharShadowFormat"; break;
+ case PROP_CHAR_HIGHLIGHT: sName = "CharHighlight"; break;
+ case PROP_PARA_STYLE_NAME: sName = "ParaStyleName"; break;
+ case PROP_PARA_ADJUST: sName = "ParaAdjust"; break;
+ case PROP_PARA_VERT_ALIGNMENT: sName = "ParaVertAlignment"; break;
+ case PROP_PARA_LAST_LINE_ADJUST: sName = "ParaLastLineAdjust"; break;
+ case PROP_PARA_RIGHT_MARGIN : sName = "ParaRightMargin"; break;
+ case PROP_PARA_LEFT_MARGIN : sName = "ParaLeftMargin"; break;
+ case PROP_PARA_FIRST_LINE_INDENT: sName = "ParaFirstLineIndent"; break;
+ case PROP_PARA_KEEP_TOGETHER: sName = "ParaKeepTogether"; break;
+ case PROP_PARA_TOP_MARGIN: sName = "ParaTopMargin"; break;
+ case PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING: sName = "ParaTopMarginBeforeAutoSpacing"; break;
+ case PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING: sName = "ParaBottomMarginAfterAutoSpacing"; break;
+ case PROP_PARA_CONTEXT_MARGIN: sName = "ParaContextMargin"; break;
+ case PROP_PARA_BOTTOM_MARGIN: sName = "ParaBottomMargin"; break;
+ case PROP_PARA_IS_HYPHENATION: sName = "ParaIsHyphenation"; break;
+ case PROP_PARA_LINE_NUMBER_COUNT: sName = "ParaLineNumberCount"; break;
+ case PROP_PARA_IS_HANGING_PUNCTUATION: sName = "ParaIsHangingPunctuation"; break;
+ case PROP_PARA_LINE_SPACING: sName = "ParaLineSpacing"; break;
+ case PROP_PARA_TAB_STOPS: sName = "ParaTabStops"; break;
+ case PROP_PARA_WIDOWS: sName = "ParaWidows"; break;
+ case PROP_PARA_ORPHANS: sName = "ParaOrphans"; break;
+ case PROP_PARA_LINE_NUMBER_START_VALUE: sName = "ParaLineNumberStartValue"; break;
+ case PROP_NUMBERING_LEVEL: sName = "NumberingLevel"; break;
+ case PROP_NUMBERING_RULES: sName = "NumberingRules"; break;
+ case PROP_NUMBERING_TYPE: sName = "NumberingType"; break;
+ case PROP_START_WITH: sName = "StartWith"; break;
+ case PROP_ADJUST: sName = "Adjust"; break;
+ case PROP_PARENT_NUMBERING: sName = "ParentNumbering"; break;
+ case PROP_RIGHT_MARGIN : sName = "RightMargin"; break;
+ case PROP_LEFT_MARGIN : sName = "LeftMargin"; break;
+ case PROP_TOP_MARGIN : sName = "TopMargin"; break;
+ case PROP_BOTTOM_MARGIN : sName = "BottomMargin"; break;
+ case PROP_FIRST_LINE_OFFSET: sName = "FirstLineOffset"; break;
+ case PROP_LEFT_BORDER : sName = "LeftBorder";break;
+ case PROP_RIGHT_BORDER : sName = "RightBorder";break;
+ case PROP_TOP_BORDER : sName = "TopBorder";break;
+ case PROP_BOTTOM_BORDER : sName = "BottomBorder";break;
+ case PROP_TABLE_BORDER : sName = "TableBorder";break;
+ case PROP_TABLE_ROW_DELETE : sName = "TableRowDelete"; break;
+ case PROP_TABLE_ROW_INSERT : sName = "TableRowInsert"; break;
+ case PROP_TABLE_CELL_DELETE : sName = "TableCellDelete"; break;
+ case PROP_TABLE_CELL_INSERT : sName = "TableCellInsert"; break;
+ case PROP_LEFT_BORDER_DISTANCE : sName = "LeftBorderDistance"; break;
+ case PROP_RIGHT_BORDER_DISTANCE : sName = "RightBorderDistance"; break;
+ case PROP_TOP_BORDER_DISTANCE : sName = "TopBorderDistance";break;
+ case PROP_BOTTOM_BORDER_DISTANCE: sName = "BottomBorderDistance"; break;
+ case PROP_CURRENT_PRESENTATION : sName = "CurrentPresentation"; break;
+ case PROP_IS_FIXED : sName = "IsFixed"; break;
+ case PROP_SUB_TYPE : sName = "SubType"; break;
+ case PROP_FILE_FORMAT : sName = "FileFormat"; break;
+ case PROP_HYPER_LINK_U_R_L : sName = "HyperLinkURL"; break;
+ case PROP_NUMBER_FORMAT : sName = "NumberFormat"; break;
+ case PROP_NAME : sName = "Name"; break;
+ case PROP_IS_INPUT : sName = "IsInput"; break;
+ case PROP_HINT : sName = "Hint"; break;
+ case PROP_FULL_NAME : sName = "FullName"; break;
+ case PROP_KEYWORDS : sName = "Keywords"; break;
+ case PROP_DESCRIPTION : sName = "Description"; break;
+ case PROP_MACRO_NAME : sName = "MacroName"; break;
+ case PROP_SUBJECT : sName = "Subject"; break;
+ case PROP_USER_DATA_TYPE : sName = "UserDataType"; break;
+ case PROP_TITLE : sName = "Title"; break;
+ case PROP_CONTENT : sName = "Content"; break;
+ case PROP_DATA_COLUMN_NAME : sName = "DataColumnName"; break;
+ case PROP_INPUT_STREAM : sName = "InputStream"; break;
+ case PROP_GRAPHIC : sName = "Graphic"; break;
+ case PROP_ANCHOR_TYPE : sName = "AnchorType"; break;
+ case PROP_SIZE : sName = "Size"; break;
+ case PROP_HORI_ORIENT : sName = "HoriOrient"; break;
+ case PROP_HORI_ORIENT_POSITION : sName = "HoriOrientPosition"; break;
+ case PROP_HORI_ORIENT_RELATION : sName = "HoriOrientRelation"; break;
+ case PROP_VERT_ORIENT : sName = "VertOrient"; break;
+ case PROP_VERT_ORIENT_POSITION : sName = "VertOrientPosition"; break;
+ case PROP_VERT_ORIENT_RELATION : sName = "VertOrientRelation"; break;
+ case PROP_GRAPHIC_CROP : sName = "GraphicCrop"; break;
+ case PROP_SIZE100th_M_M : sName = "Size100thMM"; break;
+ case PROP_SIZE_PIXEL : sName = "SizePixel"; break;
+ case PROP_SURROUND : sName = "Surround"; break;
+ case PROP_SURROUND_CONTOUR : sName = "SurroundContour"; break;
+ case PROP_ADJUST_CONTRAST : sName = "AdjustContrast"; break;
+ case PROP_ADJUST_LUMINANCE : sName = "AdjustLuminance"; break;
+ case PROP_GRAPHIC_COLOR_MODE : sName = "GraphicColorMode"; break;
+ case PROP_GAMMA : sName = "Gamma"; break;
+ case PROP_HORI_MIRRORED_ON_EVEN_PAGES: sName = "HoriMirroredOnEvenPages"; break;
+ case PROP_HORI_MIRRORED_ON_ODD_PAGES : sName = "HoriMirroredOnOddPages"; break;
+ case PROP_VERT_MIRRORED : sName = "VertMirrored"; break;
+ case PROP_CONTOUR_OUTSIDE : sName = "ContourOutside"; break;
+ case PROP_CONTOUR_POLY_POLYGON : sName = "ContourPolyPolygon"; break;
+ case PROP_PAGE_TOGGLE : sName = "PageToggle"; break;
+ case PROP_BACK_COLOR : sName = "BackColor"; break;
+ case PROP_BACK_COLOR_TRANSPARENCY: sName = "BackColorTransparency"; break;
+ case PROP_ALTERNATIVE_TEXT : sName = "AlternativeText"; break;
+ case PROP_HEADER_TEXT_LEFT : sName = "HeaderTextLeft"; break;
+ case PROP_HEADER_TEXT : sName = "HeaderText"; break;
+ case PROP_HEADER_IS_SHARED : sName = "HeaderIsShared"; break;
+ case PROP_HEADER_IS_ON : sName = "HeaderIsOn"; break;
+ case PROP_FOOTER_TEXT_LEFT : sName = "FooterTextLeft"; break;
+ case PROP_FOOTER_TEXT : sName = "FooterText"; break;
+ case PROP_FOOTER_IS_SHARED : sName = "FooterIsShared"; break;
+ case PROP_FOOTER_IS_ON : sName = "FooterIsOn"; break;
+ case PROP_FOOTNOTE_COUNTING : sName = "FootnoteCounting"; break;
+ case PROP_WIDTH : sName = "Width"; break;
+ case PROP_HEIGHT : sName = "Height"; break;
+ case PROP_SEPARATOR_LINE_IS_ON : sName = "SeparatorLineIsOn"; break;
+ case PROP_TEXT_COLUMNS : sName = "TextColumns"; break;
+ case PROP_AUTOMATIC_DISTANCE : sName = "AutomaticDistance"; break;
+ case PROP_IS_LANDSCAPE : sName = "IsLandscape"; break;
+ case PROP_PRINTER_PAPER_TRAY_INDEX: sName = "PrinterPaperTrayIndex"; break;
+ case PROP_FIRST_PAGE : sName = "First Page"; break;
+ case PROP_DEFAULT : sName = "Default"; break;
+ case PROP_PAGE_DESC_NAME : sName = "PageDescName"; break;
+ case PROP_PAGE_NUMBER_OFFSET: sName = "PageNumberOffset"; break;
+ case PROP_BREAK_TYPE : sName = "BreakType"; break;
+ case PROP_FOOTER_IS_DYNAMIC_HEIGHT: sName = "FooterIsDynamicHeight"; break;
+ case PROP_FOOTER_DYNAMIC_SPACING: sName = "FooterDynamicSpacing"; break;
+ case PROP_FOOTER_HEIGHT : sName = "FooterHeight"; break;
+ case PROP_FOOTER_BODY_DISTANCE : sName = "FooterBodyDistance"; break;
+ case PROP_HEADER_IS_DYNAMIC_HEIGHT: sName = "HeaderIsDynamicHeight"; break;
+ case PROP_HEADER_DYNAMIC_SPACING: sName = "HeaderDynamicSpacing"; break;
+ case PROP_HEADER_HEIGHT : sName = "HeaderHeight"; break;
+ case PROP_HEADER_BODY_DISTANCE : sName = "HeaderBodyDistance"; break;
+ case PROP_WRITING_MODE : sName = "WritingMode"; break;
+ case PROP_GRID_MODE : sName = "GridMode"; break;
+ case PROP_GRID_DISPLAY : sName = "GridDisplay"; break;
+ case PROP_GRID_PRINT : sName = "GridPrint"; break;
+ case PROP_ADD_EXTERNAL_LEADING : sName = "AddExternalLeading"; break;
+ case PROP_GRID_LINES : sName = "GridLines"; break;
+ case PROP_GRID_BASE_HEIGHT : sName = "GridBaseHeight"; break;
+ case PROP_GRID_RUBY_HEIGHT : sName = "GridRubyHeight"; break;
+ case PROP_GRID_STANDARD_MODE : sName = "StandardPageMode"; break;
+ case PROP_IS_ON : sName = "IsOn"; break;
+ case PROP_RESTART_AT_EACH_PAGE : sName = "RestartAtEachPage"; break;
+ case PROP_COUNT_EMPTY_LINES : sName = "CountEmptyLines"; break;
+ case PROP_COUNT_LINES_IN_FRAMES : sName = "CountLinesInFrames"; break;
+ case PROP_INTERVAL : sName = "Interval"; break;
+ case PROP_DISTANCE : sName = "Distance"; break;
+ case PROP_NUMBER_POSITION : sName = "NumberPosition"; break;
+ case PROP_LEVEL : sName = "Level"; break;
+ case PROP_LEVEL_FOLLOW : sName = "LabelFollowedBy"; break;
+ case PROP_LEVEL_PARAGRAPH_STYLES : sName = "LevelParagraphStyles"; break;
+ case PROP_LEVEL_FORMAT : sName = "LevelFormat"; break;
+ case PROP_TOKEN_TYPE : sName = "TokenType"; break;
+ case PROP_TOKEN_HYPERLINK_START : sName = "TokenHyperlinkStart"; break;
+ case PROP_TOKEN_HYPERLINK_END : sName = "TokenHyperlinkEnd"; break;
+ case PROP_TOKEN_CHAPTER_INFO : sName = "TokenChapterInfo"; break;
+ case PROP_CHAPTER_FORMAT : sName = "ChapterFormat"; break;
+ case PROP_TOKEN_TEXT : sName = "TokenText"; break;
+ case PROP_TEXT : sName = "Text"; break;
+ case PROP_CREATE_FROM_OUTLINE : sName = "CreateFromOutline"; break;
+ case PROP_CREATE_FROM_MARKS : sName = "CreateFromMarks"; break;
+ case PROP_STANDARD : sName = "Standard"; break;
+ case PROP_IS_SPLIT_ALLOWED : sName = "IsSplitAllowed"; break;
+ case META_PROP_VERTICAL_BORDER : sName = "VerticalBorder"; break;
+ case META_PROP_HORIZONTAL_BORDER : sName = "HorizontalBorder"; break;
+ case PROP_HEADER_ROW_COUNT : sName = "HeaderRowCount"; break;
+ case PROP_IS_AUTO_HEIGHT : sName = "IsAutoHeight"; break;
+ case PROP_SIZE_TYPE : sName = "SizeType"; break;
+ case PROP_TABLE_COLUMN_SEPARATORS: sName = "TableColumnSeparators"; break;
+ case META_PROP_TABLE_STYLE_NAME : sName = "TableStyleName"; break;
+ case PROP_TABLE_REDLINE_PARAMS : sName = "TableRedlineParams"; break;
+ case PROP_TABLE_REDLINE_AUTHOR : sName = "TableRedlineAuthor"; break;
+ case PROP_TABLE_REDLINE_DATE : sName = "TableRedlineDate"; break;
+ case PROP_TABLE_REDLINE_ID : sName = "TableRedlineID"; break;
+ case PROP_TABLE_REDLINE_TOKEN : sName = "TableRedlineToken"; break;
+ case PROP_REDLINE_AUTHOR : sName = "RedlineAuthor"; break;
+ case PROP_REDLINE_DATE_TIME : sName = "RedlineDateTime"; break;
+ case PROP_REDLINE_COMMENT : sName = "RedlineComment"; break;
+ case PROP_REDLINE_TYPE : sName = "RedlineType"; break;
+ case PROP_REDLINE_TOKEN : sName = "RedlineToken"; break;
+ case PROP_REDLINE_REVERT_PROPERTIES: sName = "RedlineRevertProperties"; break;
+ case PROP_REDLINE_SUCCESSOR_DATA: sName = "RedlineSuccessorData"; break;
+ case PROP_REDLINE_IDENTIFIER : sName = "RedlineIdentifier"; break;
+ case PROP_SIZE_PROTECTED : sName = "SizeProtected"; break;
+ case PROP_POSITION_PROTECTED : sName = "PositionProtected"; break;
+ case PROP_OPAQUE : sName = "Opaque"; break;
+ case PROP_VERTICAL_MERGE : sName = "VerticalMerge"; break;
+ case PROP_BULLET_CHAR : sName = "BulletChar"; break;
+ case PROP_BULLET_FONT_NAME : sName = "BulletFontName"; break;
+ case PROP_PARA_BACK_COLOR : sName = "ParaBackColor"; break;
+ case PROP_TABS_RELATIVE_TO_INDENT: sName = "TabsRelativeToIndent"; break;
+ case PROP_PREFIX : sName = "Prefix"; break;
+ case PROP_SUFFIX : sName = "Suffix"; break;
+ case PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES: sName = "CreateFromLevelParagraphStyles"; break;
+ case PROP_DROP_CAP_FORMAT : sName = "DropCapFormat"; break;
+ case PROP_REFERENCE_FIELD_PART : sName = "ReferenceFieldPart"; break;
+ case PROP_SOURCE_NAME: sName = "SourceName"; break;
+ case PROP_REFERENCE_FIELD_SOURCE : sName = "ReferenceFieldSource"; break;
+ case PROP_WIDTH_TYPE : sName = "WidthType"; break;
+ case PROP_TBL_LOOK : sName = "TblLook"; break;
+ case PROP_TEXT_RANGE: sName = "TextRange"; break;
+ case PROP_SERVICE_CHAR_STYLE : sName = "com.sun.star.style.CharacterStyle"; break;
+ case PROP_SERVICE_PARA_STYLE : sName = "com.sun.star.style.ParagraphStyle"; break;
+ case PROP_CHARACTER_STYLES : sName = "CharacterStyles"; break;
+ case PROP_PARAGRAPH_STYLES : sName = "ParagraphStyles"; break;
+ case PROP_PARAGRAPH_STYLE_NAME : sName = "ParagraphStyleName"; break;
+ case PROP_TABLE_BORDER_DISTANCES: sName = "TableBorderDistances"; break;
+ case META_PROP_CELL_MAR_TOP : sName = "MetaPropCellMarTop"; break;
+ case META_PROP_CELL_MAR_BOTTOM : sName = "MetaPropCellMarBottom"; break;
+ case META_PROP_CELL_MAR_LEFT : sName = "MetaPropCellMarLeft"; break;
+ case META_PROP_CELL_MAR_RIGHT : sName = "MetaPropCellMarRight"; break;
+ case PROP_START_AT : sName = "StartAt"; break;
+ case PROP_ADD_PARA_TABLE_SPACING : sName = "AddParaTableSpacing"; break;
+ case PROP_CHAR_PROP_HEIGHT : sName = "CharPropHeight"; break;
+ case PROP_CHAR_PROP_HEIGHT_ASIAN : sName = "CharPropHeightAsian"; break;
+ case PROP_CHAR_PROP_HEIGHT_COMPLEX: sName = "CharPropHeightComplex"; break;
+ case PROP_FORMAT : sName = "Format"; break;
+ case PROP_INSERT : sName = "Insert"; break;
+ case PROP_DELETE : sName = "Delete"; break;
+ case PROP_PARAGRAPH_FORMAT : sName = "ParagraphFormat"; break;
+ case PROP_STREAM_NAME: sName = "StreamName"; break;
+ case PROP_BITMAP : sName = "Bitmap"; break;
+ case PROP_IS_DATE : sName = "IsDate"; break;
+ case PROP_TAB_STOP_DISTANCE : sName = "TabStopDistance"; break;
+ case PROP_INDENT_AT : sName = "IndentAt"; break;
+ case PROP_FIRST_LINE_INDENT : sName = "FirstLineIndent"; break;
+ case PROP_NUMBERING_STYLE_NAME : sName = "NumberingStyleName"; break;
+ case PROP_OUTLINE_LEVEL : sName = "OutlineLevel"; break;
+ case PROP_LISTTAB_STOP_POSITION : sName = "ListtabStopPosition"; break;
+ case PROP_POSITION_AND_SPACE_MODE : sName = "PositionAndSpaceMode"; break;
+ case PROP_PARA_SPLIT: sName = "ParaSplit"; break;
+ case PROP_HELP: sName = "Help"; break;
+ case PROP_HEADING_STYLE_NAME: sName = "HeadingStyleName"; break;
+ case PROP_FRM_DIRECTION: sName = "FRMDirection"; break;
+ case PROP_EMBEDDED_OBJECT : sName = "EmbeddedObject"; break;
+ case PROP_IS_VISIBLE: sName = "IsVisible"; break;
+ case PROP_PAGE_STYLE_LAYOUT: sName = "PageStyleLayout"; break;
+ case PROP_Z_ORDER: sName = "ZOrder"; break;
+ case PROP_EMBED_FONTS: sName = "EmbedFonts"; break;
+ case PROP_EMBED_SYSTEM_FONTS: sName = "EmbedSystemFonts"; break;
+ case PROP_SHADOW_FORMAT: sName = "ShadowFormat"; break;
+ case PROP_RELATIVE_WIDTH: sName = "RelativeWidth"; break;
+ case PROP_IS_WIDTH_RELATIVE: sName = "IsWidthRelative"; break;
+ case PROP_GRAPHIC_URL: sName = "GraphicURL"; break;
+ case PROP_GRAPHIC_BITMAP: sName = "GraphicBitmap"; break;
+ case PROP_CHAR_SHADING_VALUE: sName = "CharShadingValue"; break;
+ case PROP_CHAR_SHADING_MARKER: sName = "CharShadingMarker"; break;
+ case PROP_LABEL_CATEGORY: sName = "LabelCategory"; break;
+ case PROP_FIRST_IS_SHARED : sName = "FirstIsShared"; break;
+ case PROP_MIRROR_INDENTS : sName = "MirrorIndents"; break;
+ case PROP_SURROUND_TEXT_WRAP_SMALL: sName = "SurroundTextWrapSmall"; break;
+ case PROP_PARA_SHADOW_FORMAT: sName = "ParaShadowFormat"; break;
+ case PROP_FOOTNOTE_LINE_RELATIVE_WIDTH: sName = "FootnoteLineRelativeWidth"; break;
+ case PROP_TBL_HEADER: sName = "TblHeader"; break;
+ case PROP_CHAR_THEME_NAME_ASCII : sName = "CharThemeNameAscii"; break;
+ case PROP_CHAR_THEME_NAME_CS : sName = "CharThemeNameCs"; break;
+ case PROP_CHAR_THEME_NAME_H_ANSI : sName = "CharThemeNameHAnsi"; break;
+ case PROP_CHAR_THEME_NAME_EAST_ASIA : sName = "CharThemeNameEastAsia"; break;
+ case PROP_CHAR_THEME_FONT_NAME_ASCII : sName = "CharThemeFontNameAscii"; break;
+ case PROP_CHAR_THEME_FONT_NAME_CS : sName = "CharThemeFontNameCs"; break;
+ case PROP_CHAR_THEME_FONT_NAME_H_ANSI : sName = "CharThemeFontNameHAnsi"; break;
+ case PROP_CHAR_THEME_FONT_NAME_EAST_ASIA: sName = "CharThemeFontNameEastAsia"; break;
+ case PROP_CHAR_THEME_COLOR : sName = "CharThemeColor"; break;
+ case PROP_CHAR_THEME_ORIGINAL_COLOR : sName = "CharThemeOriginalColor"; break;
+ case PROP_CHAR_THEME_COLOR_SHADE : sName = "CharThemeColorShade"; break;
+ case PROP_CHAR_THEME_FILL : sName = "CharThemeFill"; break;
+ case PROP_HORIZONTAL_MERGE: sName = "HorizontalMerge"; break;
+ case PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS : sName = "HideTabLeaderAndPageNumber" ; break ;
+ case PROP_TAB_IN_TOC : sName = "TabInTOC"; break ;
+ case PROP_TOC_BOOKMARK: sName = "TOCBookmark"; break;
+ case PROP_TOC_NEW_LINE: sName = "TOCNewLine"; break;
+ case PROP_TOC_PARAGRAPH_OUTLINE_LEVEL : sName = "TOCParagraphOutlineLevel"; break;
+ case PROP_CHAR_THEME_COLOR_TINT : sName = "CharThemeColorTint"; break;
+ case PROP_CHAR_GLOW_TEXT_EFFECT : sName = "CharGlowTextEffect"; break;
+ case PROP_CHAR_SHADOW_TEXT_EFFECT : sName = "CharShadowTextEffect"; break;
+ case PROP_CHAR_REFLECTION_TEXT_EFFECT : sName = "CharReflectionTextEffect"; break;
+ case PROP_CHAR_TEXTOUTLINE_TEXT_EFFECT : sName = "CharTextOutlineTextEffect"; break;
+ case PROP_CHAR_TEXTFILL_TEXT_EFFECT : sName = "CharTextFillTextEffect"; break;
+ case PROP_CHAR_SCENE3D_TEXT_EFFECT : sName = "CharScene3DTextEffect"; break;
+ case PROP_CHAR_PROPS3D_TEXT_EFFECT : sName = "CharProps3DTextEffect"; break;
+ case PROP_CHAR_LIGATURES_TEXT_EFFECT : sName = "CharLigaturesTextEffect"; break;
+ case PROP_CHAR_NUMFORM_TEXT_EFFECT : sName = "CharNumFormTextEffect"; break;
+ case PROP_CHAR_NUMSPACING_TEXT_EFFECT : sName = "CharNumSpacingTextEffect"; break;
+ case PROP_CHAR_STYLISTICSETS_TEXT_EFFECT : sName = "CharStylisticSetsTextEffect"; break;
+ case PROP_CHAR_CNTXTALTS_TEXT_EFFECT : sName = "CharCntxtAltsTextEffect"; break;
+ case PROP_SDTPR : sName = "SdtPr"; break;
+ case PROP_INDEX_ENTRY_TYPE : sName = "IndexEntryType"; break;
+ case PROP_CELL_INTEROP_GRAB_BAG : sName = "CellInteropGrabBag"; break;
+ case PROP_TABLE_INTEROP_GRAB_BAG : sName = "TableInteropGrabBag"; break;
+ case PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING : sName = "ApplyParagraphMarkFormatToNumbering"; break;
+ case PROP_CELL_DIRECTION: sName = "CellDirection"; break;
+ case PROP_SDT_END_BEFORE: sName = "SdtEndBefore"; break;
+ case PROP_PARA_SDT_END_BEFORE: sName = "ParaSdtEndBefore"; break;
+ case META_PROP_TABLE_LOOK: sName = "TableStyleLook"; break;
+ case PROP_PARA_CNF_STYLE: sName = "ParaCnfStyle"; break;
+ case PROP_CELL_CNF_STYLE: sName = "CellCnfStyle"; break;
+ case PROP_ROW_CNF_STYLE: sName = "RowCnfStyle"; break;
+ case PROP_CELL_HIDE_MARK: sName = "CellHideMark"; break;
+ case PROP_FOLLOW_TEXT_FLOW: sName = "IsFollowingTextFlow"; break;
+ case PROP_FILL_STYLE: sName = "FillStyle"; break;
+ case PROP_FILL_COLOR: sName = "FillColor"; break;
+ case PROP_SNAP_TO_GRID: sName = "SnapToGrid"; break;
+ case PROP_GRID_SNAP_TO_CHARS: sName = "GridSnapToChars"; break;
}
-
- assert(aIt != m_pImpl->aNameMap.end());
- if (aIt == m_pImpl->aNameMap.end())
- return OUString();
-
- return aIt->second;
-}
-
-namespace
-{
- class thePropertyNameSupplier : public rtl::Static<PropertyNameSupplier, PropertyNameSupplier> {};
-}
-
-PropertyNameSupplier& PropertyNameSupplier::GetPropertyNameSupplier()
-{
- return thePropertyNameSupplier::get();
+ assert(sName.getLength()>0);
+ return sName;
}
} //namespace dmapper
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index 956e6f8adf25..89feb8c03a48 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -19,8 +19,6 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYIDS_HXX
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYIDS_HXX
-#include <memory>
-
namespace writerfilter {
namespace dmapper{
enum PropertyIds
@@ -380,17 +378,10 @@ enum PropertyIds
,PROP_SNAP_TO_GRID
,PROP_GRID_SNAP_TO_CHARS
};
-struct PropertyNameSupplier_Impl;
-class PropertyNameSupplier
-{
- std::unique_ptr<PropertyNameSupplier_Impl> m_pImpl;
-public:
- PropertyNameSupplier();
- ~PropertyNameSupplier();
- OUString GetName( PropertyIds eId ) const;
- static PropertyNameSupplier& GetPropertyNameSupplier();
-};
+//Returns the UNO string equivalent to eId.
+OUString getPropertyName(PropertyIds eId);
+
} //namespace dmapper
} // namespace writerfilter
#endif
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 3a30cf3d6afe..67899d08e5a1 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -109,12 +109,11 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
sal_Int32 nCellGrabBagValue = 0;
sal_Int32 nParaGrabBagValue = 0;
sal_Int32 nCharGrabBagValue = 0;
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
MapIterator aParaStyleIter = m_vMap.find(PROP_PARA_STYLE_NAME);
if( aParaStyleIter != m_vMap.end())
{
beans::PropertyValue aValue;
- aValue.Name = rPropNameSupplier.GetName( aParaStyleIter->first );
+ aValue.Name = getPropertyName( aParaStyleIter->first );
aValue.Value = aParaStyleIter->second.getValue();
m_aValues.push_back(aValue);
}
@@ -123,7 +122,7 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
if( aCharStyleIter != m_vMap.end())
{
beans::PropertyValue aValue;
- aValue.Name = rPropNameSupplier.GetName( aCharStyleIter->first );
+ aValue.Name = getPropertyName( aCharStyleIter->first );
aValue.Value = aCharStyleIter->second.getValue();
m_aValues.push_back(aValue);
}
@@ -131,7 +130,7 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
if( aNumRuleIter != m_vMap.end())
{
beans::PropertyValue aValue;
- aValue.Name = rPropNameSupplier.GetName( aNumRuleIter->first );
+ aValue.Name = getPropertyName( aNumRuleIter->first );
aValue.Value = aNumRuleIter->second.getValue();
m_aValues.push_back(aValue);
}
@@ -144,26 +143,26 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
{
if (bCharGrabBag)
{
- pCharGrabBagValues[nCharGrabBagValue].Name = rPropNameSupplier.GetName( aMapIter->first );
+ pCharGrabBagValues[nCharGrabBagValue].Name = getPropertyName( aMapIter->first );
pCharGrabBagValues[nCharGrabBagValue].Value = aMapIter->second.getValue();
++nCharGrabBagValue;
}
}
else if ( aMapIter->second.getGrabBagType() == PARA_GRAB_BAG )
{
- pParaGrabBagValues[nParaGrabBagValue].Name = rPropNameSupplier.GetName( aMapIter->first );
+ pParaGrabBagValues[nParaGrabBagValue].Name = getPropertyName( aMapIter->first );
pParaGrabBagValues[nParaGrabBagValue].Value = aMapIter->second.getValue();
++nParaGrabBagValue;
}
else if ( aMapIter->second.getGrabBagType() == CELL_GRAB_BAG )
{
- pCellGrabBagValues[nCellGrabBagValue].Name = rPropNameSupplier.GetName( aMapIter->first );
+ pCellGrabBagValues[nCellGrabBagValue].Name = getPropertyName( aMapIter->first );
pCellGrabBagValues[nCellGrabBagValue].Value = aMapIter->second.getValue();
++nCellGrabBagValue;
}
else if ( aMapIter->second.getGrabBagType() == ROW_GRAB_BAG )
{
- pRowGrabBagValues[nRowGrabBagValue].Name = rPropNameSupplier.GetName( aMapIter->first );
+ pRowGrabBagValues[nRowGrabBagValue].Name = getPropertyName( aMapIter->first );
pRowGrabBagValues[nRowGrabBagValue].Value = aMapIter->second.getValue();
++nRowGrabBagValue;
}
@@ -182,7 +181,7 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues(bool bCharG
else
{
beans::PropertyValue aValue;
- aValue.Name = rPropNameSupplier.GetName( aMapIter->first );
+ aValue.Name = getPropertyName( aMapIter->first );
aValue.Value = aMapIter->second.getValue();
m_aValues.push_back(aValue);
}
@@ -255,8 +254,7 @@ static void lcl_AnyToTag(const uno::Any & rAny)
void PropertyMap::Insert( PropertyIds eId, const uno::Any& rAny, bool bOverwrite, GrabBagType i_GrabBagType )
{
#ifdef DEBUG_WRITERFILTER
- const OUString& rInsert = PropertyNameSupplier::
- GetPropertyNameSupplier().GetName(eId);
+ const OUString& rInsert = getPropertyName(eId);
TagLogger::getInstance().startElement("propertyMap.insert");
TagLogger::getInstance().attribute("name", rInsert);
@@ -299,13 +297,12 @@ void PropertyMap::dumpXml() const
{
TagLogger::getInstance().startElement("PropertyMap");
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
MapIterator aMapIter = m_vMap.begin();
while (aMapIter != m_vMap.end())
{
TagLogger::getInstance().startElement("property");
- TagLogger::getInstance().attribute("name", rPropNameSupplier.GetName( aMapIter->first ));
+ TagLogger::getInstance().attribute("name", getPropertyName( aMapIter->first ));
switch (aMapIter->first)
{
@@ -374,10 +371,9 @@ void PropertyMap::printProperties()
MapIterator aMapIter = m_vMap.begin();
MapIterator aEndIter = m_vMap.end();
- PropertyNameSupplier& rPropSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
for( ; aMapIter != aEndIter; ++aMapIter )
{
- SAL_INFO("writerfilter", rPropSupplier.GetName(aMapIter->first));
+ SAL_INFO("writerfilter", getPropertyName(aMapIter->first));
table::BorderLine2 aLine;
sal_Int32 nColor;
@@ -468,9 +464,8 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) :
if( m_bIsFirstSection )
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- m_sFirstPageStyleName = rPropNameSupplier.GetName( PROP_FIRST_PAGE );
- m_sFollowPageStyleName = rPropNameSupplier.GetName( PROP_STANDARD );
+ m_sFirstPageStyleName = getPropertyName( PROP_FIRST_PAGE );
+ m_sFollowPageStyleName = getPropertyName( PROP_STANDARD );
}
}
@@ -643,12 +638,11 @@ void SectionPropertyMap::ApplyBorderToPageStyles(
PROP_BOTTOM_MARGIN
};
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
for( sal_Int32 nBorder = 0; nBorder < 4; ++nBorder)
{
if( m_pBorderLines[nBorder] )
{
- const OUString sBorderName = rPropNameSupplier.GetName( aBorderIds[nBorder] );
+ const OUString sBorderName = getPropertyName( aBorderIds[nBorder] );
if (xFirst.is())
xFirst->setPropertyValue( sBorderName, uno::makeAny( *m_pBorderLines[nBorder] ));
if(xSecond.is())
@@ -672,9 +666,9 @@ void SectionPropertyMap::ApplyBorderToPageStyles(
{
table::ShadowFormat aFormat = getShadowFromBorder(*m_pBorderLines[BORDER_RIGHT]);
if (xFirst.is())
- xFirst->setPropertyValue(rPropNameSupplier.GetName(PROP_SHADOW_FORMAT), uno::makeAny(aFormat));
+ xFirst->setPropertyValue(getPropertyName(PROP_SHADOW_FORMAT), uno::makeAny(aFormat));
if (xSecond.is())
- xSecond->setPropertyValue(rPropNameSupplier.GetName(PROP_SHADOW_FORMAT), uno::makeAny(aFormat));
+ xSecond->setPropertyValue(getPropertyName(PROP_SHADOW_FORMAT), uno::makeAny(aFormat));
}
}
@@ -694,12 +688,10 @@ table::ShadowFormat PropertyMap::getShadowFromBorder(const table::BorderLine2& r
void SectionPropertyMap::SetBorderDistance( uno::Reference< beans::XPropertySet > const& xStyle,
PropertyIds eMarginId, PropertyIds eDistId, sal_Int32 nDistance, sal_Int32 nOffsetFrom, sal_uInt32 nLineWidth )
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
sal_Int32 nDist = nDistance;
if( nOffsetFrom == 1 )
{
- const OUString sMarginName = rPropNameSupplier.GetName( eMarginId );
+ const OUString sMarginName = getPropertyName( eMarginId );
uno::Any aMargin = xStyle->getPropertyValue( sMarginName );
sal_Int32 nMargin = 0;
aMargin >>= nMargin;
@@ -710,7 +702,7 @@ void SectionPropertyMap::SetBorderDistance( uno::Reference< beans::XPropertySet
// Set the distance to ( Margin - distance )
nDist = nMargin - nDistance;
}
- const OUString sBorderDistanceName = rPropNameSupplier.GetName( eDistId );
+ const OUString sBorderDistanceName = getPropertyName( eDistId );
if (xStyle.is())
xStyle->setPropertyValue( sBorderDistanceName, uno::makeAny( nDist ));
}
@@ -723,8 +715,7 @@ uno::Reference< text::XTextColumns > SectionPropertyMap::ApplyColumnProperties(
uno::Reference< text::XTextColumns > xColumns;
try
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- const OUString sTextColumns = rPropNameSupplier.GetName( PROP_TEXT_COLUMNS );
+ const OUString sTextColumns = getPropertyName( PROP_TEXT_COLUMNS );
if (xColumnContainer.is())
xColumnContainer->getPropertyValue(sTextColumns) >>= xColumns;
uno::Reference< beans::XPropertySet > xColumnPropSet( xColumns, uno::UNO_QUERY_THROW );
@@ -762,12 +753,12 @@ uno::Reference< text::XTextColumns > SectionPropertyMap::ApplyColumnProperties(
else
{
xColumns->setColumnCount( m_nColumnCount + 1 );
- xColumnPropSet->setPropertyValue( rPropNameSupplier.GetName( PROP_AUTOMATIC_DISTANCE ), uno::makeAny( m_nColumnDistance ));
+ xColumnPropSet->setPropertyValue( getPropertyName( PROP_AUTOMATIC_DISTANCE ), uno::makeAny( m_nColumnDistance ));
}
if(m_bSeparatorLineIsOn)
xColumnPropSet->setPropertyValue(
- rPropNameSupplier.GetName( PROP_SEPARATOR_LINE_IS_ON ),
+ getPropertyName( PROP_SEPARATOR_LINE_IS_ON ),
uno::makeAny( m_bSeparatorLineIsOn ));
xColumnContainer->setPropertyValue( sTextColumns, uno::makeAny( xColumns ) );
// Set the columns to be unbalanced if that compatibility option is set or this is the last section.
@@ -790,10 +781,10 @@ bool SectionPropertyMap::HasHeader(bool bFirstPage) const
{
if( bFirstPage )
m_aFirstPageStyle->getPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName(PROP_HEADER_IS_ON) ) >>= bRet;
+ getPropertyName(PROP_HEADER_IS_ON) ) >>= bRet;
else
m_aFollowPageStyle->getPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName(PROP_HEADER_IS_ON) ) >>= bRet;
+ getPropertyName(PROP_HEADER_IS_ON) ) >>= bRet;
}
return bRet;
}
@@ -805,11 +796,9 @@ bool SectionPropertyMap::HasFooter(bool bFirstPage) const
if( (bFirstPage && m_aFirstPageStyle.is()) ||( !bFirstPage && m_aFollowPageStyle.is()) )
{
if( bFirstPage )
- m_aFirstPageStyle->getPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName(PROP_FOOTER_IS_ON) ) >>= bRet;
+ m_aFirstPageStyle->getPropertyValue( getPropertyName(PROP_FOOTER_IS_ON) ) >>= bRet;
else
- m_aFollowPageStyle->getPropertyValue(
- PropertyNameSupplier::GetPropertyNameSupplier().GetName(PROP_FOOTER_IS_ON) ) >>= bRet;
+ m_aFollowPageStyle->getPropertyValue( getPropertyName(PROP_FOOTER_IS_ON) ) >>= bRet;
}
return bRet;
}
@@ -820,8 +809,6 @@ bool SectionPropertyMap::HasFooter(bool bFirstPage) const
void SectionPropertyMap::CopyHeaderFooter( uno::Reference< beans::XPropertySet > xPrevStyle,
uno::Reference< beans::XPropertySet > xStyle )
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
try {
// Loop over the Header and Footer properties to copy them
static const PropertyIds aProperties[] =
@@ -833,7 +820,7 @@ void SectionPropertyMap::CopyHeaderFooter( uno::Reference< beans::XPropertySet >
bool bHasPrevHeader = false;
bool bHasHeader = false;
- OUString sHeaderIsOn = rPropNameSupplier.GetName( PROP_HEADER_IS_ON );
+ OUString sHeaderIsOn = getPropertyName( PROP_HEADER_IS_ON );
if (xPrevStyle.is())
xPrevStyle->getPropertyValue( sHeaderIsOn ) >>= bHasPrevHeader;
if (xStyle.is())
@@ -846,7 +833,7 @@ void SectionPropertyMap::CopyHeaderFooter( uno::Reference< beans::XPropertySet >
bool bHasPrevFooter = false;
bool bHasFooter = false;
- OUString sFooterIsOn = rPropNameSupplier.GetName( PROP_FOOTER_IS_ON );
+ OUString sFooterIsOn = getPropertyName( PROP_FOOTER_IS_ON );
if (xPrevStyle.is())
xPrevStyle->getPropertyValue( sFooterIsOn ) >>= bHasPrevFooter;
if (xStyle.is())
@@ -861,7 +848,7 @@ void SectionPropertyMap::CopyHeaderFooter( uno::Reference< beans::XPropertySet >
{
bool bIsHeader = ( i < nNbProps / 2 );
PropertyIds aPropId = aProperties[i];
- OUString sName = rPropNameSupplier.GetName( aPropId );
+ OUString sName = getPropertyName( aPropId );
if ( ( bIsHeader && bCopyHeader ) || ( !bIsHeader && bCopyFooter ) )
{
@@ -1049,7 +1036,6 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
}
rPendingFloatingTables.clear();
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
if( m_nLnnMod )
{
bool bFirst = rDM_Impl.IsLineNumberingSet();
@@ -1069,7 +1055,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
//set the start value at the beginning of the document
xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW );
}
- xRangeProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_PARA_LINE_NUMBER_START_VALUE ), uno::makeAny( m_nLnnMin ));
+ xRangeProperties->setPropertyValue( getPropertyName( PROP_PARA_LINE_NUMBER_START_VALUE ), uno::makeAny( m_nLnnMin ));
}
catch( const uno::Exception& )
{
@@ -1096,7 +1082,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
{
try
{
- xRangeProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_DESC_NAME), uno::makeAny(aName));
+ xRangeProperties->setPropertyValue(getPropertyName(PROP_PAGE_DESC_NAME), uno::makeAny(aName));
uno::Reference<beans::XPropertySet> xPageStyle (rDM_Impl.GetPageStyles()->getByName(aName), uno::UNO_QUERY_THROW);
HandleMarginsHeaderFooter(rDM_Impl);
if (rDM_Impl.IsNewDoc())
@@ -1124,7 +1110,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
//set the start value at the beginning of the document
xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW );
}
- xRangeProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_BREAK_TYPE), uno::makeAny(style::BreakType_COLUMN_BEFORE));
+ xRangeProperties->setPropertyValue(getPropertyName(PROP_BREAK_TYPE), uno::makeAny(style::BreakType_COLUMN_BEFORE));
}
else
{
@@ -1133,7 +1119,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
HandleMarginsHeaderFooter(rDM_Impl);
- const OUString sTrayIndex = rPropNameSupplier.GetName( PROP_PRINTER_PAPER_TRAY_INDEX );
+ const OUString sTrayIndex = getPropertyName( PROP_PRINTER_PAPER_TRAY_INDEX );
if( m_nPaperBin >= 0 )
xFollowPageStyle->setPropertyValue( sTrayIndex, uno::makeAny( m_nPaperBin ) );
if ( rDM_Impl.GetSettingsTable()->GetMirrorMarginSettings() )
@@ -1248,7 +1234,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
xFirstPageStyle->setPropertyValue( sTrayIndex, uno::makeAny( nPaperBin ) );
if( xColumns.is() )
xFirstPageStyle->setPropertyValue(
- rPropNameSupplier.GetName( PROP_TEXT_COLUMNS ), uno::makeAny( xColumns ));
+ getPropertyName( PROP_TEXT_COLUMNS ), uno::makeAny( xColumns ));
}
ApplyBorderToPageStyles( rDM_Impl.GetPageStyles( ), rDM_Impl.GetTextFactory( ), m_nBorderParams );
@@ -1285,21 +1271,21 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
CopyHeaderFooter( pageProperties, evenOddStyle );
*pageStyle = evenOddStyleName; // And use it instead of the original one (which is set as follow of this one).
if (m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_evenPage))
- evenOddStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_STYLE_LAYOUT), uno::makeAny(style::PageStyleLayout_LEFT));
+ evenOddStyle->setPropertyValue(getPropertyName(PROP_PAGE_STYLE_LAYOUT), uno::makeAny(style::PageStyleLayout_LEFT));
else if (m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_oddPage))
- evenOddStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_STYLE_LAYOUT), uno::makeAny(style::PageStyleLayout_RIGHT));
+ evenOddStyle->setPropertyValue(getPropertyName(PROP_PAGE_STYLE_LAYOUT), uno::makeAny(style::PageStyleLayout_RIGHT));
}
if (xRangeProperties.is() && rDM_Impl.IsNewDoc())
xRangeProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_PAGE_DESC_NAME ),
+ getPropertyName( PROP_PAGE_DESC_NAME ),
uno::makeAny( m_bTitlePage ? m_sFirstPageStyleName
: m_sFollowPageStyleName ));
if(m_bPageNoRestart || m_nPageNumber >= 0)
{
sal_Int16 nPageNumber = m_nPageNumber >= 0 ? static_cast< sal_Int16 >(m_nPageNumber) : 1;
- xRangeProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_PAGE_NUMBER_OFFSET ),
+ xRangeProperties->setPropertyValue(getPropertyName( PROP_PAGE_NUMBER_OFFSET ),
uno::makeAny( nPageNumber ));
}
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index bc6d88e886d3..826172b738c0 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -917,9 +917,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
uno::Reference<container::XNameContainer> xParaStyles;
uno::Reference<container::XNameContainer> xNumberingStyles;
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- xStyleFamilies->getByName(rPropNameSupplier.GetName( PROP_CHARACTER_STYLES )) >>= xCharStyles;
- xStyleFamilies->getByName(rPropNameSupplier.GetName( PROP_PARAGRAPH_STYLES )) >>= xParaStyles;
+ xStyleFamilies->getByName(getPropertyName( PROP_CHARACTER_STYLES )) >>= xCharStyles;
+ xStyleFamilies->getByName(getPropertyName( PROP_PARAGRAPH_STYLES )) >>= xParaStyles;
xStyleFamilies->getByName("NumberingStyles") >>= xNumberingStyles;
if(xCharStyles.is() && xParaStyles.is())
{
@@ -979,8 +978,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
bInsert = true;
xStyle = uno::Reference< style::XStyle >(xDocFactory->createInstance(
bParaStyle ?
- rPropNameSupplier.GetName( PROP_SERVICE_PARA_STYLE ) :
- (bListStyle ? OUString("com.sun.star.style.NumberingStyle") : rPropNameSupplier.GetName( PROP_SERVICE_CHAR_STYLE ))),
+ getPropertyName( PROP_SERVICE_PARA_STYLE ) :
+ (bListStyle ? OUString("com.sun.star.style.NumberingStyle") : getPropertyName( PROP_SERVICE_CHAR_STYLE ))),
uno::UNO_QUERY_THROW);
// Numbering styles have to be inserted early, as e.g. the NumberingRules property is only available after insertion.
@@ -1082,7 +1081,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
const StyleSheetPropertyMap* pStyleSheetProperties = dynamic_cast<const StyleSheetPropertyMap*>(pEntry ? pEntry->pProperties.get() : nullptr);
if ( pStyleSheetProperties )
{
- beans::PropertyValue aLvlVal( rPropNameSupplier.GetName( PROP_OUTLINE_LEVEL ), 0,
+ beans::PropertyValue aLvlVal( getPropertyName( PROP_OUTLINE_LEVEL ), 0,
uno::makeAny( sal_Int16( pStyleSheetProperties->GetOutlineLevel( ) + 1 ) ),
beans::PropertyState_DIRECT_VALUE );
aPropValues.push_back(aLvlVal);
@@ -1095,10 +1094,10 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
{
//left margin is set to NULL by default
uno::Reference< beans::XPropertyState >xState1( xStyle, uno::UNO_QUERY_THROW );
- xState1->setPropertyToDefault(rPropNameSupplier.GetName( PROP_PARA_LEFT_MARGIN ));
+ xState1->setPropertyToDefault(getPropertyName( PROP_PARA_LEFT_MARGIN ));
}
else if ( sConvertedStyleName == "Text body" )
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_PARA_BOTTOM_MARGIN ));
+ xState->setPropertyToDefault(getPropertyName( PROP_PARA_BOTTOM_MARGIN ));
else if( sConvertedStyleName == "Heading 1" ||
sConvertedStyleName == "Heading 2" ||
sConvertedStyleName == "Heading 3" ||
@@ -1109,15 +1108,15 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
sConvertedStyleName == "Heading 8" ||
sConvertedStyleName == "Heading 9" )
{
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_WEIGHT ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_WEIGHT_ASIAN ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_WEIGHT_COMPLEX ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_POSTURE ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_POSTURE_ASIAN ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_POSTURE_COMPLEX ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_PROP_HEIGHT ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_PROP_HEIGHT_ASIAN ));
- xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_CHAR_PROP_HEIGHT_COMPLEX));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_WEIGHT ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_WEIGHT_ASIAN ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_WEIGHT_COMPLEX ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_POSTURE ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_POSTURE_ASIAN ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_POSTURE_COMPLEX ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_PROP_HEIGHT ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_PROP_HEIGHT_ASIAN ));
+ xState->setPropertyToDefault(getPropertyName( PROP_CHAR_PROP_HEIGHT_COMPLEX));
}
}
@@ -1567,11 +1566,10 @@ OUString StyleSheetTable::getOrCreateCharStyle( PropertyValueVector_t& rCharProp
sListLabel = cListLabel + OUString::number( ++nStyleFound );
//create a new one otherwise
uno::Reference< lang::XMultiServiceFactory > xDocFactory( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW );
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
try
{
uno::Reference< style::XStyle > xStyle( xDocFactory->createInstance(
- rPropNameSupplier.GetName( PROP_SERVICE_CHAR_STYLE )), uno::UNO_QUERY_THROW);
+ getPropertyName( PROP_SERVICE_CHAR_STYLE )), uno::UNO_QUERY_THROW);
uno::Reference< beans::XPropertySet > xStyleProps(xStyle, uno::UNO_QUERY_THROW );
PropertyValueVector_t::const_iterator aCharPropIter = rCharProperties.begin();
while( aCharPropIter != rCharProperties.end())
diff --git a/writerfilter/source/dmapper/TrackChangesHandler.cxx b/writerfilter/source/dmapper/TrackChangesHandler.cxx
index 877c5d7dbf51..f5864c144274 100644
--- a/writerfilter/source/dmapper/TrackChangesHandler.cxx
+++ b/writerfilter/source/dmapper/TrackChangesHandler.cxx
@@ -65,32 +65,30 @@ uno::Sequence<beans::PropertyValue> TrackChangesHandler::getRedlineProperties()
uno::Sequence< beans::PropertyValue > aRedlineProperties(3);
beans::PropertyValue* pRedlineProperties = aRedlineProperties.getArray();
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
OUString sType;
switch ( m_pRedlineParams->m_nToken & 0xffff )
{
case XML_tableRowInsert:
- sType = rPropNameSupplier.GetName( PROP_TABLE_ROW_INSERT );
+ sType = getPropertyName( PROP_TABLE_ROW_INSERT );
break;
case XML_tableRowDelete:
- sType = rPropNameSupplier.GetName( PROP_TABLE_ROW_DELETE );
+ sType = getPropertyName( PROP_TABLE_ROW_DELETE );
break;
case XML_tableCellInsert:
- sType = rPropNameSupplier.GetName( PROP_TABLE_CELL_INSERT );
+ sType = getPropertyName( PROP_TABLE_CELL_INSERT );
break;
case XML_tableCellDelete:
- sType = rPropNameSupplier.GetName( PROP_TABLE_CELL_DELETE );
+ sType = getPropertyName( PROP_TABLE_CELL_DELETE );
break;
}
- pRedlineProperties[0].Name = rPropNameSupplier.GetName( PROP_REDLINE_TYPE );
+ pRedlineProperties[0].Name = getPropertyName( PROP_REDLINE_TYPE );
pRedlineProperties[0].Value <<= sType;
- pRedlineProperties[1].Name = rPropNameSupplier.GetName( PROP_REDLINE_AUTHOR );
+ pRedlineProperties[1].Name = getPropertyName( PROP_REDLINE_AUTHOR );
pRedlineProperties[1].Value <<= m_pRedlineParams->m_sAuthor;
- pRedlineProperties[2].Name = rPropNameSupplier.GetName( PROP_REDLINE_DATE_TIME );
+ pRedlineProperties[2].Name = getPropertyName( PROP_REDLINE_DATE_TIME );
pRedlineProperties[2].Value <<= ConversionHelper::ConvertDateStringToDateTime( m_pRedlineParams->m_sDate );
- //pRedlineProperties[3].Name = rPropNameSupplier.GetName( PROP_REDLINE_REVERT_PROPERTIES );
+ //pRedlineProperties[3].Name = getPropertyName( PROP_REDLINE_REVERT_PROPERTIES );
//pRedlineProperties[3].Value <<= pRedline->m_aRevertProperties;
return aRedlineProperties;