diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-09 09:45:04 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-09 11:25:41 +0200 |
commit | 84493425a1c5645221760756bec1c751ed24f522 (patch) | |
tree | 56a3f424d621d307fc62c7e8057db57a7c5e0bba /xmloff | |
parent | a96d2f339c913e6a53f6003fda024ddc7a6adbbf (diff) |
merge HeaderIsSharedFirst and FooterIsSharedFirst to FirstIsShared
sw document model, xmloff and offapi supported these separately, but sw
layout did not. It turns out it's not needed for Word interop, either,
so better to just merge these, instead of implementing them
independently without a good use-case.
Change-Id: I5c3b334baa09cabec123745c7af3d65d830754fc
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/xmloff/XMLTextMasterPageExport.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextHeaderFooterContext.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextMasterPageExport.cxx | 7 |
3 files changed, 6 insertions, 15 deletions
diff --git a/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx b/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx index 02b2b6c2d09b..cad00c29728c 100644 --- a/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx +++ b/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx @@ -35,14 +35,14 @@ class XMLOFF_DLLPUBLIC XMLTextMasterPageExport : public XMLPageExport const ::rtl::OUString sHeaderText; const ::rtl::OUString sHeaderOn; const ::rtl::OUString sHeaderShareContent; - const ::rtl::OUString sHeaderShareContentFirst; const ::rtl::OUString sHeaderTextFirst; const ::rtl::OUString sHeaderTextLeft; + const ::rtl::OUString sFirstShareContent; + const ::rtl::OUString sFooterText; const ::rtl::OUString sFooterOn; const ::rtl::OUString sFooterShareContent; - const ::rtl::OUString sFooterShareContentFirst; const ::rtl::OUString sFooterTextFirst; const ::rtl::OUString sFooterTextLeft; diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index c69ff1eb6e7b..70ede5860926 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -58,7 +58,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, sa sOn( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterIsOn" )) : OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderIsOn" )) ), sShareContent( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterIsShared" )) : OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderIsShared" )) ), - sShareContentFirst( bFooter ? OUString("FooterIsSharedFirst" ) : OUString( "HeaderIsSharedFirst" ) ), + sShareContentFirst( "FirstIsShared" ), sText( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterText" )) : OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderText" )) ), sTextFirst(bFooter ? OUString("FooterTextFirst") : OUString("HeaderTextFirst")), sTextLeft( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterTextLeft" )) @@ -161,14 +161,6 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext( aAny.setValue( &bShared, ::getBooleanCppuType() ); xPropSet->setPropertyValue( sShareContent, aAny ); } - aAny = xPropSet->getPropertyValue( sShareContentFirst ); - sal_Bool bSharedFirst = *(sal_Bool *)aAny.getValue(); - if( !bSharedFirst ) - { - bSharedFirst = sal_True; - aAny.setValue( &bSharedFirst, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( sShareContentFirst, aAny ); - } aAny = xPropSet->getPropertyValue( sText ); } diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx index 2e0a3fed1cf4..c9714c500dea 100644 --- a/xmloff/source/text/XMLTextMasterPageExport.cxx +++ b/xmloff/source/text/XMLTextMasterPageExport.cxx @@ -40,13 +40,12 @@ XMLTextMasterPageExport::XMLTextMasterPageExport( SvXMLExport& rExp ) : sHeaderText( RTL_CONSTASCII_USTRINGPARAM( "HeaderText" ) ), sHeaderOn( RTL_CONSTASCII_USTRINGPARAM( "HeaderIsOn" ) ), sHeaderShareContent( RTL_CONSTASCII_USTRINGPARAM( "HeaderIsShared" ) ), - sHeaderShareContentFirst( "HeaderIsSharedFirst" ), sHeaderTextFirst( "HeaderTextFirst" ), sHeaderTextLeft( RTL_CONSTASCII_USTRINGPARAM( "HeaderTextLeft" ) ), + sFirstShareContent( "FirstIsShared" ), sFooterText( RTL_CONSTASCII_USTRINGPARAM( "FooterText" ) ), sFooterOn( RTL_CONSTASCII_USTRINGPARAM( "FooterIsOn" ) ), sFooterShareContent( RTL_CONSTASCII_USTRINGPARAM( "FooterIsShared" ) ), - sFooterShareContentFirst( "FooterIsSharedFirst" ), sFooterTextFirst( "FooterTextFirst" ), sFooterTextLeft( RTL_CONSTASCII_USTRINGPARAM( "FooterTextLeft" ) ) { @@ -133,7 +132,7 @@ void XMLTextMasterPageExport::exportMasterPageContent( sal_Bool bHeaderFirst = sal_False; if( bHeader ) { - aAny = rPropSet->getPropertyValue( sHeaderShareContentFirst ); + aAny = rPropSet->getPropertyValue( sFirstShareContent ); bHeaderFirst = !*(sal_Bool *)aAny.getValue(); } @@ -180,7 +179,7 @@ void XMLTextMasterPageExport::exportMasterPageContent( sal_Bool bFooterFirst = sal_False; if( bFooter ) { - aAny = rPropSet->getPropertyValue( sFooterShareContentFirst ); + aAny = rPropSet->getPropertyValue( sFirstShareContent ); bFooterFirst = !*(sal_Bool *)aAny.getValue(); } |