summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@Sun.COM>2010-05-27 15:51:49 +0200
committerArmin Le Grand <Armin.Le.Grand@Sun.COM>2010-05-27 15:51:49 +0200
commitcbf0f1e20af12690220bca53a7303a46a3f97818 (patch)
tree2ff6864d3d7ecb9c61c78ec4e8ae5bfe9b059794 /vcl/source/gdi
parentf02b283bb7a6264f33cbfc106ff8f93a19ad4d6f (diff)
parent8626c44b5da388deffa32d14bc36eef257868ba3 (diff)
aw081: rebased to m79
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/bitmap.cxx18
-rw-r--r--vcl/source/gdi/outdev3.cxx12
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rwxr-xr-xvcl/source/gdi/sallayout.cxx4
4 files changed, 32 insertions, 4 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 51c76b5a4626..074935086b0b 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -323,7 +323,23 @@ BOOL Bitmap::HasGreyPalette() const
BOOL bRet = FALSE;
if( 1 == nBitCount )
- bRet = TRUE;
+ {
+ BitmapReadAccess* pRAcc = ( (Bitmap*) this )->AcquireReadAccess();
+
+ if( pRAcc )
+ {
+ const BitmapColor& rCol0( pRAcc->GetPaletteColor( 0 ) );
+ const BitmapColor& rCol1( pRAcc->GetPaletteColor( 1 ) );
+ if( rCol0.GetRed() == rCol0.GetGreen() && rCol0.GetRed() == rCol0.GetBlue() &&
+ rCol1.GetRed() == rCol1.GetGreen() && rCol1.GetRed() == rCol1.GetBlue() )
+ {
+ bRet = TRUE;
+ }
+ ( (Bitmap*) this )->ReleaseAccess( pRAcc );
+ }
+ else
+ bRet = TRUE;
+ }
else if( 4 == nBitCount || 8 == nBitCount )
{
BitmapReadAccess* pRAcc = ( (Bitmap*) this )->AcquireReadAccess();
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 630e58a1f2bf..f4fcba72b0c2 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1672,6 +1672,18 @@ void ImplDevFontList::InitMatchData() const
}
}
+//----------------------------------------------------------------------------
+ImplDevFontListData* ImplDevFontList::ImplFindByLocale(com::sun::star::lang::Locale lc) const
+{
+ // get the default font for a specified locale
+ const DefaultFontConfiguration& rDefaults = *DefaultFontConfiguration::get();
+ String aDefault = rDefaults.getUserInterfaceFont( lc );
+ ImplDevFontListData* pFontData = ImplFindByTokenNames( aDefault );
+ if( pFontData )
+ return pFontData;
+ return 0;
+}
+
// -----------------------------------------------------------------------
ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 6a24775219d9..7ee5889ba532 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -11733,7 +11733,7 @@ sal_Int32 PDFWriterImpl::findRadioGroupWidget( const PDFWriter::RadioButtonWidge
m_aWidgets.back().m_nPage = m_nCurrentPage;
m_aWidgets.back().m_eType = PDFWriter::RadioButton;
m_aWidgets.back().m_nRadioGroup = rBtn.RadioGroup;
- m_aWidgets.back().m_nFlags |= 0x00008000;
+ m_aWidgets.back().m_nFlags |= 0x0000C000; // NoToggleToOff and Radio bits
createWidgetFieldName( sal_Int32(m_aWidgets.size()-1), rBtn );
}
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index bf462d1d8add..80ae3a3a8c7f 100755
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1800,8 +1800,8 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
int nRunStart, nRunEnd;
while (rArgs.GetNextRun(&nRunStart, &nRunEnd, &bRtl))
{
- if (bRtl) std::fill(vRtl.begin() + nRunStart - rArgs.mnMinCharPos,
- vRtl.begin() + nRunEnd - rArgs.mnMinCharPos, true);
+ if (bRtl) std::fill(vRtl.begin() + ( nRunStart - rArgs.mnMinCharPos ),
+ vRtl.begin() + ( nRunEnd - rArgs.mnMinCharPos ), true);
}
rArgs.ResetPos();