CWS-TOOLING: integrate CWS impress193

This commit is contained in:
Jens-Heiner Rechtien
2010-07-21 15:47:51 +02:00
7 changed files with 51 additions and 25 deletions

View File

@@ -280,10 +280,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewI
aLoadArgs = aArgs.getPropertyValues(); aLoadArgs = aArgs.getPropertyValues();
// load the doc into that frame // load the doc into that frame
::rtl::OUString sLoaderURL( rDoc.GetModel()->getURL() ); ::rtl::OUString sLoaderURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) );
if ( sLoaderURL.getLength() == 0 )
sLoaderURL = rDoc.GetFactory().GetFactoryURL();
Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW ); Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW );
xLoader->loadComponentFromURL( xLoader->loadComponentFromURL(
sLoaderURL, sLoaderURL,

View File

@@ -35,6 +35,7 @@
// predeclarations // predeclarations
class SdrObject; class SdrObject;
class SfxItemSet; class SfxItemSet;
class SdrPageProperties;
namespace sdr namespace sdr
{ {
@@ -89,6 +90,8 @@ namespace sdr
// operators // operators
sal_Bool operator==(const MasterPageDescriptor& rCandidate) const; sal_Bool operator==(const MasterPageDescriptor& rCandidate) const;
sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const; sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const;
const SdrPageProperties* getCorrectSdrPageProperties() const;
}; };
} // end of namespace sdr } // end of namespace sdr

View File

@@ -448,6 +448,7 @@ private:
public: public:
SdrPageProperties& getSdrPageProperties() { return *mpSdrPageProperties; } SdrPageProperties& getSdrPageProperties() { return *mpSdrPageProperties; }
const SdrPageProperties& getSdrPageProperties() const { return *mpSdrPageProperties; } const SdrPageProperties& getSdrPageProperties() const { return *mpSdrPageProperties; }
const SdrPageProperties* getCorrectSdrPageProperties() const;
protected: protected:
// new MasterPageDescriptorVector // new MasterPageDescriptorVector

View File

@@ -62,23 +62,7 @@ namespace sdr
{ {
drawinglayer::primitive2d::Primitive2DSequence xRetval; drawinglayer::primitive2d::Primitive2DSequence xRetval;
drawinglayer::attribute::SdrFillAttribute aFill; drawinglayer::attribute::SdrFillAttribute aFill;
const SdrPage* pCorrectPage = &GetMasterPageDescriptor().GetOwnerPage(); const SdrPageProperties* pCorrectProperties = GetMasterPageDescriptor().getCorrectSdrPageProperties();
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;
}
if(pCorrectProperties) if(pCorrectProperties)
{ {

View File

@@ -113,6 +113,29 @@ namespace sdr
|| &maUsedPage != &rCandidate.maUsedPage || &maUsedPage != &rCandidate.maUsedPage
|| maVisibleLayers != rCandidate.maVisibleLayers); || 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 } // end of namespace sdr
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@@ -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 // use new redirector instead of pPaintProc

View File

@@ -634,10 +634,16 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
{ {
if( rSettings.mbExportOnlyBackground ) if( rSettings.mbExportOnlyBackground )
{ {
pTempBackgroundShape = new SdrRectObj(Rectangle(Point(0,0), pPage->GetSize())); const SdrPageProperties* pCorrectProperties = pPage->getCorrectSdrPageProperties();
pTempBackgroundShape->SetMergedItemSet(pPage->getSdrPageProperties().GetItemSet());
pTempBackgroundShape->SetMergedItem(XLineStyleItem(XLINE_NONE)); if(pCorrectProperties)
aShapes.push_back(pTempBackgroundShape); {
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 else
{ {