cui/source/tabpages/border.cxx | 1 + svtools/source/control/ctrlbox.cxx | 5 +++++ vcl/generic/app/gensys.cxx | 8 ++++---- vcl/source/control/edit.cxx | 2 +- vcl/source/control/field.cxx | 2 +- vcl/source/control/field2.cxx | 2 +- vcl/source/control/longcurr.cxx | 2 +- vcl/source/gdi/pdfwriter_impl.cxx | 12 ++++++------ vcl/unx/generic/printer/ppdparser.cxx | 4 ++-- 9 files changed, 22 insertions(+), 16 deletions(-)
New commits: commit 040710161c507f6e4d0120cfb61d9d82bc6a0527 Author: Jelle van der Waa <je...@vdwaa.nl> Date: Sun Jun 16 13:51:32 2013 +0200 fdo#43460 use isEmpty() Change-Id: Ie33025fbd10f47efd6b97304b76b21166d4ee70e Reviewed-on: https://gerrit.libreoffice.org/4307 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index c65f0e5..d07f6be 100644 --- a/vcl/generic/app/gensys.cxx +++ b/vcl/generic/app/gensys.cxx @@ -159,7 +159,7 @@ const char* SalGenericSystem::getFrameResName() * then use argv[0] stripped by directories */ static OStringBuffer aResName; - if( !aResName.getLength() ) + if( aResName.isEmpty() ) { int nArgs = osl_getCommandArgCount(); for( int n = 0; n < nArgs-1; n++ ) @@ -173,13 +173,13 @@ const char* SalGenericSystem::getFrameResName() break; } } - if( !aResName.getLength() ) + if( aResName.isEmpty() ) { const char* pEnv = getenv( "RESOURCE_NAME" ); if( pEnv && *pEnv ) aResName.append( pEnv ); } - if( !aResName.getLength() ) + if( aResName.isEmpty() ) aResName.append( OUStringToOString( utl::ConfigManager::getProductName().toAsciiLowerCase(), osl_getThreadTextEncoding())); } @@ -189,7 +189,7 @@ const char* SalGenericSystem::getFrameResName() const char* SalGenericSystem::getFrameClassName() { static OStringBuffer aClassName; - if( !aClassName.getLength() ) + if( aClassName.isEmpty() ) { OUString aIni, aProduct; rtl::Bootstrap::get( "BRAND_BASE_DIR", aIni ); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 10b25dc..20c41a9 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2407,7 +2407,7 @@ void Edit::StateChanged( StateChangedType nType ) mnAlign = EDIT_ALIGN_RIGHT; else if ( nStyle & WB_CENTER ) mnAlign = EDIT_ALIGN_CENTER; - if ( maText.getLength() && ( mnAlign != nOldAlign ) ) + if ( !maText.isEmpty() && ( mnAlign != nOldAlign ) ) { ImplAlign(); Invalidate(); diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 38b8003..b491ba5 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1111,7 +1111,7 @@ static OUString ImplMetricGetUnitText(const OUString& rStr) aStr.insert(0, c); else { - if (aStr.getLength()) + if (!aStr.isEmpty()) break; } } diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index da08f7d..1efc629 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2212,7 +2212,7 @@ static bool ImplIsValidTimePortion( sal_Bool _bSkipInvalidCharacters, const OUSt { if ( !_bSkipInvalidCharacters ) { - if ( ( _rStr.getLength() > 2 ) || ( _rStr.getLength() < 1 ) || !ImplIsOnlyDigits( _rStr ) ) + if ( ( _rStr.getLength() > 2 ) || _rStr.isEmpty() || !ImplIsOnlyDigits( _rStr ) ) return false; } return true; diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 6f070af..9881521 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -204,7 +204,7 @@ static bool ImplNumericGetValue( const XubString& rStr, BigInt& rValue, aStr2.remove(i, 1); } - if (!aStr1.Len() && !aStr2.getLength()) + if (!aStr1.Len() && aStr2.isEmpty()) return false; if ( !aStr1.Len() ) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 7eedb3a..e043ca6 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2750,7 +2750,7 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle ) } std::vector< sal_Int32 > aAttribObjects; - if( aLayout.getLength() ) + if( !aLayout.isEmpty() ) { aAttribObjects.push_back( createObject() ); updateObject( aAttribObjects.back() ); @@ -2762,7 +2762,7 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle ) writeBuffer( aObj.getStr(), aObj.getLength() ); writeBuffer( aLayout.getStr(), aLayout.getLength() ); } - if( aList.getLength() ) + if( !aList.isEmpty() ) { aAttribObjects.push_back( createObject() ); updateObject( aAttribObjects.back() ); @@ -2774,7 +2774,7 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle ) writeBuffer( aObj.getStr(), aObj.getLength() ); writeBuffer( aList.getStr(), aList.getLength() ); } - if( aTable.getLength() ) + if( !aTable.isEmpty() ) { aAttribObjects.push_back( createObject() ); updateObject( aAttribObjects.back() ); @@ -5556,7 +5556,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() aLine.append( rWidget.m_nFlags ); aLine.append( "\n" ); } - if( aValue.getLength() ) + if( !aValue.isEmpty() ) { OString aVal = aValue.makeStringAndClear(); aLine.append( "/V " ); @@ -6856,7 +6856,7 @@ bool PDFWriterImpl::emitTrailer() } aLine.append( "> ]\n" ); } - if( aDocChecksum.getLength() ) + if( !aDocChecksum.isEmpty() ) { aLine.append( "/DocChecksum /" ); aLine.append( aDocChecksum.makeStringAndClear() ); @@ -10685,7 +10685,7 @@ void PDFWriterImpl::updateGraphicsState() // everything is up to date now m_aCurrentPDFState = m_aGraphicsStack.front(); - if( aLine.getLength() ) + if( !aLine.isEmpty() ) writeBuffer( aLine.getStr(), aLine.getLength() ); } diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 6b464e9..9a2f323 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -176,7 +176,7 @@ namespace psp aKey.append( sal_Unicode( ':' ) ); aKey.append( i_rValue ); } - if( aKey.getLength() && !i_rTranslation.isEmpty() ) + if( !aKey.isEmpty() && !i_rTranslation.isEmpty() ) { OUString aK( aKey.makeStringAndClear() ); com::sun::star::lang::Locale aLoc; @@ -208,7 +208,7 @@ namespace psp aKey.append( sal_Unicode( ':' ) ); aKey.append( i_rValue ); } - if( aKey.getLength() ) + if( !aKey.isEmpty() ) { OUString aK( aKey.makeStringAndClear() ); key_translation_map::const_iterator it = m_aTranslations.find( aK ); commit 4c3d2dcdadbcb8f2ffc2caab07d50a286341df96 Author: Miklos Vajna <vmik...@suse.cz> Date: Sun Jun 16 17:47:50 2013 +0200 Add UI for fine dashed border type Commit 7d632ff29e601c2e680c4a689997fbf552592a4b added document model / layout support for this, but UI was lacking. First, add a new item to the list box in SvxBorderTabPage::FillLineListBox_Impl(). Second, handle MAP_TWIP unit in svtools::GetDashing() for STYLE_FINE_DASHED. Pick up some values that give visually the fine dashed result when painted. (The original values from 2f0d406911f9790a434e46bc82ea36bb8ae714e7 in other cases seem to be a bit consistent already anyway.) Change-Id: Ibf1ed235d51515b065d23a6a5d5eef433162899f diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 26f3a0c..f43fbae 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -993,6 +993,7 @@ void SvxBorderTabPage::FillLineListBox_Impl() m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID ); m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED ); m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED ); + m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( FINE_DASHED ), FINE_DASHED ); // Double lines m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE ); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index a071cb2..dce1f9a 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -643,6 +643,11 @@ namespace svtools aPattern.push_back( 4 ); aPattern.push_back( 1 ); } + else if ( eUnit == MAP_TWIP ) + { + aPattern.push_back( 120.0 ); + aPattern.push_back( 30.0 ); + } break; default: break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits