[prev in list] [next in list] [prev in thread] [next in thread]
List: libreoffice-commits
Subject: [Libreoffice-commits] core.git: cui/source sc/source
From: laurent.balland-poirier () laposte ! net (Laurent Balland-Poirier)
Date: 2015-07-31 11:30:52
Message-ID: 20150731113052.21DB776245 () kemper ! freedesktop ! org
[Download RAW message or body]
cui/source/tabpages/numfmt.cxx | 9 ++++++++-
sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 5 ++++-
2 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 0db37d785311aa2294f60b750fce4dadff6c75e0
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date: Thu Jul 30 20:49:46 2015 +0200
tdf#44399 Do not display 0 decimal for General format
For General (Standard) format, "0" is not the number of decimal places
Replaced by an empty string in dialog UI and Sidebar.
Change-Id: Ia367b491b71fa7b4480cdd03408c0c0315425dc8
Reviewed-on: https://gerrit.libreoffice.org/17439
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 61efd7c..6883044 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -982,7 +982,10 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool \
bCheckCatChange /*= sal_Fa m_pEdLeadZeroes->Enable();
m_pBtnNegRed->Enable();
m_pBtnThousand->Enable();
- m_pEdDecimals->SetText( OUString::number( nDecimals ) );
+ if ( nCategory == CAT_NUMBER && m_pLbFormat->GetSelectEntryPos() == 0 )
+ m_pEdDecimals->SetText( "" ); //General format tdf#44399
+ else
+ m_pEdDecimals->SetText( OUString::number( nDecimals ) );
m_pEdLeadZeroes->SetText( OUString::number( nZeroes ) );
m_pBtnNegRed->Check( bNegRed );
m_pBtnThousand->Check( bThousand );
@@ -1569,6 +1572,10 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, \
pOptCtrl ) sal_uInt16 nLeadZeroes = (m_pEdLeadZeroes->IsEnabled())
? (sal_uInt16)m_pEdLeadZeroes->GetValue()
: (sal_uInt16)0;
+ if ( pNumFmtShell->GetStandardName() == m_pEdFormat->GetText() )
+ {
+ m_pEdDecimals->SetValue( nPrecision );
+ }
pNumFmtShell->MakeFormat( aFormat,
bThousand, bNegRed,
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx \
b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index b832400..4ec8606 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -320,7 +320,10 @@ void NumberFormatPropertyPanel::NotifyItemUpdate(
}
mpBtnThousand->Check(bThousand);
mpBtnNegRed->Check(bNegRed);
- mpEdDecimals->SetValue(nPrecision);
+ if ( mpLbCategory->GetSelectEntryPos() == 0 )
+ mpEdDecimals->SetText(""); // tdf#44399
+ else
+ mpEdDecimals->SetValue(nPrecision);
mpEdLeadZeroes->SetValue(nLeadZeroes);
}
default:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic