diff options
Diffstat (limited to 'xmloff/source/draw/sdxmlexp.cxx')
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 862326495a70..02f042569d83 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -119,7 +119,7 @@ class ImpXMLEXPPageMasterInfo public: ImpXMLEXPPageMasterInfo(const SdXMLExport& rExp, const Reference<XDrawPage>& xPage); - BOOL operator==(const ImpXMLEXPPageMasterInfo& rInfo) const; + sal_Bool operator==(const ImpXMLEXPPageMasterInfo& rInfo) const; void SetName(const OUString& rStr); const OUString& GetName() const { return msName; } @@ -189,7 +189,7 @@ ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMasterInfo( } } -BOOL ImpXMLEXPPageMasterInfo::operator==(const ImpXMLEXPPageMasterInfo& rInfo) const +sal_Bool ImpXMLEXPPageMasterInfo::operator==(const ImpXMLEXPPageMasterInfo& rInfo) const { return ((mnBorderBottom == rInfo.mnBorderBottom) && (mnBorderLeft == rInfo.mnBorderLeft) @@ -224,7 +224,7 @@ class ImpXMLAutoLayoutInfo public: ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf); - BOOL operator==(const ImpXMLAutoLayoutInfo& rInfo) const; + sal_Bool operator==(const ImpXMLAutoLayoutInfo& rInfo) const; sal_uInt16 GetLayoutType() const { return mnType; } sal_Int32 GetGapX() const { return mnGapX; } @@ -236,19 +236,19 @@ public: const Rectangle& GetTitleRectangle() const { return maTitleRect; } const Rectangle& GetPresRectangle() const { return maPresRect; } - static BOOL IsCreateNecessary(sal_uInt16 nTyp); + static sal_Bool IsCreateNecessary(sal_uInt16 nTyp); }; -BOOL ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp) +sal_Bool ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp) { if(nTyp == 5 /* AUTOLAYOUT_ORG */ || nTyp == 20 /* AUTOLAYOUT_NONE */ || nTyp >= IMP_AUTOLAYOUT_INFO_MAX) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } -BOOL ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const +sal_Bool ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const { return ((mnType == rInfo.mnType && mpPageMasterInfo == rInfo.mpPageMasterInfo)); @@ -428,8 +428,8 @@ SdXMLExport::SdXMLExport( mpPropertySetMapper(0L), mpPresPagePropsMapper(0L), mbIsDraw(bIsDraw), - mbFamilyGraphicUsed(FALSE), - mbFamilyPresentationUsed(FALSE), + mbFamilyGraphicUsed(sal_False), + mbFamilyPresentationUsed(sal_False), msZIndex( GetXMLToken(XML_ZINDEX) ), msEmptyPres( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), msModel( RTL_CONSTASCII_USTRINGPARAM("Model") ), @@ -824,7 +824,7 @@ void SdXMLExport::ImpWriteObjGraphicStyleInfos() aStEx.exportDefaultStyle( xDefaults, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef ); // write graphic family styles - aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef, FALSE, XML_STYLE_FAMILY_SD_GRAPHICS_ID); + aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef, sal_False, XML_STYLE_FAMILY_SD_GRAPHICS_ID); } } catch( lang::ServiceNotRegisteredException& ) @@ -853,7 +853,7 @@ void SdXMLExport::ImpPrepAutoLayoutInfos() } // prepare name creation - for(sal_Int32 nCnt = 0L; nCnt < mnDocDrawPageCount; nCnt++) + for (sal_Int32 nCnt = 0; nCnt < mnDocDrawPageCount; nCnt++) { Any aAny(mxDocDrawPages->getByIndex(nCnt)); Reference<XDrawPage> xDrawPage; @@ -867,10 +867,10 @@ void SdXMLExport::ImpPrepAutoLayoutInfos() } } -BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUString& rName) +sal_Bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUString& rName) { rName = OUString(); - BOOL bRetval(FALSE); + sal_Bool bRetval(sal_False); Reference <beans::XPropertySet> xPropSet(xPage, UNO_QUERY); if(xPropSet.is()) @@ -903,7 +903,7 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr // create entry and look for existance ImpXMLAutoLayoutInfo* pNew = new ImpXMLAutoLayoutInfo(nType, pInfo); - BOOL bDidExist(FALSE); + sal_Bool bDidExist(sal_False); for(sal_uInt32 nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->Count(); nCnt++) { @@ -911,7 +911,7 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr { delete pNew; pNew = mpAutoLayoutInfoList->GetObject(nCnt); - bDidExist = TRUE; + bDidExist = sal_True; } } @@ -926,7 +926,7 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr } rName = pNew->GetLayoutName(); - bRetval = TRUE; + bRetval = sal_True; } } } @@ -1207,11 +1207,11 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() Point aTmpPos(aPartPos); - for(sal_Int32 a = 0L; a < nRowCnt; a++) + for (sal_Int32 a = 0; a < nRowCnt; a++) { aTmpPos.X() = aPartPos.X(); - for(sal_Int32 b = 0L; b < nColCnt; b++) + for (sal_Int32 b = 0; b < nColCnt; b++) { Rectangle aTmpRect(aTmpPos, aPartSize); @@ -1416,7 +1416,7 @@ void SdXMLExport::ImpPrepPageMasterInfos() if(mnDocMasterPageCount) { // look for needed page-masters, create these - for(sal_Int32 nMPageId = 0L; nMPageId < mnDocMasterPageCount; nMPageId++) + for (sal_Int32 nMPageId = 0; nMPageId < mnDocMasterPageCount; nMPageId++) { Reference< XDrawPage > xMasterPage( mxDocMasterPages->getByIndex(nMPageId), UNO_QUERY ); ImpXMLEXPPageMasterInfo* pNewInfo = 0L; @@ -1841,7 +1841,7 @@ void SdXMLExport::ImpWritePresentationStyles() { if(IsImpress()) { - for(sal_Int32 nCnt = 0L; nCnt < mnDocMasterPageCount; nCnt++) + for (sal_Int32 nCnt = 0; nCnt < mnDocMasterPageCount; nCnt++) { Any aAny(mxDocMasterPages->getByIndex(nCnt)); Reference<container::XNamed> xNamed; @@ -1859,7 +1859,7 @@ void SdXMLExport::ImpWritePresentationStyles() aPrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("-")); aStEx.exportStyleFamily(xNamed->getName(), OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME)), - aMapperRef, FALSE, + aMapperRef, sal_False, XML_STYLE_FAMILY_SD_PRESENTATION_ID, &aPrefix); } } @@ -2272,7 +2272,7 @@ void SdXMLExport::exportPresentationSettings() ////////////////////////////////////////////////////////////////////////////// -void SdXMLExport::_ExportStyles(BOOL bUsed) +void SdXMLExport::_ExportStyles(sal_Bool bUsed) { GetPropertySetMapper()->SetAutoStyles( sal_False ); @@ -2282,7 +2282,9 @@ void SdXMLExport::_ExportStyles(BOOL bUsed) // write draw:style-name for object graphic-styles GetShapeExport()->ExportGraphicDefaults(); - GetShapeExport()->GetShapeTableExport()->exportTableStyles(); + // do not export in ODF 1.1 or older + if( getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) + GetShapeExport()->GetShapeTableExport()->exportTableStyles(); // write presentation styles ImpWritePresentationStyles(); @@ -2552,7 +2554,7 @@ void SdXMLExport::_ExportMasterStyles() } // export MasterPages in master-styles section - for(sal_Int32 nMPageId = 0L; nMPageId < mnDocMasterPageCount; nMPageId++) + for (sal_Int32 nMPageId = 0; nMPageId < mnDocMasterPageCount; nMPageId++) { Reference< XDrawPage > xMasterPage( mxDocMasterPages->getByIndex(nMPageId), UNO_QUERY ); if(xMasterPage.is()) |