[Libreoffice-commits] core.git: 3 commits - include/svtools svtools/source sw/source vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Apr 29 07:24:56 PDT 2014
include/svtools/grfmgr.hxx | 2 ++
svtools/source/config/colorcfg.cxx | 2 +-
svtools/source/graphic/grfmgr.cxx | 20 ++++++++++++++++++--
sw/source/core/frmedt/fefly1.cxx | 7 ++++---
vcl/source/app/settings.cxx | 2 +-
5 files changed, 26 insertions(+), 7 deletions(-)
New commits:
commit 68075a61c28a5c72429f78776a822ed45fdcb4a7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 29 15:22:24 2014 +0100
Resolves: fdo#72142 darker default workspace color
Change-Id: I7fec37c5edd42d974bddb4abbecb0d2b3dd86f14
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index c0f7466..1cad3e8 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -418,7 +418,7 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry)
{
COL_WHITE, // DOCCOLOR
0xc0c0c0, // DOCBOUNDARIES
- 0x808080, // APPBACKGROUND
+ 0xA9A9A9, // APPBACKGROUND
0xc0c0c0, // OBJECTBOUNDARIES
0xc0c0c0, // TABLEBOUNDARIES
COL_BLACK, // FONTCOLOR
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index ff37b98..2c46385 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -707,7 +707,7 @@ void ImplStyleData::SetStandardStyles()
maWindowTextColor = Color( COL_BLACK );
maDialogColor = Color( COL_LIGHTGRAY );
maDialogTextColor = Color( COL_BLACK );
- maWorkspaceColor = Color( 0xF0, 0xF0, 0xF0 );
+ maWorkspaceColor = Color( 0xA9, 0xA9, 0xA9 );
maMonoColor = Color( COL_BLACK );
maFieldColor = Color( COL_WHITE );
maFieldTextColor = Color( COL_BLACK );
commit 62b0eaf37c08dd27244e77b8bc90c691b000ebd6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 29 14:17:11 2014 +0100
Related: fdo#50697 reset the cache timeout on GetGraphic
so the graphic gets swapped out Xms after the last use and not Xms after
initial creation regardless of if it got used a moment earlier.
Change-Id: I1458f307d090ecd8d8d031b545f23e78bf1bcb67
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index 3e1423a..251ee6d 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -299,6 +299,8 @@ private:
DECL_LINK( ImplAutoSwapOutHdl, void* );
+ void SVT_DLLPRIVATE ResetCacheTimeOut();
+
protected:
virtual void GraphicManagerDestroyed();
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 087d27b..a405ea7 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -744,10 +744,26 @@ void GraphicObject::StopAnimation( OutputDevice* pOut, long nExtraData )
mpSimpleCache->maGraphic.StopAnimation( pOut, nExtraData );
}
+void GraphicObject::ResetCacheTimeOut()
+{
+ if (mpSwapOutTimer)
+ {
+ mpSwapOutTimer->Stop();
+ mpSwapOutTimer->Start();
+ }
+}
+
const Graphic& GraphicObject::GetGraphic() const
{
- if( mbAutoSwapped )
- ( (GraphicObject*) this )->ImplAutoSwapIn();
+ GraphicObject *pThis = const_cast<GraphicObject*>(this);
+
+ if (mbAutoSwapped)
+ pThis->ImplAutoSwapIn();
+
+ //fdo#50697 If we've been asked to provide the graphic, then reset
+ //the cache timeout to start from now and not remain at the
+ //time of creation
+ pThis->ResetCacheTimeOut();
return maGraphic;
}
commit b25871da62facc20387ebfa2b908422578ca8ce9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 29 12:58:56 2014 +0100
fix crash found when exploring fdo#50697
Change-Id: Ie781c2534cb41104dd3d91d4370639e98baa8112
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 1b41d1e..d46ba5a 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -316,10 +316,11 @@ const SwFrmFmt* SwFEShell::IsFlyInFly()
aPoint.setX(aPoint.getX() - 1); //do not land in the fly!!
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
// determine text frame by left-top-corner of object
- pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), &aTmpPos, 0, false );
+ SwCntntNode *pNd = aPos.nNode.GetNode().GetCntntNode();
+ pTxtFrm = pNd ? pNd->getLayoutFrm(GetLayout(), &aTmpPos, 0, false) : NULL;
}
- const SwFrm *pTmp = ::FindAnchor( pTxtFrm, aTmpPos );
- const SwFlyFrm *pFly = pTmp->FindFlyFrm();
+ const SwFrm *pTmp = pTxtFrm ? ::FindAnchor(pTxtFrm, aTmpPos) : NULL;
+ const SwFlyFrm *pFly = pTmp ? pTmp->FindFlyFrm() : NULL;
if( pFly )
return pFly->GetFmt();
return NULL;
More information about the Libreoffice-commits
mailing list