summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/import-tests.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index a5be80b54a95..d955373ed503 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -727,7 +727,7 @@ void SdImportTest::testFdo71075()
uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqCnt(xSource->getDataSequences());
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Invalid Series count", static_cast<sal_Int32>(1), aSeqCnt.getLength());
uno::Reference< chart2::data::XDataSequence > xValueSeq( aSeqCnt[0]->getValues() );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Invalid Data count", static_cast<sal_Int32>(sizeof(values)/(sizeof(double))), xValueSeq->getData().getLength());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Invalid Data count", static_cast<sal_Int32>(SAL_N_ELEMENTS(values)), xValueSeq->getData().getLength());
uno::Reference< chart2::data::XNumericalDataSequence > xNumSeq( xValueSeq, uno::UNO_QUERY );
uno::Sequence< double > aValues( xNumSeq->getNumericalData());
for(sal_Int32 i=0;i<xValueSeq->getData().getLength();i++)
@@ -1358,7 +1358,7 @@ void SdImportTest::testTdf99729()
{
const char* filenames[] = { "/sd/qa/unit/data/odp/tdf99729-new.odp", "/sd/qa/unit/data/odp/tdf99729-legacy.odp" };
int nonwhitecounts[] = { 0, 0 };
- for (unsigned int i = 0; i < sizeof(filenames)/sizeof(filenames[0]); ++i)
+ for (unsigned int i = 0; i < SAL_N_ELEMENTS(filenames); ++i)
{
// 1st check for new behaviour - having AnchoredTextOverflowLegacy compatibility flag set to false in settings.xml
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(filenames[i]), ODP);
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 4d56ea0029b9..6174640dc8f5 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -925,7 +925,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
// these Slots are forbidden in other views for this document
if( mpDocSh )
{
- mpDocSh->SetSlotFilter( true, sizeof( pAllowed ) / sizeof( sal_uInt16 ), pAllowed );
+ mpDocSh->SetSlotFilter( true, SAL_N_ELEMENTS( pAllowed ), pAllowed );
mpDocSh->ApplySlotFilter();
}
@@ -2453,7 +2453,7 @@ void SAL_CALL SlideshowImpl::activate()
if( pDispatcher )
{
// filter all forbidden slots
- pDispatcher->SetSlotFilter( SfxSlotFilterState::ENABLED, sizeof(pAllowed) / sizeof(sal_uInt16), pAllowed );
+ pDispatcher->SetSlotFilter( SfxSlotFilterState::ENABLED, SAL_N_ELEMENTS(pAllowed), pAllowed );
}
if( getBindings() )