[Libreoffice-commits] .: xmloff/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 2 07:08:56 PDT 2012
xmloff/source/text/XMLTextMasterPageExport.cxx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit d92345561c998f7382cf9ef0fdcd29096f978435
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 2 14:41:59 2012 +0100
don't blow up on .odt export with !hasValue footers/headers
Change-Id: I2507c23b7b17b9172f720548d32cdfe299d4fa20
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
index a449f92..ab7f854 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -127,20 +127,21 @@ void XMLTextMasterPageExport::exportMasterPageContent(
else
{
aAny = rPropSet->getPropertyValue( sHeaderOn );
- sal_Bool bHeader = *(sal_Bool *)aAny.getValue();
+ sal_Bool bHeader = sal_False;
+ aAny >>= bHeader;
sal_Bool bHeaderFirst = sal_False;
if( bHeader )
{
aAny = rPropSet->getPropertyValue( sFirstShareContent );
- bHeaderFirst = !*(sal_Bool *)aAny.getValue();
+ aAny >>= bHeaderFirst;
}
sal_Bool bHeaderLeft = sal_False;
if( bHeader )
{
aAny = rPropSet->getPropertyValue( sHeaderShareContent );
- bHeaderLeft = !*(sal_Bool *)aAny.getValue();
+ aAny >>= bHeaderLeft;
}
if( xHeaderText.is() )
@@ -174,20 +175,21 @@ void XMLTextMasterPageExport::exportMasterPageContent(
}
aAny = rPropSet->getPropertyValue( sFooterOn );
- sal_Bool bFooter = *(sal_Bool *)aAny.getValue();
+ sal_Bool bFooter = sal_False;
+ aAny >>= bFooter;
sal_Bool bFooterFirst = sal_False;
if( bFooter )
{
aAny = rPropSet->getPropertyValue( sFirstShareContent );
- bFooterFirst = !*(sal_Bool *)aAny.getValue();
+ aAny >>= bFooterFirst;
}
sal_Bool bFooterLeft = sal_False;
if( bFooter )
{
aAny = rPropSet->getPropertyValue( sFooterShareContent );
- bFooterLeft = !*(sal_Bool *)aAny.getValue();
+ aAny >>= bFooterLeft;
}
if( xFooterText.is() )
More information about the Libreoffice-commits
mailing list