[Libreoffice-commits] core.git: sd/qa sd/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Mar 7 06:11:15 UTC 2018
sd/qa/unit/import-tests.cxx | 4 +-
sd/source/core/EffectMigration.cxx | 2 -
sd/source/core/drawdoc4.cxx | 2 -
sd/source/filter/eppt/epptbase.hxx | 2 -
sd/source/filter/eppt/pptx-stylesheet.cxx | 13 +++----
sd/source/filter/html/htmlex.cxx | 10 ++---
sd/source/filter/html/pubdlg.cxx | 10 ++---
sd/source/filter/ppt/ppt97animations.cxx | 6 ++-
sd/source/filter/ppt/ppt97animations.hxx | 5 +-
sd/source/filter/ppt/pptin.cxx | 2 -
sd/source/filter/ppt/pptinanimations.cxx | 4 +-
sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx | 4 +-
sd/source/ui/accessibility/AccessibleSlideSorterView.cxx | 4 +-
sd/source/ui/animations/CustomAnimationDialog.cxx | 10 ++---
sd/source/ui/animations/motionpathtag.cxx | 2 -
sd/source/ui/dlg/copydlg.cxx | 6 +--
sd/source/ui/slideshow/slideshowimpl.cxx | 4 +-
sd/source/ui/slidesorter/shell/SlideSorterService.cxx | 8 ++--
sd/source/ui/slidesorter/view/SlideSorterView.cxx | 4 +-
sd/source/ui/slidesorter/view/SlsTheme.cxx | 22 ++++++-------
sd/source/ui/unoidl/unoobj.cxx | 2 -
21 files changed, 64 insertions(+), 62 deletions(-)
New commits:
commit 1a41c0711d10bcfa45c7cd7d56c1e7f0055fa310
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Mar 6 13:18:13 2018 +0200
use more Color in sd
Change-Id: Iefd544a70730dfb760b7a89ff697a86ab4fae685
Reviewed-on: https://gerrit.libreoffice.org/50818
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 4fcc325b2370..bc343af65ba5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -993,11 +993,11 @@ void SdImportTest::testBnc584721_4()
// Get first run of the paragraph
uno::Reference<text::XTextRange> xRun( getRunFromParagraph (0, xParagraph ) );
uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW );
- sal_Int32 nCharColor;
+ Color nCharColor;
xPropSet->getPropertyValue( "CharColor" ) >>= nCharColor;
// Color should be black
- CPPUNIT_ASSERT_EQUAL( sal_Int32(COL_BLACK), nCharColor );
+ CPPUNIT_ASSERT_EQUAL( COL_BLACK, nCharColor );
xDocShRef->DoClose();
}
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 62b10a680f23..59f60cb21323 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -1019,7 +1019,7 @@ void EffectMigration::SetDimPrevious( SvxShape* pShape, bool bDimPrevious )
Any aColor;
if( bDimPrevious )
- aColor <<= static_cast<sal_Int32>(COL_LIGHTGRAY);
+ aColor <<= COL_LIGHTGRAY;
sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->GetPage())->getMainSequence();
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 7fda9ef61e67..bf9686b5a777 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -550,7 +550,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
XHatch aNullHatch(aNullCol);
rISet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
- rISet.Put(XFillColorItem(OUString(), 0x00ccccff));
+ rISet.Put(XFillColorItem(OUString(), Color(0x00ccccff)));
vcl::Font aLatinFont, aCJKFont, aCTLFont;
diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx
index b47d1a44fb4a..76f45a490da4 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -229,7 +229,7 @@ struct PPTExCharLevel
sal_uInt16 mnAsianOrComplexFont;
sal_uInt16 mnFontHeight;
sal_uInt16 mnEscapement;
- sal_uInt32 mnFontColor;
+ Color mnFontColor;
};
struct PPTExCharSheet
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx
index e848deb77820..1dbd28ee8a11 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -102,8 +102,8 @@ void PPTExCharSheet::Write( SvStream& rSt, sal_uInt16 nLev, bool bSimpleText,
.WriteUInt16( rLev.mnFlags )
.WriteUInt16( rLev.mnFont );
- sal_uInt32 nFontColor = rLev.mnFontColor;
- if ( nFontColor == sal_uInt32(COL_AUTO) )
+ Color nFontColor = rLev.mnFontColor;
+ if ( nFontColor == COL_AUTO )
{
bool bIsDark = false;
css::uno::Any aAny;
@@ -111,12 +111,11 @@ void PPTExCharSheet::Write( SvStream& rSt, sal_uInt16 nLev, bool bSimpleText,
aAny >>= bIsDark;
nFontColor = bIsDark ? 0xffffff : 0x000000;
}
- nFontColor &= 0xffffff;
- nFontColor |= 0xfe000000;
+ nFontColor.SetTransparency(0xfe);
if ( bSimpleText )
{
rSt.WriteUInt16( rLev.mnFontHeight )
- .WriteUInt32( nFontColor );
+ .WriteUInt32( sal_uInt32(nFontColor) );
}
else
{
@@ -124,7 +123,7 @@ void PPTExCharSheet::Write( SvStream& rSt, sal_uInt16 nLev, bool bSimpleText,
.WriteUInt16( 0xffff ) // unknown
.WriteUInt16( 0xffff ) // unknown
.WriteUInt16( rLev.mnFontHeight )
- .WriteUInt32( nFontColor )
+ .WriteUInt32( sal_uInt32(nFontColor) )
.WriteUInt16( rLev.mnEscapement );
}
}
@@ -485,7 +484,7 @@ void PPTExStyleSheet::WriteTxCFStyleAtom( SvStream& rSt )
.WriteUInt16( nCharFlags )
.WriteInt32( -1 ) // ?
.WriteUInt16( rCharStyle.mnFontHeight )
- .WriteUInt32( rCharStyle.mnFontColor );
+ .WriteUInt32( sal_uInt32(rCharStyle.mnFontColor) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 6c6792d6c780..b9125a458b6f 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -510,35 +510,35 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams
{
sal_Int32 temp = 0;
pParams->Value >>= temp;
- maBackColor = temp;
+ maBackColor = Color(temp);
mbUserAttr = true;
}
else if ( pParams->Name == "TextColor" )
{
sal_Int32 temp = 0;
pParams->Value >>= temp;
- maTextColor = temp;
+ maTextColor = Color(temp);
mbUserAttr = true;
}
else if ( pParams->Name == "LinkColor" )
{
sal_Int32 temp = 0;
pParams->Value >>= temp;
- maLinkColor = temp;
+ maLinkColor = Color(temp);
mbUserAttr = true;
}
else if ( pParams->Name == "VLinkColor" )
{
sal_Int32 temp = 0;
pParams->Value >>= temp;
- maVLinkColor = temp;
+ maVLinkColor = Color(temp);
mbUserAttr = true;
}
else if ( pParams->Name == "ALinkColor" )
{
sal_Int32 temp = 0;
pParams->Value >>= temp;
- maALinkColor = temp;
+ maALinkColor = Color(temp);
mbUserAttr = true;
}
else if ( pParams->Name == "IsUseDocumentColors" )
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index b12f9de4314a..07a8e3913075 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -896,23 +896,23 @@ void SdPublishingDlg::GetParameterSequence( Sequence< PropertyValue >& rParams )
if( pPage6_User->IsChecked() )
{
aValue.Name = "BackColor";
- aValue.Value <<= static_cast<sal_Int32>(m_aBackColor.GetColor());
+ aValue.Value <<= m_aBackColor;
aProps.push_back( aValue );
aValue.Name = "TextColor";
- aValue.Value <<= static_cast<sal_Int32>(m_aTextColor.GetColor());
+ aValue.Value <<= m_aTextColor;
aProps.push_back( aValue );
aValue.Name = "LinkColor";
- aValue.Value <<= static_cast<sal_Int32>(m_aLinkColor.GetColor());
+ aValue.Value <<= m_aLinkColor;
aProps.push_back( aValue );
aValue.Name = "VLinkColor";
- aValue.Value <<= static_cast<sal_Int32>(m_aVLinkColor.GetColor());
+ aValue.Value <<= m_aVLinkColor;
aProps.push_back( aValue );
aValue.Name = "ALinkColor";
- aValue.Value <<= static_cast<sal_Int32>(m_aALinkColor.GetColor());
+ aValue.Value <<= m_aALinkColor;
aProps.push_back( aValue );
}
diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx
index 4fc1b11303d1..d90cf8d5ad49 100644
--- a/sd/source/filter/ppt/ppt97animations.cxx
+++ b/sd/source/filter/ppt/ppt97animations.cxx
@@ -35,7 +35,9 @@ using namespace ::com::sun::star;
void Ppt97AnimationInfoAtom::ReadStream( SvStream& rIn )
{
- rIn.ReadUInt32( nDimColor );
+ sal_uInt32 nTmp;
+ rIn.ReadUInt32( nTmp );
+ nDimColor = Color(nTmp);
rIn.ReadUInt32( nFlags );
rIn.ReadUInt32( nSoundRef );
rIn.ReadInt32( nDelayTime );
@@ -154,7 +156,7 @@ bool Ppt97Animation::GetSpecialTextIterationDelay( double& rfTextIterationDelay
return bRet;
}
-void Ppt97Animation::SetDimColor( sal_Int32 nDimColor )
+void Ppt97Animation::SetDimColor( Color nDimColor )
{
m_aAtom.nDimColor = nDimColor;
}
diff --git a/sd/source/filter/ppt/ppt97animations.hxx b/sd/source/filter/ppt/ppt97animations.hxx
index daa61ed6bbb0..d2c1c6eb25f6 100644
--- a/sd/source/filter/ppt/ppt97animations.hxx
+++ b/sd/source/filter/ppt/ppt97animations.hxx
@@ -22,6 +22,7 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
+#include <tools/color.hxx>
class SdrObject;
class Ppt97Animation;
@@ -33,7 +34,7 @@ class Ppt97AnimationInfoAtom
friend class Ppt97Animation;
//-- member
- sal_uInt32 nDimColor;
+ Color nDimColor;
sal_uInt32 nFlags; ///< 0x0004: time instead of click
sal_uInt32 nSoundRef;
sal_Int32 nDelayTime; ///< 1/1000 sec
@@ -101,7 +102,7 @@ public: //public methods
bool HasAnimateAssociatedShape() const;
//set methods
- void SetDimColor( sal_Int32 nDimColor );
+ void SetDimColor( Color nDimColor );
void SetSoundFileUrl( const OUString& rSoundFileUrl );
void SetAnimateAssociatedShape( bool bAnimate ); //true if the shape should be animated in addition to the text
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index c48f08287982..ff769a1b9280 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2622,7 +2622,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if( pAnimation->HasEffect() )
{
// translate color to RGB
- pAnimation->SetDimColor( MSO_CLR_ToColor(pAnimation->GetDimColor()).GetColor() );
+ pAnimation->SetDimColor( MSO_CLR_ToColor(pAnimation->GetDimColor()) );
// translate sound bits to file url
if( pAnimation->HasSoundEffect() )
pAnimation->SetSoundFileUrl( ReadSound( pAnimation->GetSoundRef() ) );
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 3c39ec67961f..033dd1a155b7 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -750,7 +750,7 @@ bool AnimationImporter::convertAnimationValue( oox::ppt::MS_AttributeNames eAttr
aColor.SetRed( static_cast<sal_uInt8>(lcl_gethex( aString[1] ) * 16 + lcl_gethex( aString[2] )) );
aColor.SetGreen( static_cast<sal_uInt8>(lcl_gethex( aString[3] ) * 16 + lcl_gethex( aString[4] )) );
aColor.SetBlue( static_cast<sal_uInt8>(lcl_gethex( aString[5] ) * 16 + lcl_gethex( aString[6] )) );
- rValue <<= static_cast<sal_Int32>(aColor.GetColor());
+ rValue <<= aColor;
bRet = true;
}
else if( aString.startsWith( "rgb(" ) )
@@ -761,7 +761,7 @@ bool AnimationImporter::convertAnimationValue( oox::ppt::MS_AttributeNames eAttr
aColor.SetRed( static_cast<sal_uInt8>(aString.getToken( 0, ',', index ).toInt32()) );
aColor.SetGreen( static_cast<sal_uInt8>(aString.getToken( 0, ',', index ).toInt32()) );
aColor.SetRed( static_cast<sal_uInt8>(aString.getToken( 0, ',', index ).toInt32()) );
- rValue <<= static_cast<sal_Int32>(aColor.GetColor());
+ rValue <<= aColor;
bRet = true;
}
else if( aString.startsWith( "hsl(" ) )
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index 756395796bcc..ce14321d615f 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -377,8 +377,8 @@ sal_Int32 SAL_CALL AccessibleSlideSorterObject::getForeground()
sal_Int32 SAL_CALL AccessibleSlideSorterObject::getBackground()
{
ThrowIfDisposed ();
- sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
- return static_cast<sal_Int32>(nColor);
+ Color nColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
+ return sal_Int32(nColor);
}
// XServiceInfo
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 6e9348f475ba..3dc31e340bce 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -487,8 +487,8 @@ sal_Int32 SAL_CALL AccessibleSlideSorterView::getForeground()
sal_Int32 SAL_CALL AccessibleSlideSorterView::getBackground()
{
ThrowIfDisposed();
- sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
- return static_cast<sal_Int32>(nColor);
+ Color nColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
+ return sal_Int32(nColor);
}
//===== XAccessibleSelection ==================================================
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index d0f4ca923a98..0b120188cad5 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -205,7 +205,7 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent
sal_Int32 nColor = 0;
rValue >>= nColor;
- mpControl->SelectEntry(static_cast<Color>(nColor));
+ mpControl->SelectEntry(Color(nColor));
}
IMPL_LINK_NOARG(ColorPropertyBox, OnSelect, SvxColorListBox&, void)
@@ -226,13 +226,13 @@ void ColorPropertyBox::setValue( const Any& rValue, const OUString& )
rValue >>= nColor;
mpControl->SetNoSelection();
- mpControl->SelectEntry(static_cast<Color>(nColor));
+ mpControl->SelectEntry(Color(nColor));
}
}
Any ColorPropertyBox::getValue()
{
- return makeAny( static_cast<sal_Int32>(mpControl->GetSelectEntryColor().GetRGBColor()) );
+ return makeAny( sal_Int32(mpControl->GetSelectEntryColor().GetRGBColor()) );
}
Control* ColorPropertyBox::getControl()
@@ -1148,7 +1148,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
{
sal_Int32 nColor = 0;
aDimColor >>= nColor;
- Color aColor(nColor);
+ Color aColor = Color(nColor);
mpCLBDimColor->SelectEntry(aColor);
}
else
@@ -1381,7 +1381,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
if( nPos == 1 )
{
Color aSelectedColor = mpCLBDimColor->GetSelectEntryColor();
- aDimColor <<= static_cast<sal_Int32>(aSelectedColor.GetRGBColor());
+ aDimColor <<= aSelectedColor.GetRGBColor();
}
if( (mpSet->getPropertyState( nHandleDimColor ) == STLPropertyState::Ambiguous) ||
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 17668e4f36c0..373f25149d87 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -332,7 +332,7 @@ MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, con
OUString aEmpty( "?" );
mpPathObj->SetMergedItem( XLineDashItem( aEmpty, aDash ) );
mpPathObj->SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) );
- mpPathObj->SetMergedItem( XLineColorItem(aEmpty, ::COL_GRAY) );
+ mpPathObj->SetMergedItem( XLineColorItem(aEmpty, COL_GRAY) );
mpPathObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_NONE ) );
::basegfx::B2DPolygon aStartArrow;
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index b5a69b709934..b65bde41f452 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -100,10 +100,10 @@ void CopyDlg::dispose()
rStr += OUString::number(m_pMtrFldHeight->GetValue());
rStr += OUString( TOKEN );
- rStr += OUString::number( m_pLbStartColor->GetSelectEntryColor().GetColor() );
+ rStr += OUString::number( sal_uInt32(m_pLbStartColor->GetSelectEntryColor()) );
rStr += OUString( TOKEN );
- rStr += OUString::number( m_pLbEndColor->GetSelectEntryColor().GetColor() );
+ rStr += OUString::number( sal_uInt32(m_pLbEndColor->GetSelectEntryColor()) );
m_pNumFldCopies.clear();
m_pBtnSetViewData.clear();
@@ -194,7 +194,7 @@ void CopyDlg::Reset()
}
else
{
- long nTmp;
+ sal_Int32 nTmp;
nTmp = static_cast<long>(aStr.getToken( 0, TOKEN ).toInt32());
m_pNumFldCopies->SetValue( nTmp );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 4ad0e1042cd6..dfc8aea0b021 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1413,7 +1413,7 @@ void SAL_CALL SlideshowImpl::blankScreen( sal_Int32 nColor )
if( mpShowWindow && mpSlideController )
{
- if( mpShowWindow->SetBlankMode( mpSlideController->getCurrentSlideIndex(), nColor ) )
+ if( mpShowWindow->SetBlankMode( mpSlideController->getCurrentSlideIndex(), Color(nColor) ) )
{
pause();
}
@@ -2105,7 +2105,7 @@ IMPL_LINK( SlideshowImpl, ContextMenuSelectHdl, Menu *, pMenu, bool )
if (aColorDlg.Execute() )
{
aColor = aColorDlg.GetColor();
- setPenColor(aColor.GetColor());
+ setPenColor(sal_Int32(aColor));
}
mbWasPaused = false;
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index aeb6110356fd..2ad22829365b 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -305,7 +305,7 @@ util::Color SAL_CALL SlideSorterService::getBackgroundColor()
return util::Color();
else
return util::Color(
- mpSlideSorter->GetProperties()->GetBackgroundColor().GetColor());
+ mpSlideSorter->GetProperties()->GetBackgroundColor());
}
void SAL_CALL SlideSorterService::setBackgroundColor (util::Color aBackgroundColor)
@@ -322,7 +322,7 @@ util::Color SAL_CALL SlideSorterService::getTextColor()
return util::Color();
else
return util::Color(
- mpSlideSorter->GetProperties()->GetTextColor().GetColor());
+ mpSlideSorter->GetProperties()->GetTextColor());
}
void SAL_CALL SlideSorterService::setTextColor (util::Color aTextColor)
@@ -339,7 +339,7 @@ util::Color SAL_CALL SlideSorterService::getSelectionColor()
return util::Color();
else
return util::Color(
- mpSlideSorter->GetProperties()->GetSelectionColor().GetColor());
+ mpSlideSorter->GetProperties()->GetSelectionColor());
}
void SAL_CALL SlideSorterService::setSelectionColor (util::Color aSelectionColor)
@@ -356,7 +356,7 @@ util::Color SAL_CALL SlideSorterService::getHighlightColor()
return util::Color();
else
return util::Color(
- mpSlideSorter->GetProperties()->GetHighlightColor().GetColor());
+ mpSlideSorter->GetProperties()->GetHighlightColor());
}
void SAL_CALL SlideSorterService::setHighlightColor (util::Color aHighlightColor)
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 529c51413a8a..1130b78daf79 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -633,9 +633,9 @@ void SlideSorterView::CompleteRedraw (
gFrameTimeSum += gFrameTimes[gFrameTimeIndex];
gFrameTimeIndex = (gFrameTimeIndex+1) % gFrameTimeCount;
- mrSlideSorter.GetContentWindow()->SetFillColor(COL_BLUE);
+ mrSlideSorter.GetContentWindow()->SetFillCOL_BLUE);
mrSlideSorter.GetContentWindow()->DrawRect(gFrameTimeBox);
- mrSlideSorter.GetContentWindow()->SetTextColor(COL_WHITE);
+ mrSlideSorter.GetContentWindow()->SetTextCOL_WHITE);
mrSlideSorter.GetContentWindow()->DrawText(
gFrameTimeBox,
OUString::number(1 / (gFrameTimeSum / gFrameTimeCount)),
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index a15c8c382e5e..72cf37190dba 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -32,8 +32,8 @@
namespace sd { namespace slidesorter { namespace view {
-const static Color Black = 0x000000;
-const static Color White = 0xffffff;
+const static Color Black = Color(0x000000);
+const static Color White = Color(0xffffff);
Color ChangeLuminance (Color aColor, const int nValue)
{
@@ -60,19 +60,19 @@ Color HGBAdapt (
}
Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties)
- : maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()),
+ : maBackgroundColor(rpProperties->GetBackgroundColor()),
maGradients(),
maIcons(),
maColor()
{
maColor.resize(ColorType_Size_);
maColor[Color_Background] = maBackgroundColor;
- maColor[Color_PageNumberDefault] = 0x0808080;
- maColor[Color_PageNumberHover] = 0x4c4c4c;
+ maColor[Color_PageNumberDefault] = Color(0x0808080);
+ maColor[Color_PageNumberHover] = Color(0x4c4c4c);
maColor[Color_PageNumberHighContrast] = White;
- maColor[Color_PageNumberBrightBackground] = 0x333333;
- maColor[Color_PageNumberDarkBackground] = 0xcccccc;
- maColor[Color_PreviewBorder] = 0x949599;
+ maColor[Color_PageNumberBrightBackground] = Color(0x333333);
+ maColor[Color_PageNumberDarkBackground] = Color(0xcccccc);
+ maColor[Color_PreviewBorder] = Color(0x949599);
Update(rpProperties);
}
@@ -80,7 +80,7 @@ Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties)
void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties)
{
// Set up colors.
- maBackgroundColor = rpProperties->GetBackgroundColor().GetColor();
+ maBackgroundColor = rpProperties->GetBackgroundColor();
maColor[Color_Background] = maBackgroundColor;
@@ -164,7 +164,7 @@ Color Theme::GetColor (const ColorType eType)
if (sal_uInt32(eType)<maColor.size())
return maColor[eType];
else
- return 0;
+ return Color(0);
}
Color Theme::GetGradientColor (
@@ -180,7 +180,7 @@ Color Theme::GetGradientColor (
case GradientColorClass::Fill1: return rDescriptor.maFillColor1;
case GradientColorClass::Fill2: return rDescriptor.maFillColor2;
}
- return 0;
+ return Color(0);
}
void Theme::SetGradient (
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index a3e841e34bbc..f5de241f5152 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -765,7 +765,7 @@ css::uno::Any SAL_CALL SdXShape::getPropertyValue( const OUString& PropertyName
aRet <<= EffectMigration::GetSoundOn( mpShape );
break;
case WID_BLUESCREEN:
- aRet <<= static_cast<sal_Int32>( pInfo?pInfo->maBlueScreen.GetColor():0x00ffffff );
+ aRet <<= pInfo ? pInfo->maBlueScreen : Color(0x00ffffff);
break;
case WID_VERB:
aRet <<= static_cast<sal_Int32>( pInfo?pInfo->mnVerb:0 );
More information about the Libreoffice-commits
mailing list