Kaydet (Commit) 71248cad authored tarafından David Tardon's avatar David Tardon

the copy ctor can take const ref

Change-Id: I4ef23f084d918dbf8227610f64bb7c38680e377a
üst 331c4102
...@@ -945,11 +945,11 @@ struct PPTCharPropSet ...@@ -945,11 +945,11 @@ struct PPTCharPropSet
void SetColor( sal_uInt32 nColor ); void SetColor( sal_uInt32 nColor );
explicit PPTCharPropSet( sal_uInt32 nParagraph ); explicit PPTCharPropSet( sal_uInt32 nParagraph );
PPTCharPropSet( PPTCharPropSet& rCharPropSet ); PPTCharPropSet( const PPTCharPropSet& rCharPropSet );
PPTCharPropSet( PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph ); PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph );
~PPTCharPropSet(); ~PPTCharPropSet();
PPTCharPropSet& operator=( PPTCharPropSet& rCharPropSet ); PPTCharPropSet& operator=( const PPTCharPropSet& rCharPropSet );
private: private:
void ImplMakeUnique(); void ImplMakeUnique();
...@@ -1106,12 +1106,12 @@ public: ...@@ -1106,12 +1106,12 @@ public:
PPTPortionObj( const PPTStyleSheet&, sal_uInt32 nInstance, sal_uInt32 nDepth ); PPTPortionObj( const PPTStyleSheet&, sal_uInt32 nInstance, sal_uInt32 nDepth );
PPTPortionObj( PPTPortionObj(
PPTCharPropSet&, const PPTCharPropSet&,
const PPTStyleSheet&, const PPTStyleSheet&,
sal_uInt32 nInstance, sal_uInt32 nInstance,
sal_uInt32 nDepth sal_uInt32 nDepth
); );
PPTPortionObj( PPTPortionObj& ); PPTPortionObj( const PPTPortionObj& );
~PPTPortionObj(); ~PPTPortionObj();
// the following function should be removed during next full update // the following function should be removed during next full update
......
...@@ -4323,7 +4323,7 @@ PPTCharPropSet::PPTCharPropSet( sal_uInt32 nParagraph ) : ...@@ -4323,7 +4323,7 @@ PPTCharPropSet::PPTCharPropSet( sal_uInt32 nParagraph ) :
mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0; mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0;
} }
PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet ) PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet )
{ {
pCharSet = rCharPropSet.pCharSet; pCharSet = rCharPropSet.pCharSet;
pCharSet->mnRefCount++; pCharSet->mnRefCount++;
...@@ -4337,7 +4337,7 @@ PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet ) ...@@ -4337,7 +4337,7 @@ PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet )
mnLanguage[ 2 ] = rCharPropSet.mnLanguage[ 2 ]; mnLanguage[ 2 ] = rCharPropSet.mnLanguage[ 2 ];
} }
PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph ) PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph )
{ {
pCharSet = rCharPropSet.pCharSet; pCharSet = rCharPropSet.pCharSet;
pCharSet->mnRefCount++; pCharSet->mnRefCount++;
...@@ -4356,7 +4356,7 @@ PPTCharPropSet::~PPTCharPropSet() ...@@ -4356,7 +4356,7 @@ PPTCharPropSet::~PPTCharPropSet()
delete mpFieldItem; delete mpFieldItem;
} }
PPTCharPropSet& PPTCharPropSet::operator=( PPTCharPropSet& rCharPropSet ) PPTCharPropSet& PPTCharPropSet::operator=( const PPTCharPropSet& rCharPropSet )
{ {
if ( this != &rCharPropSet ) if ( this != &rCharPropSet )
{ {
...@@ -5247,7 +5247,7 @@ PPTPortionObj::PPTPortionObj( const PPTStyleSheet& rStyleSheet, sal_uInt32 nInst ...@@ -5247,7 +5247,7 @@ PPTPortionObj::PPTPortionObj( const PPTStyleSheet& rStyleSheet, sal_uInt32 nInst
{ {
} }
PPTPortionObj::PPTPortionObj( PPTCharPropSet& rCharPropSet, const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt32 nDepth ) : PPTPortionObj::PPTPortionObj( const PPTCharPropSet& rCharPropSet, const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt32 nDepth ) :
PPTCharPropSet ( rCharPropSet ), PPTCharPropSet ( rCharPropSet ),
mrStyleSheet ( rStyleSheet ), mrStyleSheet ( rStyleSheet ),
mnInstance ( nInstance ), mnInstance ( nInstance ),
...@@ -5255,7 +5255,7 @@ PPTPortionObj::PPTPortionObj( PPTCharPropSet& rCharPropSet, const PPTStyleSheet& ...@@ -5255,7 +5255,7 @@ PPTPortionObj::PPTPortionObj( PPTCharPropSet& rCharPropSet, const PPTStyleSheet&
{ {
} }
PPTPortionObj::PPTPortionObj( PPTPortionObj& rPortionObj ) : PPTPortionObj::PPTPortionObj( const PPTPortionObj& rPortionObj ) :
PPTCharPropSet ( rPortionObj ), PPTCharPropSet ( rPortionObj ),
mrStyleSheet ( rPortionObj.mrStyleSheet ), mrStyleSheet ( rPortionObj.mrStyleSheet ),
mnInstance ( rPortionObj.mnInstance ), mnInstance ( rPortionObj.mnInstance ),
......
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