diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-12-15 20:46:34 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-12-27 16:51:27 +0100 |
commit | cb98c423bbdada017a687186a5c06def6cb6f7a2 (patch) | |
tree | 18228bb45f72ce8f90ec615841ced901ebeec8b8 /sc/source/ui/unoobj | |
parent | 4088208d731ac281c88a8854978b683aee477385 (diff) |
sal_uLong/sal_uIntPtr/sal_uInt16 to sal_uInt32
also avoid some explicit temporaries and group some checks.
Change-Id: I7795b208dde53fd383b8c75f72dd9f56429aea2b
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/datauno.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/editsrc.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 2 |
6 files changed, 10 insertions, 16 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 776a918b40da..df1de74049fb 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1598,7 +1598,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) ) { - sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); + const sal_uInt32 nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); if ( nId == SFX_HINT_DYING ) { ForgetCurrentAttrs(); @@ -9408,7 +9408,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) ) { - sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); + const sal_uInt32 nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = nullptr; // ungueltig geworden @@ -9471,8 +9471,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) ) { - sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); - if ( nId == SFX_HINT_DYING ) + if ( static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING ) pDocShell = nullptr; // ungueltig geworden } } @@ -9729,8 +9728,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi } else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) ) { - sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); - if ( nId == SFX_HINT_DYING ) + if ( static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING ) pDocShell = nullptr; // ungueltig geworden } } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 20932b4043e0..673055984fed 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2806,7 +2806,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); if ( pSimpleHint ) { - sal_uLong nId = pSimpleHint->GetId(); + const sal_uInt32 nId = pSimpleHint->GetId(); if ( nId ==SFX_HINT_DYING ) { m_pDocument = nullptr; diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index ab7486db7d02..70921f106245 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -991,13 +991,9 @@ ScFilterDescriptorBase::~ScFilterDescriptorBase() void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) { const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); - if ( pSimpleHint ) + if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING ) { - sal_uLong nId = pSimpleHint->GetId(); - if ( nId == SFX_HINT_DYING ) - { - pDocSh = nullptr; // invalid - } + pDocSh = nullptr; // invalid } } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 7a7b0644ef5e..2bdab211823f 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1063,7 +1063,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); if ( pSimpleHint ) { - sal_uLong nId = pSimpleHint->GetId(); + const sal_uInt32 nId = pSimpleHint->GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = nullptr; // has become invalid diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx index 219d74b7b559..d52b7730d522 100644 --- a/sc/source/ui/unoobj/editsrc.cxx +++ b/sc/source/ui/unoobj/editsrc.cxx @@ -202,7 +202,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) ) { - sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); + const sal_uInt32 nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = nullptr; // ungueltig geworden diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 1ea1215b1859..0578c1fb5242 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -1036,7 +1036,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) ) { - sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); + const sal_uInt32 nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = nullptr; // invalid now |