diff options
Diffstat (limited to 'svx')
-rwxr-xr-x[-rw-r--r--] | svx/inc/svx/dialogs.hrc | 0 | ||||
-rw-r--r-- | svx/inc/svx/sdrmasterpagedescriptor.hxx | 3 | ||||
-rw-r--r-- | svx/inc/svx/svdpage.hxx | 1 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx | 18 | ||||
-rw-r--r-- | svx/source/svdraw/sdrmasterpagedescriptor.cxx | 23 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 12 | ||||
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 14 |
7 files changed, 50 insertions, 21 deletions
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index fd7561bb7192..fd7561bb7192 100644..100755 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc diff --git a/svx/inc/svx/sdrmasterpagedescriptor.hxx b/svx/inc/svx/sdrmasterpagedescriptor.hxx index 612f2ab927ec..3a31c3d11206 100644 --- a/svx/inc/svx/sdrmasterpagedescriptor.hxx +++ b/svx/inc/svx/sdrmasterpagedescriptor.hxx @@ -35,6 +35,7 @@ // predeclarations class SdrObject; class SfxItemSet; +class SdrPageProperties; namespace sdr { @@ -89,6 +90,8 @@ namespace sdr // operators sal_Bool operator==(const MasterPageDescriptor& rCandidate) const; sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const; + + const SdrPageProperties* getCorrectSdrPageProperties() const; }; } // end of namespace sdr diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx index c601fddef181..784598d7d544 100644 --- a/svx/inc/svx/svdpage.hxx +++ b/svx/inc/svx/svdpage.hxx @@ -448,6 +448,7 @@ private: public: SdrPageProperties& getSdrPageProperties() { return *mpSdrPageProperties; } const SdrPageProperties& getSdrPageProperties() const { return *mpSdrPageProperties; } + const SdrPageProperties* getCorrectSdrPageProperties() const; protected: // new MasterPageDescriptorVector diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx index cbe9c4a9c615..6ca5f1c4d172 100644 --- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx +++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx @@ -62,23 +62,7 @@ namespace sdr { drawinglayer::primitive2d::Primitive2DSequence xRetval; drawinglayer::attribute::SdrFillAttribute aFill; - const SdrPage* pCorrectPage = &GetMasterPageDescriptor().GetOwnerPage(); - const SdrPageProperties* pCorrectProperties = &pCorrectPage->getSdrPageProperties(); - - if(XFILL_NONE == ((const XFillStyleItem&)pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) - { - pCorrectPage = &GetMasterPageDescriptor().GetUsedPage(); - pCorrectProperties = &pCorrectPage->getSdrPageProperties(); - } - - if(pCorrectPage->IsMasterPage() && !pCorrectProperties->GetStyleSheet()) - { - // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets, - // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all - // MasterPages should have a StyleSheet excactly for this reason, but historically - // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others). - pCorrectProperties = 0; - } + const SdrPageProperties* pCorrectProperties = GetMasterPageDescriptor().getCorrectSdrPageProperties(); if(pCorrectProperties) { diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx index 67b2de8b693c..eb757a8ee41c 100644 --- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx +++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx @@ -113,6 +113,29 @@ namespace sdr || &maUsedPage != &rCandidate.maUsedPage || maVisibleLayers != rCandidate.maVisibleLayers); } + + const SdrPageProperties* MasterPageDescriptor::getCorrectSdrPageProperties() const + { + const SdrPage* pCorrectPage = &GetOwnerPage(); + const SdrPageProperties* pCorrectProperties = &pCorrectPage->getSdrPageProperties(); + + if(XFILL_NONE == ((const XFillStyleItem&)pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) + { + pCorrectPage = &GetUsedPage(); + pCorrectProperties = &pCorrectPage->getSdrPageProperties(); + } + + if(pCorrectPage->IsMasterPage() && !pCorrectProperties->GetStyleSheet()) + { + // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets, + // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all + // MasterPages should have a StyleSheet excactly for this reason, but historically + // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others). + pCorrectProperties = 0; + } + + return pCorrectProperties; + } } // end of namespace sdr ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 8da0b248f38b..592f41543132 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1979,6 +1979,18 @@ void SdrPage::ReplaceCommentByIndex(sal_uInt32 nIndex, const sdr::Comment& rNew) } } +const SdrPageProperties* SdrPage::getCorrectSdrPageProperties() const +{ + if(mpMasterPageDescriptor) + { + return mpMasterPageDescriptor->getCorrectSdrPageProperties(); + } + else + { + return &getSdrPageProperties(); + } +} + ////////////////////////////////////////////////////////////////////////////// // use new redirector instead of pPaintProc diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index b80be1076b7e..c58e86f77fc3 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -634,10 +634,16 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, { if( rSettings.mbExportOnlyBackground ) { - pTempBackgroundShape = new SdrRectObj(Rectangle(Point(0,0), pPage->GetSize())); - pTempBackgroundShape->SetMergedItemSet(pPage->getSdrPageProperties().GetItemSet()); - pTempBackgroundShape->SetMergedItem(XLineStyleItem(XLINE_NONE)); - aShapes.push_back(pTempBackgroundShape); + const SdrPageProperties* pCorrectProperties = pPage->getCorrectSdrPageProperties(); + + if(pCorrectProperties) + { + pTempBackgroundShape = new SdrRectObj(Rectangle(Point(0,0), pPage->GetSize())); + pTempBackgroundShape->SetMergedItemSet(pCorrectProperties->GetItemSet()); + pTempBackgroundShape->SetMergedItem(XLineStyleItem(XLINE_NONE)); + pTempBackgroundShape->NbcSetStyleSheet(pCorrectProperties->GetStyleSheet(), true); + aShapes.push_back(pTempBackgroundShape); + } } else { |