diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-25 18:41:51 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-27 05:21:45 +0000 |
commit | b1225d201f8c23c75e31e09a0f5e9ff838866776 (patch) | |
tree | bd95c0e51b324d239d55f6465ea017b895d6012a /sdext | |
parent | loplugin:singlevalfields in sd (diff) | |
download | core-b1225d201f8c23c75e31e09a0f5e9ff838866776.tar.gz core-b1225d201f8c23c75e31e09a0f5e9ff838866776.zip |
loplugin:singlevalfields in sdext
Change-Id: I9bf194fb58b3bd37071647a83a629b6782836890
Reviewed-on: https://gerrit.libreoffice.org/26659
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/tree/pdfiprocessor.cxx | 9 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/pdfiprocessor.hxx | 2 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterController.cxx | 6 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPaneContainer.cxx | 6 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPaneContainer.hxx | 1 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSprite.cxx | 3 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSprite.hxx | 1 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterTextView.cxx | 5 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterTextView.hxx | 2 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterToolBar.cxx | 47 |
10 files changed, 14 insertions, 68 deletions
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 2551bf41237d..69c9066008b7 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -68,7 +68,6 @@ namespace pdfi m_aIdToGC(), m_aGCToId(), m_aImages(), - m_eTextDirection( LrTb ), m_nPages(0), m_nNextZOrder( 1 ), m_xStatusIndicator( xStat ), @@ -706,13 +705,7 @@ void PDFIProcessor::sortElements( Element* pEle, bool bDeep ) aChildren.push_back( pEle->Children.front() ); pEle->Children.pop_front(); } - switch( m_eTextDirection ) - { - case LrTb: - default: - std::stable_sort( aChildren.begin(), aChildren.end(), lr_tb_sort ); - break; - } + std::stable_sort( aChildren.begin(), aChildren.end(), lr_tb_sort ); int nChildren = aChildren.size(); for( int i = 0; i < nChildren; i++ ) pEle->Children.push_back( aChildren[i] ); diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx index 21197bfa8233..672b3337d901 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx @@ -191,8 +191,6 @@ namespace pdfi ImageContainer m_aImages; - DocumentTextDirecion m_eTextDirection; - sal_Int32 m_nPages; sal_Int32 m_nNextZOrder; css::uno::Reference< diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index b90b396e7010..5a8235c7f868 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -744,12 +744,6 @@ void SAL_CALL PresenterController::notifyConfigurationChange ( { PresenterPaneContainer::SharedPaneDescriptor pDescriptor ( mpPaneContainer->FindPaneId(xPane->getResourceId())); - - // When there is a call out anchor location set then tell the - // window about it. - if (pDescriptor->mbHasCalloutAnchor) - pDescriptor->mxPane->SetCalloutAnchor( - pDescriptor->maCalloutAnchorLocation); } } else if (rEvent.ResourceId->isBoundTo(mxMainPaneId,AnchorBindingMode_INDIRECT)) diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx index 81be29358b03..d22616334b2f 100644 --- a/sdext/source/presenter/PresenterPaneContainer.cxx +++ b/sdext/source/presenter/PresenterPaneContainer.cxx @@ -95,7 +95,6 @@ void PresenterPaneContainer::PreparePane ( pDescriptor->maSpriteProvider = PaneDescriptor::SpriteProvider(); pDescriptor->mbIsSprite = false; pDescriptor->maCalloutAnchorLocation = awt::Point(-1,-1); - pDescriptor->mbHasCalloutAnchor = false; maPanes.push_back(pDescriptor); } @@ -135,11 +134,6 @@ PresenterPaneContainer::SharedPaneDescriptor pDescriptor->mxPane = rxPane; pDescriptor->mxPane->SetTitle(pDescriptor->msTitle); - // When there is a call out anchor location set then tell the - // window about it. - if (pDescriptor->mbHasCalloutAnchor) - pDescriptor->mxPane->SetCalloutAnchor(pDescriptor->maCalloutAnchorLocation); - if (xWindow.is()) xWindow->addEventListener(this); } diff --git a/sdext/source/presenter/PresenterPaneContainer.hxx b/sdext/source/presenter/PresenterPaneContainer.hxx index 84fb3b5daed6..7e7bc120bbbc 100644 --- a/sdext/source/presenter/PresenterPaneContainer.hxx +++ b/sdext/source/presenter/PresenterPaneContainer.hxx @@ -104,7 +104,6 @@ public: bool mbIsSprite; Activator maActivator; css::awt::Point maCalloutAnchorLocation; - bool mbHasCalloutAnchor; void SetActivationState (const bool bIsActive); }; diff --git a/sdext/source/presenter/PresenterSprite.cxx b/sdext/source/presenter/PresenterSprite.cxx index 4d3c03ea8f8a..d38fd58a8351 100644 --- a/sdext/source/presenter/PresenterSprite.cxx +++ b/sdext/source/presenter/PresenterSprite.cxx @@ -36,7 +36,6 @@ PresenterSprite::PresenterSprite() maSize(0,0), maLocation(0,0), mbIsVisible(false), - mnPriority(0), mnAlpha(1.0) { } @@ -143,7 +142,7 @@ void PresenterSprite::ProvideSprite() rendering::CompositeOperation::SOURCE) ); mxSprite->setAlpha(mnAlpha); - mxSprite->setPriority(mnPriority); + mxSprite->setPriority(0); if (mbIsVisible) mxSprite->show(); } diff --git a/sdext/source/presenter/PresenterSprite.hxx b/sdext/source/presenter/PresenterSprite.hxx index 7043f1896b9f..c73400fc7476 100644 --- a/sdext/source/presenter/PresenterSprite.hxx +++ b/sdext/source/presenter/PresenterSprite.hxx @@ -63,7 +63,6 @@ private: css::geometry::RealSize2D maSize; css::geometry::RealPoint2D maLocation; bool mbIsVisible; - double mnPriority; double mnAlpha; void ProvideSprite(); diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index 07a1294cde1d..8f40ebdc6c5c 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -66,7 +66,6 @@ PresenterTextView::PresenterTextView ( const Reference<rendering::XCanvas>& rxCanvas, const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator) : mxCanvas(rxCanvas), - mbDoOuput(true), mxBreakIterator(), mxScriptTypeDetector(), maLocation(0,0), @@ -80,7 +79,6 @@ PresenterTextView::PresenterTextView ( mnLeftOffset(0), mnTopOffset(0), mbIsFormatPending(false), - mnCharacterCount(-1), maTextChangeBroadcaster() { Reference<lang::XMultiComponentFactory> xFactory ( @@ -103,7 +101,6 @@ PresenterTextView::PresenterTextView ( void PresenterTextView::SetText (const Reference<text::XText>& rxText) { maParagraphs.clear(); - mnCharacterCount = -1; Reference<container::XEnumerationAccess> xParagraphAccess (rxText, UNO_QUERY); if ( ! xParagraphAccess.is()) @@ -291,8 +288,6 @@ void PresenterTextView::MoveCaret ( void PresenterTextView::Paint ( const css::awt::Rectangle& rUpdateBox) { - if ( ! mbDoOuput) - return; if ( ! mxCanvas.is()) return; if ( ! mpFont->PrepareFont(mxCanvas)) diff --git a/sdext/source/presenter/PresenterTextView.hxx b/sdext/source/presenter/PresenterTextView.hxx index 9a1da809b400..664d65eec71f 100644 --- a/sdext/source/presenter/PresenterTextView.hxx +++ b/sdext/source/presenter/PresenterTextView.hxx @@ -254,7 +254,6 @@ public: private: css::uno::Reference<css::rendering::XCanvas> mxCanvas; - bool mbDoOuput; css::uno::Reference<css::i18n::XBreakIterator> mxBreakIterator; css::uno::Reference<css::i18n::XScriptTypeDetector> mxScriptTypeDetector; css::geometry::RealPoint2D maLocation; @@ -265,7 +264,6 @@ private: double mnLeftOffset; double mnTopOffset; bool mbIsFormatPending; - sal_Int32 mnCharacterCount; ::std::function<void ()> maTextChangeBroadcaster; void RequestFormat(); diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index e8a8512e1030..a791386f0fda 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -264,11 +264,7 @@ namespace { { public: TimeFormatter(); - OUString FormatTime (const oslDateTime& rTime); - private: - bool mbIs24HourFormat; - bool mbIsAmPmFormat; - bool mbIsShowSeconds; + static OUString FormatTime (const oslDateTime& rTime); }; class TimeLabel : public Label @@ -306,7 +302,6 @@ namespace { const SharedElementMode& rpSelectedMode, const SharedElementMode& rpDisabledMode) override; private: - TimeFormatter maTimeFormatter; CurrentTimeLabel (const ::rtl::Reference<PresenterToolBar>& rpToolBar); virtual ~CurrentTimeLabel(); virtual void TimeHasChanged (const oslDateTime& rCurrentTime) override; @@ -1798,9 +1793,6 @@ geometry::RealRectangle2D Text::GetBoundingBox (const Reference<rendering::XCanv //===== TimeFormatter ========================================================= TimeFormatter::TimeFormatter() - : mbIs24HourFormat(true), - mbIsAmPmFormat(false), - mbIsShowSeconds(true) { } @@ -1812,11 +1804,7 @@ OUString TimeFormatter::FormatTime (const oslDateTime& rTime) const sal_Int32 nMinutes (sal::static_int_cast<sal_Int32>(rTime.Minutes)); const sal_Int32 nSeconds(sal::static_int_cast<sal_Int32>(rTime.Seconds)); // Hours - if (mbIs24HourFormat) - sText.append(OUString::number(nHours)); - else - sText.append(OUString::number( - sal::static_int_cast<sal_Int32>(nHours>12 ? nHours-12 : nHours))); + sText.append(OUString::number(nHours)); sText.append(":"); @@ -1827,21 +1815,11 @@ OUString TimeFormatter::FormatTime (const oslDateTime& rTime) sText.append(sMinutes); // Seconds - if (mbIsShowSeconds) - { - sText.append(":"); - const OUString sSeconds (OUString::number(nSeconds)); - if (sSeconds.getLength() == 1) - sText.append("0"); - sText.append(sSeconds); - } - if (mbIsAmPmFormat) - { - if (rTime.Hours < 12) - sText.append("am"); - else - sText.append("pm"); - } + sText.append(":"); + const OUString sSeconds (OUString::number(nSeconds)); + if (sSeconds.getLength() == 1) + sText.append("0"); + sText.append(sSeconds); return sText.makeStringAndClear(); } @@ -1881,14 +1859,13 @@ CurrentTimeLabel::~CurrentTimeLabel() CurrentTimeLabel::CurrentTimeLabel ( const ::rtl::Reference<PresenterToolBar>& rpToolBar) - : TimeLabel(rpToolBar), - maTimeFormatter() + : TimeLabel(rpToolBar) { } void CurrentTimeLabel::TimeHasChanged (const oslDateTime& rCurrentTime) { - SetText(maTimeFormatter.FormatTime(rCurrentTime)); + SetText(TimeFormatter::FormatTime(rCurrentTime)); Invalidate(false); } @@ -1899,7 +1876,7 @@ void CurrentTimeLabel::SetModes ( const SharedElementMode& rpDisabledMode) { TimeLabel::SetModes(rpNormalMode, rpMouseOverMode, rpSelectedMode, rpDisabledMode); - SetText(maTimeFormatter.FormatTime(PresenterClockTimer::GetCurrentTime())); + SetText(TimeFormatter::FormatTime(PresenterClockTimer::GetCurrentTime())); } //===== PresentationTimeLabel ================================================= @@ -1956,7 +1933,7 @@ void PresentationTimeLabel::TimeHasChanged (const oslDateTime& rCurrentTime) oslDateTime aElapsedDateTime; if (osl_getDateTimeFromTimeValue(&aElapsedTimeValue, &aElapsedDateTime)) { - SetText(maTimeFormatter.FormatTime(aElapsedDateTime)); + SetText(TimeFormatter::FormatTime(aElapsedDateTime)); Invalidate(false); } } @@ -1973,7 +1950,7 @@ void PresentationTimeLabel::SetModes ( oslDateTime aStartDateTime; if (osl_getDateTimeFromTimeValue(&maStartTimeValue, &aStartDateTime)) { - SetText(maTimeFormatter.FormatTime(aStartDateTime)); + SetText(TimeFormatter::FormatTime(aStartDateTime)); } } |