summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-07-21 15:47:51 +0200
committerJens-Heiner Rechtien <hr@openoffice.org>2010-07-21 15:47:51 +0200
commitadf58b723264adf0e0d7c82ed84b0daa6e910c46 (patch)
treefd2c60f443020f524a9a44908b6675424a12d6df /svx
parentbc025b80d7f8e706f326c91f73b466015729ca7c (diff)
parentdec889ef086b6c870fc6d1591f6dd294f36b9e01 (diff)
CWS-TOOLING: integrate CWS impress193
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/sdrmasterpagedescriptor.hxx3
-rw-r--r--svx/inc/svx/svdpage.hxx1
-rw-r--r--svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx18
-rw-r--r--svx/source/svdraw/sdrmasterpagedescriptor.cxx23
-rw-r--r--svx/source/svdraw/svdpage.cxx12
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx14
6 files changed, 50 insertions, 21 deletions
diff --git a/svx/inc/svx/sdrmasterpagedescriptor.hxx b/svx/inc/svx/sdrmasterpagedescriptor.hxx
index 29446b8a22..1aef4e4bbf 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 435ab2fda1..c65c5eb5a6 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 1f6801f394..15a22cdaae 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 9d6ba449d0..e3f5f34845 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 f9dc3c313d..dcf1543adb 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 1c6a0a17eb..389db0454d 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
{