summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtparae.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/txtparae.cxx')
-rw-r--r--xmloff/source/text/txtparae.cxx384
1 files changed, 193 insertions, 191 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 93d5fe16424c..569be2c3c707 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -135,6 +135,84 @@ using namespace ::com::sun::star::graphic;
using namespace ::xmloff;
using namespace ::xmloff::token;
+// Implement Title/Description Elements UI (#i73249#)
+static const OUStringLiteral gsTitle("Title");
+static const OUStringLiteral gsDescription("Description");
+const OUStringLiteral XMLTextParagraphExport::gsAnchorCharStyleName("AnchorCharStyleName");
+static const OUStringLiteral gsAnchorPageNo("AnchorPageNo");
+static const OUStringLiteral gsAnchorType("AnchorType");
+const OUStringLiteral XMLTextParagraphExport::gsBeginNotice("BeginNotice");
+static const OUStringLiteral gsBookmark("Bookmark");
+const OUStringLiteral XMLTextParagraphExport::gsCategory("Category");
+static const OUStringLiteral gsChainNextName("ChainNextName");
+const OUStringLiteral XMLTextParagraphExport::gsCharStyleName("CharStyleName");
+const OUStringLiteral XMLTextParagraphExport::gsCharStyleNames("CharStyleNames");
+static const OUStringLiteral gsContourPolyPolygon("ContourPolyPolygon");
+static const OUStringLiteral gsDocumentIndexMark("DocumentIndexMark");
+const OUStringLiteral XMLTextParagraphExport::gsEndNotice("EndNotice");
+const OUStringLiteral XMLTextParagraphExport::gsFootnote("Footnote");
+const OUStringLiteral XMLTextParagraphExport::gsFootnoteCounting("FootnoteCounting");
+static const OUStringLiteral gsFrame("Frame");
+static const OUStringLiteral gsGraphicFilter("GraphicFilter");
+static const OUStringLiteral gsGraphicRotation("GraphicRotation");
+static const OUStringLiteral gsHeight("Height");
+static const OUStringLiteral gsHoriOrient("HoriOrient");
+static const OUStringLiteral gsHoriOrientPosition("HoriOrientPosition");
+static const OUStringLiteral gsHyperLinkName("HyperLinkName");
+static const OUStringLiteral gsHyperLinkTarget("HyperLinkTarget");
+static const OUStringLiteral gsHyperLinkURL("HyperLinkURL");
+static const OUStringLiteral gsIsAutomaticContour("IsAutomaticContour");
+static const OUStringLiteral gsIsCollapsed("IsCollapsed");
+static const OUStringLiteral gsIsPixelContour("IsPixelContour");
+static const OUStringLiteral gsIsStart("IsStart");
+static const OUStringLiteral gsIsSyncHeightToWidth("IsSyncHeightToWidth");
+static const OUStringLiteral gsIsSyncWidthToHeight("IsSyncWidthToHeight");
+static const OUStringLiteral gsNumberingRules("NumberingRules");
+const OUStringLiteral XMLTextParagraphExport::gsNumberingType("NumberingType");
+const OUStringLiteral XMLTextParagraphExport::gsPageDescName("PageDescName");
+const OUStringLiteral XMLTextParagraphExport::gsPageStyleName("PageStyleName");
+static const OUStringLiteral gsParaConditionalStyleName("ParaConditionalStyleName");
+static const OUStringLiteral gsParagraphService("com.sun.star.text.Paragraph");
+const OUStringLiteral XMLTextParagraphExport::gsParaStyleName("ParaStyleName");
+const OUStringLiteral XMLTextParagraphExport::gsPositionEndOfDoc("PositionEndOfDoc");
+const OUStringLiteral XMLTextParagraphExport::gsPrefix("Prefix");
+static const OUStringLiteral gsRedline("Redline");
+const OUStringLiteral XMLTextParagraphExport::gsReferenceId("ReferenceId");
+static const OUStringLiteral gsReferenceMark("ReferenceMark");
+static const OUStringLiteral gsRelativeHeight("RelativeHeight");
+static const OUStringLiteral gsRelativeWidth("RelativeWidth");
+static const OUStringLiteral gsRuby("Ruby");
+static const OUStringLiteral gsRubyCharStyleName("RubyCharStyleName");
+static const OUStringLiteral gsRubyText("RubyText");
+static const OUStringLiteral gsServerMap("ServerMap");
+static const OUStringLiteral gsShapeService("com.sun.star.drawing.Shape");
+static const OUStringLiteral gsSizeType("SizeType");
+static const OUStringLiteral gsSoftPageBreak( "SoftPageBreak" );
+const OUStringLiteral XMLTextParagraphExport::gsStartAt("StartAt");
+const OUStringLiteral XMLTextParagraphExport::gsSuffix("Suffix");
+static const OUStringLiteral gsTableService("com.sun.star.text.TextTable");
+static const OUStringLiteral gsText("Text");
+static const OUStringLiteral gsTextContentService("com.sun.star.text.TextContent");
+static const OUStringLiteral gsTextEmbeddedService("com.sun.star.text.TextEmbeddedObject");
+const OUStringLiteral XMLTextParagraphExport::gsTextEndnoteService("com.sun.star.text.Endnote");
+static const OUStringLiteral gsTextField("TextField");
+static const OUStringLiteral gsTextFieldService("com.sun.star.text.TextField");
+static const OUStringLiteral gsTextFrameService("com.sun.star.text.TextFrame");
+static const OUStringLiteral gsTextGraphicService("com.sun.star.text.TextGraphicObject");
+static const OUStringLiteral gsTextPortionType("TextPortionType");
+const OUStringLiteral XMLTextParagraphExport::gsTextSection("TextSection");
+static const OUStringLiteral gsUnvisitedCharStyleName("UnvisitedCharStyleName");
+static const OUStringLiteral gsVertOrient("VertOrient");
+static const OUStringLiteral gsVertOrientPosition("VertOrientPosition");
+static const OUStringLiteral gsVisitedCharStyleName("VisitedCharStyleName");
+static const OUStringLiteral gsWidth("Width");
+static const OUStringLiteral gsWidthType( "WidthType" );
+static const OUStringLiteral gsTextFieldStart( "TextFieldStart" );
+static const OUStringLiteral gsTextFieldEnd( "TextFieldEnd" );
+static const OUStringLiteral gsTextFieldStartEnd( "TextFieldStartEnd" );
+
+const OUStringLiteral XMLTextParagraphExport::gsFrameStyleName("FrameStyleName");
+
namespace
{
class TextContentSet
@@ -492,17 +570,17 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
switch( nFamily )
{
case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
- if( xPropSetInfo->hasPropertyByName( sParaStyleName ) )
+ if( xPropSetInfo->hasPropertyByName( gsParaStyleName ) )
{
- rPropSet->getPropertyValue( sParaStyleName ) >>= sParent;
+ rPropSet->getPropertyValue( gsParaStyleName ) >>= sParent;
}
- if( xPropSetInfo->hasPropertyByName( sParaConditionalStyleName ) )
+ if( xPropSetInfo->hasPropertyByName( gsParaConditionalStyleName ) )
{
- rPropSet->getPropertyValue( sParaConditionalStyleName ) >>= sCondParent;
+ rPropSet->getPropertyValue( gsParaConditionalStyleName ) >>= sCondParent;
}
- if( xPropSetInfo->hasPropertyByName( sNumberingRules ) )
+ if( xPropSetInfo->hasPropertyByName( gsNumberingRules ) )
{
- Reference < XIndexReplace > xNumRule(rPropSet->getPropertyValue( sNumberingRules ), uno::UNO_QUERY);
+ Reference < XIndexReplace > xNumRule(rPropSet->getPropertyValue( gsNumberingRules ), uno::UNO_QUERY);
if( xNumRule.is() && xNumRule->getCount() )
{
Reference < XNamed > xNamed( xNumRule, UNO_QUERY );
@@ -566,9 +644,9 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
}
break;
case XML_STYLE_FAMILY_TEXT_FRAME:
- if( xPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( xPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- rPropSet->getPropertyValue( sFrameStyleName ) >>= sParent;
+ rPropSet->getPropertyValue( gsFrameStyleName ) >>= sParent;
}
break;
case XML_STYLE_FAMILY_TEXT_SECTION:
@@ -1176,83 +1254,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
mpTextListsHelper( nullptr ),
maTextListsHelperStack(),
mbCollected(false),
- // Implement Title/Description Elements UI (#i73249#)
- sTitle("Title"),
- sDescription("Description"),
- sAnchorCharStyleName("AnchorCharStyleName"),
- sAnchorPageNo("AnchorPageNo"),
- sAnchorType("AnchorType"),
- sBeginNotice("BeginNotice"),
- sBookmark("Bookmark"),
- sCategory("Category"),
- sChainNextName("ChainNextName"),
- sCharStyleName("CharStyleName"),
- sCharStyleNames("CharStyleNames"),
- sContourPolyPolygon("ContourPolyPolygon"),
- sDocumentIndexMark("DocumentIndexMark"),
- sEndNotice("EndNotice"),
- sFootnote("Footnote"),
- sFootnoteCounting("FootnoteCounting"),
- sFrame("Frame"),
- sGraphicFilter("GraphicFilter"),
- sGraphicRotation("GraphicRotation"),
- sHeight("Height"),
- sHoriOrient("HoriOrient"),
- sHoriOrientPosition("HoriOrientPosition"),
- sHyperLinkName("HyperLinkName"),
- sHyperLinkTarget("HyperLinkTarget"),
- sHyperLinkURL("HyperLinkURL"),
- sIsAutomaticContour("IsAutomaticContour"),
- sIsCollapsed("IsCollapsed"),
- sIsPixelContour("IsPixelContour"),
- sIsStart("IsStart"),
- sIsSyncHeightToWidth("IsSyncHeightToWidth"),
- sIsSyncWidthToHeight("IsSyncWidthToHeight"),
- sNumberingRules("NumberingRules"),
- sNumberingType("NumberingType"),
- sPageDescName("PageDescName"),
- sPageStyleName("PageStyleName"),
- sParaConditionalStyleName("ParaConditionalStyleName"),
- sParagraphService("com.sun.star.text.Paragraph"),
- sParaStyleName("ParaStyleName"),
- sPositionEndOfDoc("PositionEndOfDoc"),
- sPrefix("Prefix"),
- sRedline("Redline"),
- sReferenceId("ReferenceId"),
- sReferenceMark("ReferenceMark"),
- sRelativeHeight("RelativeHeight"),
- sRelativeWidth("RelativeWidth"),
- sRuby("Ruby"),
- sRubyCharStyleName("RubyCharStyleName"),
- sRubyText("RubyText"),
- sServerMap("ServerMap"),
- sShapeService("com.sun.star.drawing.Shape"),
- sSizeType("SizeType"),
- sSoftPageBreak( "SoftPageBreak" ),
- sStartAt("StartAt"),
- sSuffix("Suffix"),
- sTableService("com.sun.star.text.TextTable"),
- sText("Text"),
- sTextContentService("com.sun.star.text.TextContent"),
- sTextEmbeddedService("com.sun.star.text.TextEmbeddedObject"),
- sTextEndnoteService("com.sun.star.text.Endnote"),
- sTextField("TextField"),
- sTextFieldService("com.sun.star.text.TextField"),
- sTextFrameService("com.sun.star.text.TextFrame"),
- sTextGraphicService("com.sun.star.text.TextGraphicObject"),
- sTextPortionType("TextPortionType"),
- sTextSection("TextSection"),
- sUnvisitedCharStyleName("UnvisitedCharStyleName"),
- sVertOrient("VertOrient"),
- sVertOrientPosition("VertOrientPosition"),
- sVisitedCharStyleName("VisitedCharStyleName"),
- sWidth("Width"),
- sWidthType( "WidthType" ),
- sTextFieldStart( "TextFieldStart" ),
- sTextFieldEnd( "TextFieldEnd" ),
- sTextFieldStartEnd( "TextFieldStartEnd" ),
- sFrameStyleName("FrameStyleName"),
- aCharStyleNamesPropInfoCache( sCharStyleNames )
+ aCharStyleNamesPropInfoCache( gsCharStyleNames )
{
rtl::Reference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TextPropMap::PARA, true ));
xParaPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
@@ -1550,7 +1552,7 @@ void XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress )
if(xTxtCntnt.is())
{
Reference<XServiceInfo> xServiceInfo(xTxtCntnt, UNO_QUERY);
- if( xServiceInfo->supportsService(sShapeService))
+ if( xServiceInfo->supportsService(gsShapeService))
exportShape(xTxtCntnt, true);
}
}
@@ -1667,9 +1669,9 @@ void XMLTextParagraphExport::exportText(
if( xInfo.is() )
{
- if (xInfo->hasPropertyByName( sTextSection ))
+ if (xInfo->hasPropertyByName( gsTextSection ))
{
- xPropertySet->getPropertyValue(sTextSection) >>= xBaseSection ;
+ xPropertySet->getPropertyValue(gsTextSection) >>= xBaseSection ;
}
}
}
@@ -1756,7 +1758,7 @@ void XMLTextParagraphExport::exportTextContentEnumeration(
}
Reference<XServiceInfo> xServiceInfo( xTxtCntnt, UNO_QUERY );
- if( xServiceInfo->supportsService( sParagraphService ) )
+ if( xServiceInfo->supportsService( gsParagraphService ) )
{
if( bAutoStyles )
{
@@ -1806,7 +1808,7 @@ void XMLTextParagraphExport::exportTextContentEnumeration(
bExportParagraph, aPropSetHelper, eExtensionNS );
bHasContent = true;
}
- else if( xServiceInfo->supportsService( sTableService ) )
+ else if( xServiceInfo->supportsService( gsTableService ) )
{
if( !bAutoStyles )
{
@@ -1836,19 +1838,19 @@ void XMLTextParagraphExport::exportTextContentEnumeration(
bHasContent = true;
}
- else if( xServiceInfo->supportsService( sTextFrameService ) )
+ else if( xServiceInfo->supportsService( gsTextFrameService ) )
{
exportTextFrame( xTxtCntnt, bAutoStyles, bIsProgress, true, pRangePropSet );
}
- else if( xServiceInfo->supportsService( sTextGraphicService ) )
+ else if( xServiceInfo->supportsService( gsTextGraphicService ) )
{
exportTextGraphic( xTxtCntnt, bAutoStyles, pRangePropSet );
}
- else if( xServiceInfo->supportsService( sTextEmbeddedService ) )
+ else if( xServiceInfo->supportsService( gsTextEmbeddedService ) )
{
exportTextEmbedded( xTxtCntnt, bAutoStyles, pRangePropSet );
}
- else if( xServiceInfo->supportsService( sShapeService ) )
+ else if( xServiceInfo->supportsService( gsShapeService ) )
{
exportShape( xTxtCntnt, bAutoStyles, pRangePropSet );
}
@@ -2084,7 +2086,7 @@ void XMLTextParagraphExport::exportParagraph(
Reference < XEnumeration> xContentEnum;
Reference < XContentEnumerationAccess > xCEA( rTextContent, UNO_QUERY );
if( xCEA.is() )
- xContentEnum.set(xCEA->createContentEnumeration( sTextContentService ));
+ xContentEnum.set(xCEA->createContentEnumeration( gsTextContentService ));
const bool bHasContentEnum = xContentEnum.is() &&
xContentEnum->hasMoreElements();
@@ -2097,9 +2099,9 @@ void XMLTextParagraphExport::exportParagraph(
// we always retrieve the style names even if they are not required.
if( bAutoStyles )
{
- if( xPropSet->getPropertySetInfo()->hasPropertyByName( sTextSection ) )
+ if( xPropSet->getPropertySetInfo()->hasPropertyByName( gsTextSection ) )
{
- xSection.set(xPropSet->getPropertyValue( sTextSection ), uno::UNO_QUERY);
+ xSection.set(xPropSet->getPropertyValue( gsTextSection ), uno::UNO_QUERY);
}
}
else
@@ -2157,17 +2159,17 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
Reference < XTextRange > xTxtRange(xPropSet, uno::UNO_QUERY);
Reference<XPropertySetInfo> xPropInfo(xPropSet->getPropertySetInfo());
- if (xPropInfo->hasPropertyByName(sTextPortionType))
+ if (xPropInfo->hasPropertyByName(gsTextPortionType))
{
OUString sType;
- xPropSet->getPropertyValue(sTextPortionType) >>= sType;
+ xPropSet->getPropertyValue(gsTextPortionType) >>= sType;
- if( sType == sText)
+ if( sType == gsText)
{
exportTextRange( xTxtRange, bAutoStyles,
rPrevCharIsSpace, openFieldMark);
}
- else if( sType == sTextField)
+ else if( sType == gsTextField)
{
exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
}
@@ -2179,7 +2181,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
if (!bAutoStyles)
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
const OUString& rName = xBookmark->getName();
if (!rName.isEmpty())
{
@@ -2188,14 +2190,14 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false );
}
}
- else if( sType == sFrame )
+ else if( sType == gsFrame )
{
Reference < XEnumeration> xContentEnum;
Reference < XContentEnumerationAccess > xCEA( xTxtRange,
UNO_QUERY );
if( xCEA.is() )
xContentEnum.set(xCEA->createContentEnumeration(
- sTextContentService ));
+ gsTextContentService ));
// frames are never in sections
Reference<XTextSection> xSection;
if( xContentEnum.is() )
@@ -2205,36 +2207,36 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
&xPropSet );
}
- else if (sType == sFootnote)
+ else if (sType == gsFootnote)
{
exportTextFootnote(xPropSet,
xTxtRange->getString(),
bAutoStyles, bIsProgress );
}
- else if (sType == sBookmark)
+ else if (sType == gsBookmark)
{
exportTextMark(xPropSet,
- sBookmark,
+ gsBookmark,
lcl_XmlBookmarkElements,
bAutoStyles);
}
- else if (sType == sReferenceMark)
+ else if (sType == gsReferenceMark)
{
exportTextMark(xPropSet,
- sReferenceMark,
+ gsReferenceMark,
lcl_XmlReferenceElements,
bAutoStyles);
}
- else if (sType == sDocumentIndexMark)
+ else if (sType == gsDocumentIndexMark)
{
pIndexMarkExport->ExportIndexMark(xPropSet, bAutoStyles);
}
- else if (sType == sRedline)
+ else if (sType == gsRedline)
{
if (nullptr != pRedlineExport)
pRedlineExport->ExportChange(xPropSet, bAutoStyles);
}
- else if (sType == sRuby)
+ else if (sType == gsRuby)
{
exportRuby(xPropSet, bAutoStyles);
}
@@ -2242,16 +2244,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
exportMeta(xPropSet, bAutoStyles, bIsProgress, rPrevCharIsSpace);
}
- else if (sType == sTextFieldStart)
+ else if (sType == gsTextFieldStart)
{
- Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
/* As of now, textmarks are a proposed extension to the OpenDocument standard. */
if (!bAutoStyles)
{
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName());
@@ -2309,11 +2311,11 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType == sTextFieldEnd)
+ else if (sType == gsTextFieldEnd)
{
if (!bAutoStyles)
{
- Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
{
@@ -2347,18 +2349,18 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType == sTextFieldStartEnd)
+ else if (sType == gsTextFieldStartEnd)
{
if (!bAutoStyles)
{
if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName());
}
- Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xFormField.is())
{
GetExport().AddAttribute(XML_NAMESPACE_FIELD, XML_TYPE, xFormField->getFieldType());
@@ -2372,7 +2374,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
else
{
- Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+ Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName());
@@ -2383,7 +2385,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType == sSoftPageBreak)
+ else if (sType == gsSoftPageBreak)
{
exportSoftPageBreak();
}
@@ -2394,7 +2396,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
else
{
Reference<XServiceInfo> xServiceInfo( xTxtRange, UNO_QUERY );
- if( xServiceInfo->supportsService( sTextFieldService ) )
+ if( xServiceInfo->supportsService( gsTextFieldService ) )
{
exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
}
@@ -2422,9 +2424,9 @@ void XMLTextParagraphExport::exportTextField(
{
Reference < XPropertySet > xPropSet( rTextRange, UNO_QUERY );
// non-Writer apps need not support Property TextField, so test first
- if (xPropSet->getPropertySetInfo()->hasPropertyByName( sTextField ))
+ if (xPropSet->getPropertySetInfo()->hasPropertyByName( gsTextField ))
{
- Reference < XTextField > xTxtFld(xPropSet->getPropertyValue( sTextField ), uno::UNO_QUERY);
+ Reference < XTextField > xTxtFld(xPropSet->getPropertyValue( gsTextField ), uno::UNO_QUERY);
SAL_WARN_IF( !xTxtFld.is(), "xmloff", "text field missing" );
if( xTxtFld.is() )
{
@@ -2485,13 +2487,13 @@ void XMLTextParagraphExport::exportTextMark(
// start, end, or point-reference?
sal_Int8 nElement;
- if( *o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsCollapsed)) )
+ if( *o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsCollapsed)) )
{
nElement = 0;
}
else
{
- nElement = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsStart)) ? 1 : 2;
+ nElement = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsStart)) ? 1 : 2;
}
// bookmark, bookmark-start: xml:id and RDFa for RDF metadata
@@ -2579,7 +2581,7 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
// text:anchor-type
TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
- rPropSet->getPropertyValue( sAnchorType ) >>= eAnchor;
+ rPropSet->getPropertyValue( gsAnchorType ) >>= eAnchor;
{
XMLAnchorTypePropHdl aAnchorTypeHdl;
OUString sTmp;
@@ -2592,7 +2594,7 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
if( TextContentAnchorType_AT_PAGE == eAnchor )
{
sal_Int16 nPage = 0;
- rPropSet->getPropertyValue( sAnchorPageNo ) >>= nPage;
+ rPropSet->getPropertyValue( gsAnchorPageNo ) >>= nPage;
SAL_WARN_IF(nPage <= 0, "xmloff",
"ERROR: writing invalid anchor-page-number 0");
GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_PAGE_NUMBER,
@@ -2610,11 +2612,11 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
{
// svg:x
sal_Int16 nHoriOrient = HoriOrientation::NONE;
- rPropSet->getPropertyValue( sHoriOrient ) >>= nHoriOrient;
+ rPropSet->getPropertyValue( gsHoriOrient ) >>= nHoriOrient;
if( HoriOrientation::NONE == nHoriOrient )
{
sal_Int32 nPos = 0;
- rPropSet->getPropertyValue( sHoriOrientPosition ) >>= nPos;
+ rPropSet->getPropertyValue( gsHoriOrientPosition ) >>= nPos;
GetExport().GetMM100UnitConverter().convertMeasureToXML(
sValue, nPos );
GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_X,
@@ -2633,11 +2635,11 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
{
// svg:y
sal_Int16 nVertOrient = VertOrientation::NONE;
- rPropSet->getPropertyValue( sVertOrient ) >>= nVertOrient;
+ rPropSet->getPropertyValue( gsVertOrient ) >>= nVertOrient;
if( VertOrientation::NONE == nVertOrient )
{
sal_Int32 nPos = 0;
- rPropSet->getPropertyValue( sVertOrientPosition ) >>= nPos;
+ rPropSet->getPropertyValue( gsVertOrientPosition ) >>= nPos;
GetExport().GetMM100UnitConverter().convertMeasureToXML(
sValue, nPos );
GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_Y,
@@ -2656,17 +2658,17 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
// svg:width
sal_Int16 nWidthType = SizeType::FIX;
- if( xPropSetInfo->hasPropertyByName( sWidthType ) )
+ if( xPropSetInfo->hasPropertyByName( gsWidthType ) )
{
- rPropSet->getPropertyValue( sWidthType ) >>= nWidthType;
+ rPropSet->getPropertyValue( gsWidthType ) >>= nWidthType;
}
- if( xPropSetInfo->hasPropertyByName( sWidth ) )
+ if( xPropSetInfo->hasPropertyByName( gsWidth ) )
{
sal_Int32 nWidth = 0;
// VAR size will be written as zero min-size
if( SizeType::VARIABLE != nWidthType )
{
- rPropSet->getPropertyValue( sWidth ) >>= nWidth;
+ rPropSet->getPropertyValue( gsWidth ) >>= nWidth;
}
GetExport().GetMM100UnitConverter().convertMeasureToXML(sValue, nWidth);
if( SizeType::FIX != nWidthType )
@@ -2689,17 +2691,17 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
}
}
bool bSyncWidth = false;
- if( xPropSetInfo->hasPropertyByName( sIsSyncWidthToHeight ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsSyncWidthToHeight ) )
{
- bSyncWidth = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sIsSyncWidthToHeight ));
+ bSyncWidth = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsIsSyncWidthToHeight ));
if( bSyncWidth )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_WIDTH,
XML_SCALE );
}
- if( !bSyncWidth && xPropSetInfo->hasPropertyByName( sRelativeWidth ) )
+ if( !bSyncWidth && xPropSetInfo->hasPropertyByName( gsRelativeWidth ) )
{
sal_Int16 nRelWidth = 0;
- rPropSet->getPropertyValue( sRelativeWidth ) >>= nRelWidth;
+ rPropSet->getPropertyValue( gsRelativeWidth ) >>= nRelWidth;
SAL_WARN_IF( nRelWidth < 0 || nRelWidth > 254, "xmloff",
"Got illegal relative width from API" );
if( nRelWidth > 0 )
@@ -2712,26 +2714,26 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
// svg:height, fo:min-height or style:rel-height
sal_Int16 nSizeType = SizeType::FIX;
- if( xPropSetInfo->hasPropertyByName( sSizeType ) )
+ if( xPropSetInfo->hasPropertyByName( gsSizeType ) )
{
- rPropSet->getPropertyValue( sSizeType ) >>= nSizeType;
+ rPropSet->getPropertyValue( gsSizeType ) >>= nSizeType;
}
bool bSyncHeight = false;
- if( xPropSetInfo->hasPropertyByName( sIsSyncHeightToWidth ) )
+ if( xPropSetInfo->hasPropertyByName( gsIsSyncHeightToWidth ) )
{
- bSyncHeight = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sIsSyncHeightToWidth ));
+ bSyncHeight = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsIsSyncHeightToWidth ));
}
sal_Int16 nRelHeight = 0;
- if( !bSyncHeight && xPropSetInfo->hasPropertyByName( sRelativeHeight ) )
+ if( !bSyncHeight && xPropSetInfo->hasPropertyByName( gsRelativeHeight ) )
{
- rPropSet->getPropertyValue( sRelativeHeight ) >>= nRelHeight;
+ rPropSet->getPropertyValue( gsRelativeHeight ) >>= nRelHeight;
}
- if( xPropSetInfo->hasPropertyByName( sHeight ) )
+ if( xPropSetInfo->hasPropertyByName( gsHeight ) )
{
sal_Int32 nHeight = 0;
if( SizeType::VARIABLE != nSizeType )
{
- rPropSet->getPropertyValue( sHeight ) >>= nHeight;
+ rPropSet->getPropertyValue( gsHeight ) >>= nHeight;
}
GetExport().GetMM100UnitConverter().convertMeasureToXML( sValue,
nHeight );
@@ -2860,7 +2862,7 @@ void XMLTextParagraphExport::exportAnyTextFrame(
XMLTextCharStyleNamesElementExport aCharStylesExport(
GetExport(), bDoSomething, bHasAutoStyle,
bDoSomething ? *pRangePropSet : Reference<XPropertySet>(),
- sCharStyleNames );
+ gsCharStyleNames );
if( !sStyle.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
@@ -2910,9 +2912,9 @@ void XMLTextParagraphExport::_exportTextFrame(
Reference < XText > xTxt(xTxtFrame->getText());
OUString sStyle;
- if( rPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- rPropSet->getPropertyValue( sFrameStyleName ) >>= sStyle;
+ rPropSet->getPropertyValue( gsFrameStyleName ) >>= sStyle;
}
OUString sAutoStyle( sStyle );
@@ -2938,10 +2940,10 @@ void XMLTextParagraphExport::_exportTextFrame(
}
// draw:chain-next-name
- if( rPropSetInfo->hasPropertyByName( sChainNextName ) )
+ if( rPropSetInfo->hasPropertyByName( gsChainNextName ) )
{
OUString sNext;
- if( (rPropSet->getPropertyValue( sChainNextName ) >>= sNext) && !sNext.isEmpty() )
+ if( (rPropSet->getPropertyValue( gsChainNextName ) >>= sNext) && !sNext.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_DRAW,
XML_CHAIN_NEXT_NAME,
sNext );
@@ -2972,13 +2974,13 @@ void XMLTextParagraphExport::exportContour(
const Reference < XPropertySet > & rPropSet,
const Reference < XPropertySetInfo > & rPropSetInfo )
{
- if( !rPropSetInfo->hasPropertyByName( sContourPolyPolygon ) )
+ if( !rPropSetInfo->hasPropertyByName( gsContourPolyPolygon ) )
{
return;
}
PointSequenceSequence aSourcePolyPolygon;
- rPropSet->getPropertyValue( sContourPolyPolygon ) >>= aSourcePolyPolygon;
+ rPropSet->getPropertyValue( gsContourPolyPolygon ) >>= aSourcePolyPolygon;
const basegfx::B2DPolyPolygon aPolyPolygon(
basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(
aSourcePolyPolygon));
@@ -2992,9 +2994,9 @@ void XMLTextParagraphExport::exportContour(
const basegfx::B2DRange aPolyPolygonRange(aPolyPolygon.getB2DRange());
bool bPixel(false);
- if( rPropSetInfo->hasPropertyByName( sIsPixelContour ) )
+ if( rPropSetInfo->hasPropertyByName( gsIsPixelContour ) )
{
- bPixel = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sIsPixelContour ));
+ bPixel = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsIsPixelContour ));
}
// svg: width
@@ -3054,10 +3056,10 @@ void XMLTextParagraphExport::exportContour(
eElem = XML_CONTOUR_PATH;
}
- if( rPropSetInfo->hasPropertyByName( sIsAutomaticContour ) )
+ if( rPropSetInfo->hasPropertyByName( gsIsAutomaticContour ) )
{
bool bTmp = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
- sIsAutomaticContour ));
+ gsIsAutomaticContour ));
GetExport().AddAttribute( XML_NAMESPACE_DRAW,
XML_RECREATE_ON_EDIT, bTmp ? XML_TRUE : XML_FALSE );
}
@@ -3072,9 +3074,9 @@ void XMLTextParagraphExport::_exportTextGraphic(
const Reference < XPropertySetInfo > & rPropSetInfo )
{
OUString sStyle;
- if( rPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- rPropSet->getPropertyValue( sFrameStyleName ) >>= sStyle;
+ rPropSet->getPropertyValue( gsFrameStyleName ) >>= sStyle;
}
OUString sAutoStyle( sStyle );
@@ -3085,7 +3087,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
// check if we need to use svg:transform
sal_Int16 nRotation(0);
- rPropSet->getPropertyValue( sGraphicRotation ) >>= nRotation;
+ rPropSet->getPropertyValue( gsGraphicRotation ) >>= nRotation;
const bool bUseRotation(0 != nRotation);
basegfx::B2DPoint aCenter(0.0, 0.0);
@@ -3158,7 +3160,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
// draw:filter-name
OUString sGrfFilter;
- rPropSet->getPropertyValue( sGraphicFilter ) >>= sGrfFilter;
+ rPropSet->getPropertyValue( gsGraphicFilter ) >>= sGrfFilter;
if( !sGrfFilter.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_FILTER_NAME,
sGrfFilter );
@@ -3275,10 +3277,10 @@ void XMLTextParagraphExport::exportTitleAndDescription(
const Reference < XPropertySetInfo > & rPropSetInfo )
{
// svg:title
- if( rPropSetInfo->hasPropertyByName( sTitle ) )
+ if( rPropSetInfo->hasPropertyByName( gsTitle ) )
{
OUString sObjTitle;
- rPropSet->getPropertyValue( sTitle ) >>= sObjTitle;
+ rPropSet->getPropertyValue( gsTitle ) >>= sObjTitle;
if( !sObjTitle.isEmpty() )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
@@ -3288,10 +3290,10 @@ void XMLTextParagraphExport::exportTitleAndDescription(
}
// svg:description
- if( rPropSetInfo->hasPropertyByName( sDescription ) )
+ if( rPropSetInfo->hasPropertyByName( gsDescription ) )
{
OUString sObjDesc;
- rPropSet->getPropertyValue( sDescription ) >>= sObjDesc;
+ rPropSet->getPropertyValue( gsDescription ) >>= sObjDesc;
if( !sObjDesc.isEmpty() )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
@@ -3310,11 +3312,11 @@ bool XMLTextParagraphExport::addHyperlinkAttributes(
OUString sHRef, sName, sTargetFrame, sUStyleName, sVStyleName;
bool bServerMap = false;
- if( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) &&
+ if( rPropSetInfo->hasPropertyByName( gsHyperLinkURL ) &&
( !rPropState.is() || PropertyState_DIRECT_VALUE ==
- rPropState->getPropertyState( sHyperLinkURL ) ) )
+ rPropState->getPropertyState( gsHyperLinkURL ) ) )
{
- rPropSet->getPropertyValue( sHyperLinkURL ) >>= sHRef;
+ rPropSet->getPropertyValue( gsHyperLinkURL ) >>= sHRef;
if( !sHRef.isEmpty() )
bExport = true;
@@ -3327,47 +3329,47 @@ bool XMLTextParagraphExport::addHyperlinkAttributes(
return false;
}
- if ( rPropSetInfo->hasPropertyByName( sHyperLinkName )
+ if ( rPropSetInfo->hasPropertyByName( gsHyperLinkName )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkName ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsHyperLinkName ) ) )
{
- rPropSet->getPropertyValue( sHyperLinkName ) >>= sName;
+ rPropSet->getPropertyValue( gsHyperLinkName ) >>= sName;
if( !sName.isEmpty() )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sHyperLinkTarget )
+ if ( rPropSetInfo->hasPropertyByName( gsHyperLinkTarget )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkTarget ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsHyperLinkTarget ) ) )
{
- rPropSet->getPropertyValue( sHyperLinkTarget ) >>= sTargetFrame;
+ rPropSet->getPropertyValue( gsHyperLinkTarget ) >>= sTargetFrame;
if( !sTargetFrame.isEmpty() )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sServerMap )
+ if ( rPropSetInfo->hasPropertyByName( gsServerMap )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sServerMap ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsServerMap ) ) )
{
- bServerMap = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( sServerMap ));
+ bServerMap = *o3tl::doAccess<bool>(rPropSet->getPropertyValue( gsServerMap ));
if ( bServerMap )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName )
+ if ( rPropSetInfo->hasPropertyByName( gsUnvisitedCharStyleName )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sUnvisitedCharStyleName ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsUnvisitedCharStyleName ) ) )
{
- rPropSet->getPropertyValue( sUnvisitedCharStyleName ) >>= sUStyleName;
+ rPropSet->getPropertyValue( gsUnvisitedCharStyleName ) >>= sUStyleName;
if( !sUStyleName.isEmpty() )
bExport = true;
}
- if ( rPropSetInfo->hasPropertyByName( sVisitedCharStyleName )
+ if ( rPropSetInfo->hasPropertyByName( gsVisitedCharStyleName )
&& ( !rPropState.is()
- || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sVisitedCharStyleName ) ) )
+ || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( gsVisitedCharStyleName ) ) )
{
- rPropSet->getPropertyValue( sVisitedCharStyleName ) >>= sVStyleName;
+ rPropSet->getPropertyValue( gsVisitedCharStyleName ) >>= sVStyleName;
if( !sVStyleName.isEmpty() )
bExport = true;
}
@@ -3419,7 +3421,7 @@ void XMLTextParagraphExport::exportTextRangeSpan(
bIsUICharStyle && aCharStyleNamesPropInfoCache.hasProperty( xPropSet, xPropSetInfo ),
bHasAutoStyle,
xPropSet,
- sCharStyleNames );
+ gsCharStyleNames );
if ( !sStyle.isEmpty() )
{
@@ -3711,11 +3713,11 @@ void XMLTextParagraphExport::exportRuby(
bool bAutoStyles )
{
// early out: a collapsed ruby makes no sense
- if (*o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsCollapsed)))
+ if (*o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsCollapsed)))
return;
// start value ?
- bool bStart = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(sIsStart));
+ bool bStart = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(gsIsStart));
if (bAutoStyles)
{
@@ -3735,8 +3737,8 @@ void XMLTextParagraphExport::exportRuby(
return;
// save ruby text + ruby char style
- rPropSet->getPropertyValue(sRubyText) >>= sOpenRubyText;
- rPropSet->getPropertyValue(sRubyCharStyleName) >>= sOpenRubyCharStyle;
+ rPropSet->getPropertyValue(gsRubyText) >>= sOpenRubyText;
+ rPropSet->getPropertyValue(gsRubyCharStyleName) >>= sOpenRubyCharStyle;
// ruby style
GetExport().CheckAttrList();