diff options
Diffstat (limited to 'svx/source/fmcomp/fmgridif.cxx')
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 0b86ce9921..649a9f4fa1 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1919,9 +1919,9 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V sal_Bool bVoid = !Value.hasValue(); - if ( 0 == PropertyName.compareToAscii( FM_PROP_TEXTLINECOLOR ) ) + if ( 0 == PropertyName.compareTo( FM_PROP_TEXTLINECOLOR ) ) { - ::Color aTextLineColor(::comphelper::getINT32(Value)); + ::Color aTextLineColor( bVoid ? COL_TRANSPARENT : ::comphelper::getINT32( Value ) ); if (bVoid) { pGrid->SetTextLineColor(); @@ -1953,21 +1953,21 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V if (isDesignMode()) pGrid->Invalidate(); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONTEMPHASISMARK ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_FONTEMPHASISMARK ) ) { Font aGridFont = pGrid->GetControlFont(); sal_Int16 nValue = ::comphelper::getINT16(Value); aGridFont.SetEmphasisMark( nValue ); pGrid->SetControlFont( aGridFont ); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONTRELIEF ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_FONTRELIEF ) ) { Font aGridFont = pGrid->GetControlFont(); sal_Int16 nValue = ::comphelper::getINT16(Value); aGridFont.SetRelief( (FontRelief)nValue ); pGrid->SetControlFont( aGridFont ); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_HELPURL ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_HELPURL ) ) { String sHelpURL(::comphelper::getString(Value)); String sPattern; @@ -1978,11 +1978,11 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V pGrid->SetHelpId(sID.ToInt32()); } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_DISPLAYSYNCHRON ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_DISPLAYSYNCHRON ) ) { pGrid->setDisplaySynchron(::comphelper::getBOOL(Value)); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_CURSORCOLOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_CURSORCOLOR ) ) { if (bVoid) pGrid->SetCursorColor(COL_TRANSPARENT); @@ -1991,13 +1991,13 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V if (isDesignMode()) pGrid->Invalidate(); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_ALWAYSSHOWCURSOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_ALWAYSSHOWCURSOR ) ) { pGrid->EnablePermanentCursor(::comphelper::getBOOL(Value)); if (isDesignMode()) pGrid->Invalidate(); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONT ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_FONT ) ) { if ( bVoid ) pGrid->SetControlFont( Font() ); @@ -2031,7 +2031,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V } } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_BACKGROUNDCOLOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) ) { if ( bVoid ) { @@ -2044,7 +2044,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V pGrid->SetControlBackground( aColor ); } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_TEXTCOLOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_TEXTCOLOR ) ) { if ( bVoid ) { @@ -2057,7 +2057,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V pGrid->SetControlForeground( aColor ); } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_ROWHEIGHT ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_ROWHEIGHT ) ) { sal_Int32 nLogHeight(0); if (Value >>= nLogHeight) @@ -2070,17 +2070,17 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V else if (bVoid) pGrid->SetDataRowHeight(0); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_HASNAVIGATION ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_HASNAVIGATION ) ) { if (Value.getValueType() == ::getBooleanCppuType()) pGrid->EnableNavigationBar(*(sal_Bool*)Value.getValue()); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_RECORDMARKER ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_RECORDMARKER ) ) { if (Value.getValueType() == ::getBooleanCppuType()) pGrid->EnableHandle(*(sal_Bool*)Value.getValue()); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_ENABLED ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_ENABLED ) ) { if (Value.getValueType() == ::getBooleanCppuType()) { @@ -2134,37 +2134,37 @@ Any FmXGridPeer::getProperty( const ::rtl::OUString& _rPropertyName ) throw( Run FmGridControl* pGrid = (FmGridControl*) GetWindow(); Window* pDataWindow = &pGrid->GetDataWindow(); - if ( 0 == _rPropertyName.compareToAscii( FM_PROP_NAME ) ) + if ( 0 == _rPropertyName.compareTo( FM_PROP_NAME ) ) { Font aFont = pDataWindow->GetControlFont(); aProp <<= ImplCreateFontDescriptor( aFont ); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_TEXTCOLOR ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_TEXTCOLOR ) ) { aProp <<= (sal_Int32)pDataWindow->GetControlForeground().GetColor(); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_BACKGROUNDCOLOR ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) ) { aProp <<= (sal_Int32)pDataWindow->GetControlBackground().GetColor(); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_ROWHEIGHT ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_ROWHEIGHT ) ) { sal_Int32 nPixelHeight = pGrid->GetDataRowHeight(); // take the zoom factor into account nPixelHeight = pGrid->CalcReverseZoom(nPixelHeight); aProp <<= (sal_Int32)pGrid->PixelToLogic(Point(0,nPixelHeight),MAP_10TH_MM).Y(); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_HASNAVIGATION ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_HASNAVIGATION ) ) { sal_Bool bHasNavBar = pGrid->HasNavigationBar(); aProp <<= (sal_Bool)bHasNavBar; } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_RECORDMARKER ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_RECORDMARKER ) ) { sal_Bool bHasHandle = pGrid->HasHandle(); aProp <<= (sal_Bool)bHasHandle; } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_ENABLED ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_ENABLED ) ) { aProp <<= (sal_Bool)pDataWindow->IsEnabled(); } @@ -2948,7 +2948,7 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot) if (m_pDispatchers[i].is()) { // commit any changes done so far, if it's not the undoRecord URL - if ( 0 == pUrls->Complete.compareToAscii( FMURL_RECORD_UNDO ) || commit() ) + if ( 0 == pUrls->Complete.compareTo( FMURL_RECORD_UNDO ) || commit() ) m_pDispatchers[i]->dispatch(*pUrls, Sequence< PropertyValue>()); return 1; // handled |