diff options
author | obo <obo@openoffice.org> | 2010-07-29 11:05:21 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-07-29 11:05:21 +0200 |
commit | 1542941a47340dcf707e8618571d0a7f399024b6 (patch) | |
tree | fd831209d2df9d412ac3c350c645170933544186 /vcl/source | |
parent | ba8c722c3f5d0edeb307dfa0691669b543672703 (diff) | |
parent | 325dec657f22b698dadc1253bbd13d8cfc40f14c (diff) |
CWS-TOOLING: integrate CWS vcl113
Diffstat (limited to 'vcl/source')
-rwxr-xr-x[-rw-r--r--] | vcl/source/control/edit.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 48 | ||||
-rw-r--r-- | vcl/source/gdi/metric.cxx | 46 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 44 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 31 | ||||
-rw-r--r-- | vcl/source/glyphs/gcach_ftyp.cxx | 3 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_layout.cxx | 14 | ||||
-rw-r--r-- | vcl/source/helper/strhelper.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 17 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 2 |
11 files changed, 188 insertions, 37 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index c0e7b352642c..786b190069c4 100644..100755 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2861,6 +2861,14 @@ Size Edit::CalcMinimumSize() const return aSize; } +Size Edit::GetMinimumEditSize() +{ + Window* pDefWin = ImplGetDefaultWindow(); + Edit aEdit( pDefWin, WB_BORDER ); + Size aSize( aEdit.CalcMinimumSize() ); + return aSize; +} + // ----------------------------------------------------------------------- Size Edit::GetOptimalSize(WindowSizeType eType) const diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 090aa2a84163..6c2b06783984 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -224,6 +224,42 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue, return TRUE; } +static void ImplUpdateSeparatorString( String& io_rText, + const String& rOldDecSep, const String& rNewDecSep, + const String& rOldThSep, const String& rNewThSep ) +{ + rtl::OUStringBuffer aBuf( io_rText.Len() ); + xub_StrLen nIndexDec = 0, nIndexTh = 0, nIndex = 0; + + const sal_Unicode* pBuffer = io_rText.GetBuffer(); + while( nIndex != STRING_NOTFOUND ) + { + nIndexDec = io_rText.Search( rOldDecSep, nIndex ); + nIndexTh = io_rText.Search( rOldThSep, nIndex ); + if( (nIndexTh != STRING_NOTFOUND && nIndexDec != STRING_NOTFOUND && nIndexTh < nIndexDec ) + || (nIndexTh != STRING_NOTFOUND && nIndexDec == STRING_NOTFOUND) + ) + { + aBuf.append( pBuffer + nIndex, nIndexTh - nIndex ); + aBuf.append( rNewThSep ); + nIndex = nIndexTh + rOldThSep.Len(); + } + else if( nIndexDec != STRING_NOTFOUND ) + { + aBuf.append( pBuffer + nIndex, nIndexDec - nIndex ); + aBuf.append( rNewDecSep ); + nIndex = nIndexDec + rOldDecSep.Len(); + } + else + { + aBuf.append( pBuffer + nIndex ); + nIndex = STRING_NOTFOUND; + } + } + + io_rText = aBuf.makeStringAndClear(); +} + static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDecSep, const String& rOldThSep, const String& rNewThSep, Edit* pEdit ) @@ -236,10 +272,7 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe BOOL bUpdateMode = pEdit->IsUpdateMode(); pEdit->SetUpdateMode( FALSE ); String aText = pEdit->GetText(); - if( bChangeDec ) - aText.SearchAndReplaceAll( rNewDecSep, rOldDecSep ); - if( bChangeTh ) - aText.SearchAndReplaceAll( rNewThSep, rOldThSep ); + ImplUpdateSeparatorString( aText, rOldDecSep, rNewDecSep, rOldThSep, rNewThSep ); pEdit->SetText( aText ); ComboBox* pCombo = dynamic_cast<ComboBox*>(pEdit); @@ -250,12 +283,11 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe for ( USHORT i=0; i < nEntryCount; i++ ) { aText = pCombo->GetEntry( i ); - if( bChangeDec ) - aText.SearchAndReplaceAll( rNewDecSep, rOldDecSep ); - if( bChangeTh ) - aText.SearchAndReplaceAll( rNewThSep, rOldThSep ); + void* pEntryData = pCombo->GetEntryData( i ); + ImplUpdateSeparatorString( aText, rOldDecSep, rNewDecSep, rOldThSep, rNewThSep ); pCombo->RemoveEntry( i ); pCombo->InsertEntry( aText, i ); + pCombo->SetEntryData( i, pEntryData ); } } if( bUpdateMode ) diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index 325146b6be8a..dffc7c82caf0 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -263,7 +263,8 @@ ImplFontCharMap::ImplFontCharMap( const CmapResult& rCR ) } } -static ImplFontCharMap* pDefaultImplFontCharMap = NULL; +static ImplFontCharMap* pDefaultUnicodeImplFontCharMap = NULL; +static ImplFontCharMap* pDefaultSymbolImplFontCharMap = NULL; static const sal_uInt32 aDefaultUnicodeRanges[] = {0x0020,0xD800, 0xE000,0xFFF0}; static const sal_uInt32 aDefaultSymbolRanges[] = {0x0020,0x0100, 0xF020,0xF100}; @@ -288,25 +289,42 @@ ImplFontCharMap::~ImplFontCharMap() // ----------------------------------------------------------------------- -ImplFontCharMap* ImplFontCharMap::GetDefaultMap( bool bSymbols) +namespace { - if( pDefaultImplFontCharMap ) - pDefaultImplFontCharMap->AddReference(); - else + ImplFontCharMap *GetDefaultUnicodeMap() { - const sal_uInt32* pRangeCodes = aDefaultUnicodeRanges; - int nCodesCount = sizeof(aDefaultUnicodeRanges) / sizeof(*pRangeCodes); - if( bSymbols ) + if( pDefaultUnicodeImplFontCharMap ) + pDefaultUnicodeImplFontCharMap->AddReference(); + else { - pRangeCodes = aDefaultSymbolRanges; - nCodesCount = sizeof(aDefaultSymbolRanges) / sizeof(*pRangeCodes); + const sal_uInt32* pRangeCodes = aDefaultUnicodeRanges; + int nCodesCount = sizeof(aDefaultUnicodeRanges) / sizeof(*pRangeCodes); + CmapResult aDefaultCR( false, pRangeCodes, nCodesCount/2 ); + pDefaultUnicodeImplFontCharMap = new ImplFontCharMap( aDefaultCR ); } - CmapResult aDefaultCR( bSymbols, pRangeCodes, nCodesCount/2 ); - pDefaultImplFontCharMap = new ImplFontCharMap( aDefaultCR ); + return pDefaultUnicodeImplFontCharMap; } - return pDefaultImplFontCharMap; + ImplFontCharMap *GetDefaultSymbolMap() + { + if( pDefaultSymbolImplFontCharMap ) + pDefaultSymbolImplFontCharMap->AddReference(); + else + { + const sal_uInt32* pRangeCodes = aDefaultSymbolRanges; + int nCodesCount = sizeof(aDefaultSymbolRanges) / sizeof(*pRangeCodes); + CmapResult aDefaultCR( true, pRangeCodes, nCodesCount/2 ); + pDefaultSymbolImplFontCharMap = new ImplFontCharMap( aDefaultCR ); + } + + return pDefaultSymbolImplFontCharMap; + } +} + +ImplFontCharMap* ImplFontCharMap::GetDefaultMap( bool bSymbols) +{ + return bSymbols ? GetDefaultSymbolMap() : GetDefaultUnicodeMap(); } // ----------------------------------------------------------------------- @@ -321,7 +339,7 @@ void ImplFontCharMap::AddReference() void ImplFontCharMap::DeReference() { if( --mnRefCount <= 0 ) - if( this != pDefaultImplFontCharMap ) + if( (this != pDefaultUnicodeImplFontCharMap) && (this != pDefaultSymbolImplFontCharMap) ) delete this; } diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index bf1cc2728bf1..c4185a77382e 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -1645,10 +1645,25 @@ ImplDevFontListData* ImplDevFontList::ImplFindBySubstFontAttr( const utl::FontNa pFoundData = ImplFindBySearchName( aSearchName ); if( pFoundData ) - break; + return pFoundData; } - return pFoundData; + // use known attributes from the configuration to find a matching substitute + const ULONG nSearchType = rFontAttr.Type; + if( nSearchType != 0 ) + { + const FontWeight eSearchWeight = rFontAttr.Weight; + const FontWidth eSearchWidth = rFontAttr.Width; + const FontItalic eSearchSlant = ITALIC_DONTKNOW; + const FontFamily eSearchFamily = FAMILY_DONTKNOW; + const String aSearchName; + pFoundData = ImplFindByAttributes( nSearchType, + eSearchWeight, eSearchWidth, eSearchFamily, eSearchSlant, aSearchName ); + if( pFoundData ) + return pFoundData; + } + + return NULL; } // ----------------------------------------------------------------------- @@ -6058,6 +6073,11 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay rtl::OUString aMissingCodes = aMissingCodeBuf.makeStringAndClear(); ImplFontSelectData aFontSelData = mpFontEntry->maFontSelData; + + ImplFontMetricData aOrigMetric( aFontSelData ); + // TODO: use cached metric in fontentry + mpGraphics->GetFontMetric( &aOrigMetric ); + // when device specific font substitution may have been performed for // the originally selected font then make sure that a fallback to that // font is performed first @@ -6102,7 +6122,27 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay } #endif + // TODO: try to get the metric data from the GFB's mpFontEntry + ImplFontMetricData aSubstituteMetric( aFontSelData ); pFallbackFont->mnSetFontFlags = mpGraphics->SetFont( &aFontSelData, nFallbackLevel ); + mpGraphics->GetFontMetric( &aSubstituteMetric, nFallbackLevel ); + + const long nOriginalHeight = aOrigMetric.mnAscent + aOrigMetric.mnDescent; + const long nSubstituteHeight = aSubstituteMetric.mnAscent + aSubstituteMetric.mnDescent; + // Too tall, shrink it a bit. Need a better calculation to include extra + // factors and any extra wriggle room we might have available? + // TODO: should we scale by max-ascent/max-descent instead of design height? + if( nSubstituteHeight > nOriginalHeight ) + { + const float fScale = nOriginalHeight / (float)nSubstituteHeight; + const float fOrigHeight = aFontSelData.mfExactHeight; + const int nOrigHeight = aFontSelData.mnHeight; + aFontSelData.mfExactHeight *= fScale; + aFontSelData.mnHeight = static_cast<int>(aFontSelData.mfExactHeight); + pFallbackFont->mnSetFontFlags = mpGraphics->SetFont( &aFontSelData, nFallbackLevel ); + aFontSelData.mnHeight = nOrigHeight; + aFontSelData.mfExactHeight = fOrigHeight; + } // create and add glyph fallback layout to multilayout rLayoutArgs.ResetPos(); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 191f8f26dc75..f6bd81ef1bea 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -150,6 +150,7 @@ public: typedef std::hash_map< rtl::OUString, size_t, rtl::OUStringHash > PropertyToIndexMap; typedef std::hash_map< rtl::OUString, ControlDependency, rtl::OUStringHash > ControlDependencyMap; + typedef std::hash_map< rtl::OUString, Sequence< sal_Bool >, rtl::OUStringHash > ChoiceDisableMap; boost::shared_ptr<Printer> mpPrinter; Sequence< PropertyValue > maUIOptions; @@ -158,6 +159,7 @@ public: PropertyToIndexMap maPropertyToIndex; Link maOptionChangeHdl; ControlDependencyMap maControlDependencies; + ChoiceDisableMap maChoiceDisableMap; sal_Bool mbFirstPage; sal_Bool mbLastPage; sal_Bool mbReversePageOrder; @@ -1299,6 +1301,7 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ bool bHaveProperty = false; rtl::OUString aPropName; vcl::ImplPrinterControllerData::ControlDependency aDep; + Sequence< sal_Bool > aChoicesDisabled; for( int n = 0; n < aOptProp.getLength(); n++ ) { const beans::PropertyValue& rEntry( aOptProp[ n ] ); @@ -1326,6 +1329,10 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ { rEntry.Value >>= aDep.mnDependsOnEntry; } + else if( rEntry.Name.equalsAscii( "ChoicesDisabled" ) ) + { + rEntry.Value >>= aChoicesDisabled; + } } if( bHaveProperty ) { @@ -1338,6 +1345,8 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ } if( aDep.maDependsOnName.getLength() > 0 ) mpImplData->maControlDependencies[ aPropName ] = aDep; + if( aChoicesDisabled.getLength() > 0 ) + mpImplData->maChoiceDisableMap[ aPropName ] = aChoicesDisabled; } } } @@ -1413,6 +1422,20 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co return bEnabled; } +bool PrinterController::isUIChoiceEnabled( const rtl::OUString& i_rProperty, sal_Int32 i_nValue ) const +{ + bool bEnabled = true; + ImplPrinterControllerData::ChoiceDisableMap::const_iterator it = + mpImplData->maChoiceDisableMap.find( i_rProperty ); + if(it != mpImplData->maChoiceDisableMap.end() ) + { + const Sequence< sal_Bool >& rDisabled( it->second ); + if( i_nValue >= 0 && i_nValue < rDisabled.getLength() ) + bEnabled = ! rDisabled[i_nValue]; + } + return bEnabled; +} + rtl::OUString PrinterController::getDependency( const rtl::OUString& i_rProperty ) const { rtl::OUString aDependency; @@ -1789,14 +1812,20 @@ Any PrinterOptionsHelper::getChoiceControlOpt( const rtl::OUString& i_rTitle, const Sequence< rtl::OUString >& i_rChoices, sal_Int32 i_nValue, const rtl::OUString& i_rType, + const Sequence< sal_Bool >& i_rDisabledChoices, const PrinterOptionsHelper::UIControlOptions& i_rControlOptions ) { UIControlOptions aOpt( i_rControlOptions ); sal_Int32 nUsed = aOpt.maAddProps.getLength(); - aOpt.maAddProps.realloc( nUsed + 1 ); + aOpt.maAddProps.realloc( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) ); aOpt.maAddProps[nUsed].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Choices" ) ); aOpt.maAddProps[nUsed].Value = makeAny( i_rChoices ); + if( i_rDisabledChoices.getLength() ) + { + aOpt.maAddProps[nUsed+1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ChoicesDisabled" ) ); + aOpt.maAddProps[nUsed+1].Value = makeAny( i_rDisabledChoices ); + } PropertyValue aVal; aVal.Name = i_rProperty; diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index ebdd59f517af..aeb928c46608 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -895,6 +895,9 @@ void FreetypeServerFont::SetFontOptions( const ImplFontOptions& rFontOptions) } } #endif + + if( mnPrioEmbedded <= 0 ) + mnLoadFlags |= FT_LOAD_NO_BITMAP; } // ----------------------------------------------------------------------- diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index ae7ec8246e33..9d7efc79400e 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -1003,13 +1003,13 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs) { if (mvGlyphs[i].IsClusterStart()) { - nOffset = fExtraPerCluster * nCluster; + nOffset = FRound( fExtraPerCluster * nCluster ); size_t nCharIndex = mvGlyph2Char[i]; mvCharDxs[nCharIndex] += nOffset; // adjust char dxs for rest of characters in cluster while (++nCharIndex < mvGlyph2Char.size()) { - int nChar2Base = (mvChar2BaseGlyph[nCharIndex] == -1)? -1 : mvChar2BaseGlyph[nCharIndex] & GLYPH_INDEX_MASK; + int nChar2Base = (mvChar2BaseGlyph[nCharIndex] == -1)? -1 : (int)(mvChar2BaseGlyph[nCharIndex] & GLYPH_INDEX_MASK); if (nChar2Base == -1 || nChar2Base == static_cast<int>(i)) mvCharDxs[nCharIndex] += nOffset; } @@ -1032,12 +1032,12 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs) Glyphs::iterator iGlyph = mvGlyphs.begin(); while (iGlyph != iLastGlyph) { - iGlyph->maLinearPos.X() = static_cast<float>(iGlyph->maLinearPos.X()) * fXFactor; + iGlyph->maLinearPos.X() = FRound( fXFactor * iGlyph->maLinearPos.X() ); ++iGlyph; } for (size_t i = 0; i < mvCharDxs.size(); i++) { - mvCharDxs[i] = fXFactor * static_cast<float>(mvCharDxs[i]); + mvCharDxs[i] = FRound( fXFactor * mvCharDxs[i] ); } } } @@ -1062,7 +1062,7 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt int nPrevClusterLastChar = -1; for (size_t i = 0; i < nChars; i++) { - int nChar2Base = (mvChar2BaseGlyph[i] == -1)? -1 : mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK; + int nChar2Base = (mvChar2BaseGlyph[i] == -1)? -1 : (int)(mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK); if ((nChar2Base > -1) && (nChar2Base != nPrevClusterGlyph)) { assert((nChar2Base > -1) && (nChar2Base < (signed)mvGlyphs.size())); @@ -1076,11 +1076,11 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt int nLastGlyph = nChar2Base; for (; j < nChars; j++) { - int nChar2BaseJ = (mvChar2BaseGlyph[j] == -1)? -1 : mvChar2BaseGlyph[j] & GLYPH_INDEX_MASK; + int nChar2BaseJ = (mvChar2BaseGlyph[j] == -1)? -1 : (int)(mvChar2BaseGlyph[j] & GLYPH_INDEX_MASK); assert((nChar2BaseJ >= -1) && (nChar2BaseJ < (signed)mvGlyphs.size())); if (nChar2BaseJ != -1 && mvGlyphs[nChar2BaseJ].IsClusterStart()) { - nLastGlyph = nChar2BaseJ + ((bRtl)? 1 : -1); + nLastGlyph = nChar2BaseJ + ((bRtl)? +1 : -1); nLastChar = j - 1; break; } diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index db622073cea9..67f50b69a182 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -365,8 +365,8 @@ String WhitespaceToSpace( const String& rLine, BOOL bProtect ) else { *pLeap = *pRun; - *pLeap++; - *pRun++; + ++pLeap; + ++pRun; } } } @@ -422,8 +422,8 @@ ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect ) else { *pLeap = *pRun; - *pLeap++; - *pRun++; + ++pLeap; + ++pRun; } } } diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 52f54db0e50e..4490bfb3dbeb 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1192,6 +1192,7 @@ void PrintDialog::setupOptionalUI() rtl::OUString aText; rtl::OUString aPropertyName; Sequence< rtl::OUString > aChoices; + Sequence< sal_Bool > aChoicesDisabled; Sequence< rtl::OUString > aHelpTexts; sal_Int64 nMinValue = 0, nMaxValue = 0; sal_Int32 nCurHelpText = 0; @@ -1215,6 +1216,10 @@ void PrintDialog::setupOptionalUI() { rEntry.Value >>= aChoices; } + else if( rEntry.Name.equalsAscii( "ChoicesDisabled" ) ) + { + rEntry.Value >>= aChoicesDisabled; + } else if( rEntry.Name.equalsAscii( "Property" ) ) { PropertyValue aVal; @@ -1497,6 +1502,8 @@ void PrintDialog::setupOptionalUI() pBtn->SetText( aChoices[m] ); pBtn->Check( m == nSelectVal ); pBtn->SetToggleHdl( LINK( this, PrintDialog, UIOption_RadioHdl ) ); + if( aChoicesDisabled.getLength() > m && aChoicesDisabled[m] == sal_True ) + pBtn->Enable( FALSE ); pBtn->Show(); maPropertyToWindowMap[ aPropertyName ].push_back( pBtn ); maControlToPropertyMap[pBtn] = aPropertyName; @@ -1821,6 +1828,16 @@ void PrintDialog::checkOptionalControlDependencies() } } + if( bShouldbeEnabled && dynamic_cast<RadioButton*>(it->first) ) + { + std::map< Window*, sal_Int32 >::const_iterator r_it = maControlToNumValMap.find( it->first ); + if( r_it != maControlToNumValMap.end() ) + { + bShouldbeEnabled = maPController->isUIChoiceEnabled( it->second, r_it->second ); + } + } + + bool bIsEnabled = it->first->IsEnabled(); // Enable does not do a change check first, so can be less cheap than expected if( bShouldbeEnabled != bIsEnabled ) diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 385dd241c770..ba4ab7984c52 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -320,6 +320,8 @@ void StatusBar::ImplFormat() nExtraWidth2 = 0; } nX = STATUSBAR_OFFSET_X; + if( ImplHasMirroredGraphics() && IsRTLEnabled() ) + nX += ImplGetSVData()->maNWFData.mnStatusBarLowerRightOffset; } pItem = mpItemList->First(); @@ -833,7 +835,7 @@ void StatusBar::Resize() { // Breite und Hoehe abfragen und merken Size aSize = GetOutputSizePixel(); - mnDX = aSize.Width(); + mnDX = aSize.Width() - ImplGetSVData()->maNWFData.mnStatusBarLowerRightOffset; mnDY = aSize.Height(); mnCalcHeight = mnDY; // subtract border diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index cde91a8dcd97..4de6c88490f6 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3451,6 +3451,8 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : NULL; String* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : NULL; + bHighlight = bHighlight && pItem->mbEnabled; + // Falls Rechteck ausserhalb des sichbaren Bereichs liegt if ( pItem->maRect.IsEmpty() ) return; |