[Libreoffice-commits] .: writerfilter/source
Noel Power
noelp at kemper.freedesktop.org
Fri Feb 11 08:42:25 PST 2011
writerfilter/source/dmapper/FormControlHelper.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 173201307a2b1279d17fac7115426100f7e84c8c
Author: Noel Power <noel.power at novell.com>
Date: Fri Feb 11 16:41:33 2011 +0000
fix compile error related to floor and move #TODO closer to related item
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index 0a568c8..c5b8806 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -215,7 +215,6 @@ bool FormControlHelper::createDropdown(uno::Reference<text::XTextRange> xTextRan
}
}
- // #FIXME improve the auto height width calculation
// some fallback values ( to display something )
m_pImpl->aSize.Width = 2381;
@@ -225,11 +224,13 @@ bool FormControlHelper::createDropdown(uno::Reference<text::XTextRange> xTextRan
{
uno::Reference<beans::XPropertySet> xTextRangeProps(xTextRange, uno::UNO_QUERY_THROW);
static ::rtl::OUString sCharHeight(RTL_CONSTASCII_USTRINGPARAM("CharHeight"));
+ // #FIXME improve the auto height width calculation ( but this
+ // should be removed when we use form fields instead of controls
float fComboBoxHeight = 0.0;
xTextRangeProps->getPropertyValue(sCharHeight) >>= fComboBoxHeight;
m_pImpl->aSize.Height = floor(fComboBoxHeight * 35.3);
if ( nMaxChars )
- m_pImpl->aSize.Width = floor( m_pImpl->aSize.Height * nMaxChars );
+ m_pImpl->aSize.Width = m_pImpl->aSize.Height * nMaxChars;
}
catch( uno::Exception& e )
{
More information about the Libreoffice-commits
mailing list