Kaydet (Commit) b22881c8 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt Kaydeden (comit) Bosdonnat Cedric

Modify the default Style list in Writer, give them a custom order.

Asking on UX-Advise, there were no negative voices for this change:
http://nabble.documentfoundation.org/Libreoffice-ux-advise-Default-Styles-in-Writer-td4020441.html

Change-Id: I780eaecc29c88493f09194399dfc00be1484c549
Reviewed-on: https://gerrit.libreoffice.org/1248Reviewed-by: 's avatarBosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: 's avatarBosdonnat Cedric <cedric.bosdonnat@free.fr>
üst e43d62fb
...@@ -1681,11 +1681,13 @@ struct SvxStyleToolBoxControl::Impl ...@@ -1681,11 +1681,13 @@ struct SvxStyleToolBoxControl::Impl
xParaStyles; xParaStyles;
static const sal_Char* aWriterStyles[] = static const sal_Char* aWriterStyles[] =
{ {
"Standard", "Text body",
"Quotations",
"Title",
"Subtitle",
"Heading 1", "Heading 1",
"Heading 2", "Heading 2",
"Heading 3", "Heading 3"
"Text body"
}; };
for( sal_uInt32 nStyle = 0; nStyle < sizeof( aWriterStyles ) / sizeof( sal_Char*); ++nStyle ) for( sal_uInt32 nStyle = 0; nStyle < sizeof( aWriterStyles ) / sizeof( sal_Char*); ++nStyle )
{ {
...@@ -1946,6 +1948,11 @@ void SvxStyleToolBoxControl::FillStyleBox() ...@@ -1946,6 +1948,11 @@ void SvxStyleToolBoxControl::FillStyleBox()
if( pImpl->bSpecModeWriter || pImpl->bSpecModeCalc ) if( pImpl->bSpecModeWriter || pImpl->bSpecModeCalc )
{ {
// disable sort to preserve special order
WinBits nWinBits = pBox->GetStyle();
nWinBits &= ~WB_SORT;
pBox->SetStyle( nWinBits );
// insert default styles // insert default styles
sal_uInt16 _i; sal_uInt16 _i;
sal_uInt32 nCnt = pImpl->aDefaultStyles.size(); sal_uInt32 nCnt = pImpl->aDefaultStyles.size();
...@@ -1956,11 +1963,6 @@ void SvxStyleToolBoxControl::FillStyleBox() ...@@ -1956,11 +1963,6 @@ void SvxStyleToolBoxControl::FillStyleBox()
++nPos; ++nPos;
} }
// disable sort to preserve special order
WinBits nWinBits = pBox->GetStyle();
nWinBits &= ~WB_SORT;
pBox->SetStyle( nWinBits );
pBox->InsertEntry( pImpl->aClearForm, 0 ); pBox->InsertEntry( pImpl->aClearForm, 0 );
pBox->SetSeparatorPos( 0 ); pBox->SetSeparatorPos( 0 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment