CWS-TOOLING: integrate CWS impress193
This commit is contained in:
@@ -280,10 +280,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewI
|
||||
aLoadArgs = aArgs.getPropertyValues();
|
||||
|
||||
// load the doc into that frame
|
||||
::rtl::OUString sLoaderURL( rDoc.GetModel()->getURL() );
|
||||
if ( sLoaderURL.getLength() == 0 )
|
||||
sLoaderURL = rDoc.GetFactory().GetFactoryURL();
|
||||
|
||||
::rtl::OUString sLoaderURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) );
|
||||
Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW );
|
||||
xLoader->loadComponentFromURL(
|
||||
sLoaderURL,
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -448,6 +448,7 @@ private:
|
||||
public:
|
||||
SdrPageProperties& getSdrPageProperties() { return *mpSdrPageProperties; }
|
||||
const SdrPageProperties& getSdrPageProperties() const { return *mpSdrPageProperties; }
|
||||
const SdrPageProperties* getCorrectSdrPageProperties() const;
|
||||
|
||||
protected:
|
||||
// new MasterPageDescriptorVector
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user