Kaydet (Commit) 17757784 authored tarafından Michael Stahl's avatar Michael Stahl

sw: prefix members of SwDrawModel

Change-Id: Ica69a3c94e674c12619ec0f5c849b8e82dff6090
üst d1e63af0
...@@ -26,13 +26,15 @@ class SwDocShell; ...@@ -26,13 +26,15 @@ class SwDocShell;
class SwDrawModel : public FmFormModel class SwDrawModel : public FmFormModel
{ {
SwDoc* pDoc; private:
SwDoc* m_pDoc;
public: public:
SwDrawModel( SwDoc* pDoc ); SwDrawModel( SwDoc* pDoc );
virtual ~SwDrawModel(); virtual ~SwDrawModel();
const SwDoc& GetDoc() const { return *pDoc; } const SwDoc& GetDoc() const { return *m_pDoc; }
SwDoc& GetDoc() { return *pDoc; } SwDoc& GetDoc() { return *m_pDoc; }
virtual SdrPage* AllocPage(bool bMasterPage) SAL_OVERRIDE; virtual SdrPage* AllocPage(bool bMasterPage) SAL_OVERRIDE;
......
...@@ -49,20 +49,20 @@ const OUString GetPalettePath() ...@@ -49,20 +49,20 @@ const OUString GetPalettePath()
return aPathOpt.GetPalettePath(); return aPathOpt.GetPalettePath();
} }
SwDrawModel::SwDrawModel( SwDoc* pD ) : SwDrawModel::SwDrawModel(SwDoc *const pDoc)
FmFormModel( ::GetPalettePath(), &pD->GetAttrPool(), : FmFormModel( ::GetPalettePath(), &pDoc->GetAttrPool(),
pD->GetDocShell(), true ), pDoc->GetDocShell(), true )
pDoc( pD ) , m_pDoc( pDoc )
{ {
SetScaleUnit( MAP_TWIP ); SetScaleUnit( MAP_TWIP );
SetSwapGraphics( true ); SetSwapGraphics( true );
// use common InitDrawModelAndDocShell which will set the associations as needed, // use common InitDrawModelAndDocShell which will set the associations as needed,
// including SvxColorTableItem with WhichID SID_COLOR_TABLE // including SvxColorTableItem with WhichID SID_COLOR_TABLE
InitDrawModelAndDocShell(pDoc ? pDoc->GetDocShell() : 0, this); InitDrawModelAndDocShell(m_pDoc ? m_pDoc->GetDocShell() : 0, this);
// copy all the default values to the SdrModel // copy all the default values to the SdrModel
SfxItemPool* pSdrPool = pD->GetAttrPool().GetSecondaryPool(); SfxItemPool* pSdrPool = pDoc->GetAttrPool().GetSecondaryPool();
if( pSdrPool ) if( pSdrPool )
{ {
const sal_uInt16 aWhichRanges[] = const sal_uInt16 aWhichRanges[] =
...@@ -72,7 +72,7 @@ SwDrawModel::SwDrawModel( SwDoc* pD ) : ...@@ -72,7 +72,7 @@ SwDrawModel::SwDrawModel( SwDoc* pD ) :
0 0
}; };
SfxItemPool& rDocPool = pD->GetAttrPool(); SfxItemPool& rDocPool = pDoc->GetAttrPool();
sal_uInt16 nEdtWhich, nSlotId; sal_uInt16 nEdtWhich, nSlotId;
const SfxPoolItem* pItem; const SfxPoolItem* pItem;
for( const sal_uInt16* pRangeArr = aWhichRanges; for( const sal_uInt16* pRangeArr = aWhichRanges;
...@@ -92,9 +92,10 @@ SwDrawModel::SwDrawModel( SwDoc* pD ) : ...@@ -92,9 +92,10 @@ SwDrawModel::SwDrawModel( SwDoc* pD ) :
} }
} }
SetForbiddenCharsTable( pD->GetDocumentSettingManager().getForbiddenCharacterTable() ); SetForbiddenCharsTable( pDoc->GetDocumentSettingManager().getForbiddenCharacterTable() );
// Implementation for asian compression // Implementation for asian compression
SetCharCompressType( static_cast<sal_uInt16>(pD->GetDocumentSettingManager().getCharacterCompressionType() )); SetCharCompressType( static_cast<sal_uInt16>(
pDoc->GetDocumentSettingManager().getCharacterCompressionType()));
} }
// Destructor // Destructor
...@@ -122,13 +123,13 @@ SdrPage* SwDrawModel::AllocPage(bool bMasterPage) ...@@ -122,13 +123,13 @@ SdrPage* SwDrawModel::AllocPage(bool bMasterPage)
uno::Reference<embed::XStorage> SwDrawModel::GetDocumentStorage() const uno::Reference<embed::XStorage> SwDrawModel::GetDocumentStorage() const
{ {
return pDoc->GetDocStorage(); return m_pDoc->GetDocStorage();
} }
SdrLayerID SwDrawModel::GetControlExportLayerId( const SdrObject & ) const SdrLayerID SwDrawModel::GetControlExportLayerId( const SdrObject & ) const
{ {
//for versions < 5.0, there was only Hell and Heaven //for versions < 5.0, there was only Hell and Heaven
return (SdrLayerID)pDoc->getIDocumentDrawModelAccess().GetHeavenId(); return static_cast<SdrLayerID>(m_pDoc->getIDocumentDrawModelAccess().GetHeavenId());
} }
uno::Reference< uno::XInterface > SwDrawModel::createUnoModel() uno::Reference< uno::XInterface > SwDrawModel::createUnoModel()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment