[ooo-build-commit] Branch 'ooo/master' - 4 commits - i18npool/source sax/source tools/source vcl/source vcl/unx
Jan Holesovsky
kendy at kemper.freedesktop.org
Sat Sep 12 04:35:33 PDT 2009
i18npool/source/breakiterator/breakiteratorImpl.cxx | 9 +++
sax/source/expatwrap/saxwriter.cxx | 4 -
tools/source/fsys/urlobj.cxx | 2
vcl/source/app/svapp.cxx | 4 -
vcl/source/control/button.cxx | 13 +----
vcl/source/control/fixed.cxx | 14 +----
vcl/source/control/ilstbox.cxx | 17 ------
vcl/source/control/imgctrl.cxx | 8 ---
vcl/source/gdi/outdev3.cxx | 49 +++++++++++---------
vcl/source/gdi/wall.cxx | 2
vcl/source/glyphs/graphite_adaptors.cxx | 2
vcl/source/glyphs/graphite_cache.cxx | 2
vcl/source/glyphs/graphite_features.cxx | 2
vcl/source/glyphs/graphite_layout.cxx | 6 +-
vcl/source/glyphs/graphite_serverfont.cxx | 2
vcl/source/window/menu.cxx | 14 ++---
vcl/source/window/msgbox.cxx | 6 +-
vcl/source/window/toolbox.cxx | 2
vcl/source/window/toolbox2.cxx | 4 -
vcl/source/window/window.cxx | 12 ++++
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 7 --
vcl/unx/gtk/window/gtkframe.cxx | 2
vcl/unx/kde/salnativewidgets-kde.cxx | 7 --
23 files changed, 84 insertions(+), 106 deletions(-)
New commits:
commit d39ef5922ffa1d044066d1a11774afc92699201c
Author: Kurt Zenker <kz at openoffice.org>
Date: Fri Sep 11 18:55:06 2009 +0000
CWS-TOOLING: integrate CWS odff06
2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators
2009-09-06 19:30:43 +0200 er r275861 : warnings
2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart
2009-09-05 19:37:47 +0200 er r275848 : warnings
2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case
2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST
2009-09-03 03:34:03 +0200 er r275739 : warnings
2009-09-03 03:31:19 +0200 er r275738 : warnings
2009-09-03 03:16:46 +0200 er r275737 : warnings
2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL
2009-09-03 03:06:31 +0200 er r275735 : warnings
2009-09-03 03:00:30 +0200 er r275734 : warnings
2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge
2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk at 275331 (milestone: DEV300:m56)
2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value
2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed
2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description
2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina>
2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina>
2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma
2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue>
2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings
2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings
2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors
2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation
2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel
2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export
2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff
2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character.
2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao>
2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701
2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token
2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk at 272827 (milestone: DEV300:m50)
2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei>
2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ...
2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions
2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina>
2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina>
2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina>
2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina>
2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina>
2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified
2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index b66ebcf..6ddd4c4 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -267,7 +267,14 @@ static sal_Int32 SAL_CALL iterateCodePoints(const OUString& Text, sal_Int32 &nSt
nStartPos = nStartPos + inc < 0 ? -1 : Text.getLength();
} else {
ch = Text.iterateCodePoints(&nStartPos, inc);
- if (inc > 0) ch = Text.iterateCodePoints(&nStartPos, 0);
+ // Fix for #i80436#.
+ // erAck: 2009-06-30T21:52+0200 This logic looks somewhat
+ // suspicious as if it cures a symptom.. anyway, had to add
+ // nStartPos < Text.getLength() to silence the (correct) assertion
+ // in rtl_uString_iterateCodePoints() if Text was one character
+ // (codepoint) only, made up of a surrogate pair.
+ if (inc > 0 && nStartPos < Text.getLength())
+ ch = Text.iterateCodePoints(&nStartPos, 0);
}
return nStartPos;
}
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 63f8def..f208ee6 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -436,7 +436,7 @@ inline sal_Bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr,
OSL_ENSURE( nSurrogate != 0, "lone 2nd Unicode surrogate" );
nSurrogate = ( nSurrogate << 10 ) | ( c & 0x03ff );
- if( nSurrogate > 0x00010000 && nSurrogate <= 0x001FFFFF )
+ if( nSurrogate >= 0x00010000 && nSurrogate <= 0x0010FFFF )
{
sal_Int8 aBytes[] = { sal_Int8(0xF0 | ((nSurrogate >> 18) & 0x0F)),
sal_Int8(0x80 | ((nSurrogate >> 12) & 0x3F)),
@@ -864,7 +864,7 @@ inline sal_Int32 calcXMLByteLength( const sal_Unicode *pStr, sal_Int32 nStrLen,
{
// 2. surrogate: write as UTF-8 (if range is OK
nSurrogate = ( nSurrogate << 10 ) | ( c & 0x03ff );
- if( nSurrogate > 0x00010000 && nSurrogate <= 0x001FFFFF )
+ if( nSurrogate >= 0x00010000 && nSurrogate <= 0x0010FFFF )
nOutputLength += 4;
nSurrogate = 0;
}
commit 14c90efbc02c39c04208f4d876d3f424255f0f17
Author: Kurt Zenker <kz at openoffice.org>
Date: Fri Sep 11 11:51:21 2009 +0000
CWS-TOOLING: integrate CWS dv14
2009-09-10 15:16:32 +0200 sg r276035 : #160513# updated wfs scheme to accept ports
2009-09-10 07:41:47 +0200 dv r276019 : #i104942# Better renaming algorithmen
2009-08-31 13:41:11 +0200 dv r275604 : #160505# Setting APP1PRODUCTNAME must not overwrite APP1PRODUCTDEF
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 9442426..d32a5da 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -407,7 +407,7 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END]
{ "out", "out://", 0, true, false, false, false, false, false,
false, false },
{ "vnd.sun.star.wfs", "vnd.sun.star.wfs://", 0, true, false, false,
- false, true, false, true, false },
+ false, true, true, true, false },
{ "vnd.sun.star.hier", "vnd.sun.star.hier:", 0, true, false, false,
false, false, false, true, false },
{ "vim", "vim://", 0, true, true, false, true, false, false, true,
commit 4a935bb17c4ea801f074d3db303055fe216075a0
Author: Kurt Zenker <kz at openoffice.org>
Date: Fri Sep 11 11:10:31 2009 +0000
CWS-TOOLING: integrate CWS changehc
2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf
2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk at 275331 (milestone: DEV300:m56)
2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings
2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index b4a3b60..6d0869d 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -674,11 +674,11 @@ void Application::MergeSystemSettings( AllSettings& rSettings )
ImplSVData* pSVData = ImplGetSVData();
if ( !pSVData->maAppData.mbSettingsInit )
{
- pWindow->ImplGetFrame()->UpdateSettings( *pSVData->maAppData.mpSettings );
+ // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
pWindow->ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings );
pSVData->maAppData.mbSettingsInit = TRUE;
}
- pWindow->ImplGetFrame()->UpdateSettings( rSettings );
+ // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
pWindow->ImplUpdateGlobalSettings( rSettings, FALSE );
}
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 9bb7859..f72b602 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -420,10 +420,9 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
Image *pImage = &(mpButtonData->maImage);
BitmapEx *pBitmapEx = mpButtonData->mpBitmapEx;
- Color aBackCol;
- if( !!(mpButtonData->maImageHC) && ImplGetCurrentBackgroundColor( aBackCol ) )
+ if( !!(mpButtonData->maImageHC) )
{
- if( aBackCol.IsDark() )
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pImage = &(mpButtonData->maImageHC);
pBitmapEx = mpButtonData->mpBitmapExHC;
@@ -2375,14 +2374,10 @@ if ( bNativeOK == FALSE )
// check for HC mode
Image *pImage = &maImage;
- Color aBackCol;
- if( !!maImageHC && ImplGetCurrentBackgroundColor( aBackCol ) )
+ if( !!maImageHC )
{
- if( aBackCol.IsDark() )
+ if( rStyleSettings.GetHighContrastMode() )
pImage = &maImageHC;
- // #99902 no col transform required
- //if( aBackCol.IsBright() )
- // nStyle |= IMAGE_DRAW_COLORTRANSFORM;
}
Point aImagePos( aImageRect.TopLeft() );
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 9588718..3c53624 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -804,13 +804,10 @@ void FixedBitmap::ImplDraw( OutputDevice* pDev, ULONG /* nDrawFlags */,
USHORT nStyle = 0;
Bitmap* pBitmap = &maBitmap;
Color aCol;
- if( !!maBitmapHC && ImplGetCurrentBackgroundColor( aCol ) )
+ if( !!maBitmapHC )
{
- if( aCol.IsDark() )
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
pBitmap = &maBitmapHC;
- // #99902 no col transform required
- //if( aCol.IsBright() )
- // nStyle |= IMAGE_DRAW_COLORTRANSFORM;
}
if( nStyle & IMAGE_DRAW_COLORTRANSFORM )
@@ -1058,13 +1055,10 @@ void FixedImage::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
Image *pImage = &maImage;
Color aCol;
- if( !!maImageHC && ImplGetCurrentBackgroundColor( aCol ) )
+ if( !!maImageHC )
{
- if( aCol.IsDark() )
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
pImage = &maImageHC;
- // #99902 no col transform required
- //if( aCol.IsBright() )
- // nStyle |= IMAGE_DRAW_COLORTRANSFORM;
}
// Haben wir ueberhaupt ein Image
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index c5c21fa..79598a1 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2899,23 +2899,8 @@ void ImplWin::DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImageP
if( !!maImageHC )
{
- // determine backgroundcolor as done in Paint()
- Color aBackCol;
- if( IsEnabled() )
- {
- if( HasFocus() )
- aBackCol = GetSettings().GetStyleSettings().GetHighlightColor();
- else
- aBackCol = GetBackground().GetColor();
- }
- else // Disabled
- aBackCol = GetBackground().GetColor();
-
- if( aBackCol.IsDark() )
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
pImage = &maImageHC;
- // #99902 no col transform required
- //if( aBackCol.IsBright() )
- // nStyle |= IMAGE_DRAW_COLORTRANSFORM;
}
if ( !IsZoom() )
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index fa4ce94..b354f8e 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -93,14 +93,10 @@ void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
{
USHORT nStyle = 0;
BitmapEx* pBitmap = &maBmp;
- Color aCol;
- if( !!maBmpHC && ImplGetCurrentBackgroundColor( aCol ) )
+ if( !!maBmpHC )
{
- if( aCol.IsDark() )
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
pBitmap = &maBmpHC;
- // #99902 no col transform required
- //if( aCol.IsBright() )
- // nStyle |= IMAGE_DRAW_COLORTRANSFORM;
}
if ( !*pBitmap )
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index d1136fd..3bd6031 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -6782,26 +6782,28 @@ void OutputDevice::ImplDrawText( const Rectangle& rRect,
{
BOOL bHighContrastBlack = FALSE;
BOOL bHighContrastWhite = FALSE;
- Color aCol;
- if( IsBackground() )
- aCol = GetBackground().GetColor();
- else
- // best guess is the face color here
- // but it may be totally wrong. the background color
- // was typically already reset
- aCol = GetSettings().GetStyleSettings().GetFaceColor();
-
- bHighContrastBlack = aCol.IsDark();
- bHighContrastWhite = aCol.IsBright() && GetSettings().GetStyleSettings().GetHighContrastMode();
-
+ const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() );
+ if( rStyleSettings.GetHighContrastMode() )
+ {
+ Color aCol;
+ if( IsBackground() )
+ aCol = GetBackground().GetColor();
+ else
+ // best guess is the face color here
+ // but it may be totally wrong. the background color
+ // was typically already reset
+ aCol = rStyleSettings.GetFaceColor();
+
+ bHighContrastBlack = aCol.IsDark();
+ bHighContrastWhite = aCol.IsBright();
+ }
+
aOldTextColor = GetTextColor();
if ( IsTextFillColor() )
{
bRestoreFillColor = TRUE;
aOldTextFillColor = GetTextFillColor();
}
- else
- bRestoreFillColor = FALSE;
if( bHighContrastBlack )
SetTextColor( COL_GREEN );
else if( bHighContrastWhite )
@@ -6816,7 +6818,7 @@ void OutputDevice::ImplDrawText( const Rectangle& rRect,
aRect.Move( 1, 1 );
DrawText( aRect, rOrigStr, nStyle & ~TEXT_DRAW_DISABLE );
*/
- SetTextColor( GetSettings().GetStyleSettings().GetShadowColor() );
+ SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() );
}
}
@@ -7450,13 +7452,18 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
BOOL bRestoreFillColor;
BOOL bHighContrastBlack = FALSE;
BOOL bHighContrastWhite = FALSE;
- if( IsBackground() )
+ const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() );
+ if( rStyleSettings.GetHighContrastMode() )
{
- Wallpaper aWall = GetBackground();
- Color aCol = aWall.GetColor();
- bHighContrastBlack = aCol.IsDark();
- bHighContrastWhite = aCol.IsBright() && GetSettings().GetStyleSettings().GetHighContrastMode();
+ if( IsBackground() )
+ {
+ Wallpaper aWall = GetBackground();
+ Color aCol = aWall.GetColor();
+ bHighContrastBlack = aCol.IsDark();
+ bHighContrastWhite = aCol.IsBright();
+ }
}
+
aOldTextColor = GetTextColor();
if ( IsTextFillColor() )
{
@@ -7471,7 +7478,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
else if( bHighContrastWhite )
SetTextColor( COL_LIGHTGREEN );
else
- SetTextColor( GetSettings().GetStyleSettings().GetShadowColor() );
+ SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() );
DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText );
if ( !(GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_NOMNEMONICS) && !pVector )
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index f18bf46..d60d436 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -469,7 +469,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() const
g.SetStyle( GRADIENT_LINEAR );
g.SetStartColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
// no 'extreme' gradient when high contrast
- if( Application::GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+ if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
g.SetEndColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
else
g.SetEndColor( Application::GetSettings().GetStyleSettings().GetFaceGradientColor() );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ca80d1a..d68a252 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -557,7 +557,7 @@ public:
void DataChanged( const DataChangedEvent& rDCEvt );
- void SetImages( long nMaxHeight = 0 );
+ void SetImages( long nMaxHeight = 0, bool bForce = false );
void calcMinSize();
Size getMinSize();
@@ -591,7 +591,7 @@ void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt )
{
calcMinSize();
SetBackground();
- SetImages();
+ SetImages( 0, true);
}
}
@@ -625,7 +625,7 @@ Size DecoToolBox::getMinSize()
return maMinSize;
}
-void DecoToolBox::SetImages( long nMaxHeight )
+void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
{
long border = getMinSize().Height() - maImage.GetSizePixel().Height();
@@ -635,13 +635,13 @@ void DecoToolBox::SetImages( long nMaxHeight )
if( nMaxHeight < getMinSize().Height() )
nMaxHeight = getMinSize().Height();
- if( lastSize != nMaxHeight - border )
+ if( (lastSize != nMaxHeight - border) || bForce )
{
lastSize = nMaxHeight - border;
Color aEraseColor( 255, 255, 255, 255 );
BitmapEx aBmpExDst( maImage.GetBitmapEx() );
- BitmapEx aBmpExSrc( GetSettings().GetStyleSettings().GetMenuBarColor().IsDark() ?
+ BitmapEx aBmpExSrc( GetSettings().GetStyleSettings().GetHighContrastMode() ?
maImageHC.GetBitmapEx() : aBmpExDst );
aEraseColor.SetTransparency( 255 );
@@ -5066,7 +5066,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) :
aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP );
aCloser.InsertItem( IID_DOCUMENTCLOSE,
- GetSettings().GetStyleSettings().GetMenuBarColor().IsDark() ? aCloser.maImageHC : aCloser.maImage, 0 );
+ GetSettings().GetStyleSettings().GetHighContrastMode() ? aCloser.maImageHC : aCloser.maImage, 0 );
aCloser.SetSelectHdl( LINK( this, MenuBarWindow, CloserHdl ) );
aCloser.AddEventListener( LINK( this, MenuBarWindow, ToolboxEventHdl ) );
aCloser.SetQuickHelpText( IID_DOCUMENTCLOSE, XubString( ResId( SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr ) ) );
@@ -5707,7 +5707,7 @@ void MenuBarWindow::Paint( const Rectangle& )
// in high contrast mode draw a separating line on the lower edge
if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) &&
- GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+ GetSettings().GetStyleSettings().GetHighContrastMode() )
{
Push( PUSH_LINECOLOR | PUSH_MAPMODE );
SetLineColor( Color( COL_WHITE ) );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index e5dfb16..3fc21ff 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -500,7 +500,7 @@ void InfoBox::ImplInitInfoBoxData()
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
+ SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
InfoBox::GetStandardImageHC() : InfoBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_INFO)+1;
}
@@ -591,7 +591,7 @@ void ErrorBox::ImplInitErrorBoxData()
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
+ SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_ERROR)+1;
}
@@ -637,7 +637,7 @@ void QueryBox::ImplInitQueryBoxData()
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
+ SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_QUERY)+1;
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index ea27948..5f36ab1 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -397,7 +397,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp
Color startCol, endCol;
startCol = pThis->GetSettings().GetStyleSettings().GetFaceGradientColor();
endCol = pThis->GetSettings().GetStyleSettings().GetFaceColor();
- if( endCol.IsDark() )
+ if( pThis->GetSettings().GetStyleSettings().GetHighContrastMode() )
// no 'extreme' gradient when high contrast
startCol = endCol;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 16d4b42..23e0fa7 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -2413,10 +2413,10 @@ void ToolBox::ImplUpdateImageList()
{
if (mpData->mpImageListProvider != NULL)
{
- BOOL bIsDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
try
{
- ImageListType eType = bIsDark ? vcl::HIGHCONTRAST_YES : vcl::HIGHCONTRAST_NO;
+ ImageListType eType = bHC ? vcl::HIGHCONTRAST_YES : vcl::HIGHCONTRAST_NO;
if (eType != mpData->meImageListType)
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 2b14764..9d5b1cc 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -292,6 +292,13 @@ bool Window::ImplCheckUIFont( const Font& rFont )
void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
{
+ // reset high contrast to false, so the system can either update it
+ // or AutoDetectSystemHC can kick in (see below)
+ StyleSettings aTmpSt( rSettings.GetStyleSettings() );
+ aTmpSt.SetHighContrastMode( FALSE );
+ rSettings.SetStyleSettings( aTmpSt );
+ ImplGetFrame()->UpdateSettings( rSettings );
+
// Verify availability of the configured UI font, otherwise choose "Andale Sans UI"
String aUserInterfaceFont;
bool bUseSystemFont = rSettings.GetStyleSettings().GetUseSystemUIFonts();
@@ -472,7 +479,8 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
rSettings.SetStyleSettings( aStyleSettings );
- // #104427# auto detect HC mode ?
+ // auto detect HC mode; if the system already set it to "yes"
+ // (see above) then accept that
if( !rSettings.GetStyleSettings().GetHighContrastMode() )
{
sal_Bool bTmp = sal_False, bAutoHCMode = sal_True;
@@ -923,7 +931,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
! (nStyle & (WB_INTROWIN|WB_DEFAULTWIN))
)
{
- mpWindowImpl->mpFrame->UpdateSettings( *pSVData->maAppData.mpSettings );
+ // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings );
OutputDevice::SetSettings( *pSVData->maAppData.mpSettings );
pSVData->maAppData.mbSettingsInit = TRUE;
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index bad1e03..88e7f6a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3465,13 +3465,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// FIXME: need some way of fetching toolbar icon size.
// aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
- /* #i35482# do not override HC mode per force
- // #i59364# high contrast mode
- bool bHC = ( aStyleSet.GetFaceColor().IsDark() ||
- aStyleSet.GetWindowColor().IsDark() );
- aStyleSet.SetHighContrastMode( bHC );
- */
-
// finally update the collected settings
rSettings.SetStyleSettings( aStyleSet );
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index c043bdd..d34bf2d 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1123,7 +1123,7 @@ void GtkSalFrame::SetIcon( USHORT nIcon )
USHORT nIndex;
// Use high contrast icons where appropriate
- if( Application::GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+ if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
nOffsets[0] = SV_ICON_LARGE_HC_START;
nOffsets[1] = SV_ICON_SMALL_HC_START;
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 253c66b..e19c589 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -2036,13 +2036,6 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
// Scroll bar size
aStyleSettings.SetScrollBarSize( kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent ) );
- /* #i35482# do not override HC mode
- // #i59364# high contrast mode
- bool bHC = ( aStyleSettings.GetFaceColor().IsDark() ||
- aStyleSettings.GetWindowColor().IsDark() );
- aStyleSettings.SetHighContrastMode( bHC );
- */
-
rSettings.SetStyleSettings( aStyleSettings );
}
commit bcb3d0ed98355ed9f66b0c1e5db2983879caa5de
Author: Kurt Zenker <kz at openoffice.org>
Date: Thu Sep 10 22:38:33 2009 +0000
CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
diff --git a/vcl/source/glyphs/graphite_adaptors.cxx b/vcl/source/glyphs/graphite_adaptors.cxx
index 6733069..9b16318 100644
--- a/vcl/source/glyphs/graphite_adaptors.cxx
+++ b/vcl/source/glyphs/graphite_adaptors.cxx
@@ -47,7 +47,7 @@
#include <rtl/ustring.hxx>
#include <i18npool/mslangid.hxx>
// Platform
-#ifndef MSC
+#ifndef WNT
#include <saldisp.hxx>
#include <vcl/salgdi.hxx>
diff --git a/vcl/source/glyphs/graphite_cache.cxx b/vcl/source/glyphs/graphite_cache.cxx
index c1bca0f..8c514c6 100644
--- a/vcl/source/glyphs/graphite_cache.cxx
+++ b/vcl/source/glyphs/graphite_cache.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#ifdef MSC
+#ifdef WNT
#include <tools/svwin.h>
#include <svsys.h>
#endif
diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx
index dca3c20..48d3ad9 100644
--- a/vcl/source/glyphs/graphite_features.cxx
+++ b/vcl/source/glyphs/graphite_features.cxx
@@ -38,7 +38,7 @@
#include <sal/types.h>
-#ifdef MSC
+#ifdef WNT
#include <tools/svwin.h>
#include <svsys.h>
#endif
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 7759735..5e5f18c 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -54,7 +54,7 @@
#include <deque>
// Platform
-#ifdef MSC
+#ifdef WNT
#include <tools/svwin.h>
#include <svsys.h>
#endif
@@ -86,7 +86,7 @@
FILE * grLogFile = NULL;
FILE * grLog()
{
-#ifdef MSC
+#ifdef WNT
std::string logFileName(getenv("TEMP"));
logFileName.append("\\graphitelayout.log");
if (grLogFile == NULL) grLogFile = fopen(logFileName.c_str(),"w");
@@ -135,7 +135,7 @@ namespace
UErrorCode status = U_ZERO_ERROR;
UBiDi *ubidi = ubidi_openSized(charCount, 0, &status);
int limit = 0;
- ubidi_setPara(ubidi, buffer, charCount,
+ ubidi_setPara(ubidi, reinterpret_cast<const UChar *>(buffer), charCount,
(rtl)?UBIDI_DEFAULT_RTL:UBIDI_DEFAULT_LTR, NULL, &status);
UBiDiLevel level = 0;
ubidi_getLogicalRun(ubidi, 0, &limit, &level);
diff --git a/vcl/source/glyphs/graphite_serverfont.cxx b/vcl/source/glyphs/graphite_serverfont.cxx
index e8cd152..be424c9 100644
--- a/vcl/source/glyphs/graphite_serverfont.cxx
+++ b/vcl/source/glyphs/graphite_serverfont.cxx
@@ -45,7 +45,7 @@
#include "graphite_textsrc.hxx"
#include <vcl/graphite_serverfont.hxx>
-#ifndef MSC
+#ifndef WNT
//
// An implementation of the GraphiteLayout interface to enable Graphite enabled fonts to be used.
More information about the ooo-build-commit
mailing list