Kaydet (Commit) 4d000e85 authored tarafından Dobra Gabor's avatar Dobra Gabor Kaydeden (comit) Katarina Behrens

tdf#89641 Page numbering in Calc and Draw/Impress

Change-Id: I5ce2f528ae4a243ea8402c787b5c77cf75052d2e
Format: "Slide 2 / 3" changed to "Slide 2 of 3 (1)".
Reviewed-on: https://gerrit.libreoffice.org/14806Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
Tested-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 2819ee71
......@@ -698,7 +698,9 @@
#define STR_UNQUOTED_STRING 533
#define STR_ENTER_VALUE 534
#define SC_GLOBSTR_STR_COUNT 535 /**< the count of permanently resident strings */
#define STR_TABLE_COUNT 535
#define SC_GLOBSTR_STR_COUNT 536 /**< the count of permanently resident strings */
#endif
......
......@@ -2089,6 +2089,10 @@ Resource RID_GLOBSTR
{
Text[ en-US ] = "Enter a value!";
};
String STR_TABLE_COUNT
{
Text [ en-US ] = "Sheet %1 of %2";
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -678,11 +678,12 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_STATUS_DOCPOS:
{
OUString aStr = ScGlobal::GetRscString( STR_TABLE ) +
" " + OUString::number( nTab + 1 ) +
" / " + OUString::number( nTabCount );
rSet.Put( SfxStringItem( nWhich, aStr ) );
}
OUString aStr = ScGlobal::GetRscString( STR_TABLE_COUNT );
aStr = aStr.replaceFirst("%1", OUString::number( nTab + 1 ) );
aStr = aStr.replaceFirst("%2", OUString::number( nTabCount ) );
rSet.Put( SfxStringItem( nWhich, aStr ) ); }
break;
case SID_ROWCOL_SELCOUNT:
......
......@@ -371,6 +371,14 @@ String STR_SD_PAGE
{
Text [ en-US ] = "Slide" ;
};
String STR_SD_PAGE_COUNT
{
Text [ en-US ] = "Slide %1 of %2" ;
};
String STR_SD_PAGE_COUNT_CUSTOM
{
Text [ en-US ] = "Slide %1 of %2 (%3)" ;
};
String STR_ALL_FILES
{
Text [ en-US ] = "All files" ;
......
......@@ -161,12 +161,15 @@
#define STR_TWAIN_NO_SOURCE_UNX (RID_APP_START+262)
#define STR_UNDO_DELETEPAGES (RID_APP_START+265)
#define STR_UNDO_INSERTPAGES (RID_APP_START+266)
//free (RID_APP_START+267)
#define STR_ASK_DELETE_LAYER (RID_APP_START+268)
#define STR_UNDO_CHANGE_TITLE_AND_LAYOUT (RID_APP_START+269)
#define STR_WAV_FILE (RID_APP_START+270)
#define STR_MIDI_FILE (RID_APP_START+271)
#define STR_SD_PAGE (RID_APP_START+272)
#define STR_ASK_DELETE_LAYER (RID_APP_START+267)
#define STR_UNDO_CHANGE_TITLE_AND_LAYOUT (RID_APP_START+268)
#define STR_WAV_FILE (RID_APP_START+269)
#define STR_MIDI_FILE (RID_APP_START+270)
#define STR_SD_PAGE (RID_APP_START+271)
#define STR_SD_PAGE_COUNT (RID_APP_START+272)
#define STR_SD_PAGE_COUNT_CUSTOM (RID_APP_START+273)
#define STR_ALL_FILES (RID_APP_START+274)
#define STR_UNDO_INSERT_TEXTFRAME (RID_APP_START+275)
#define STR_ACTION_NOTPOSSIBLE (RID_APP_START+278)
......
......@@ -834,13 +834,12 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
sal_Int32 nPageCount;
sal_Int32 nActivePageCount;
sal_uInt16 nSelectedPages = mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount();
OUStringBuffer aPageStr;
OUString aPageStr;
OUString aLayoutStr;
//Set number of slides
if (nSelectedPages > 0)
{
aPageStr = SD_RESSTR(STR_SLIDE_SINGULAR);
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
......@@ -852,15 +851,15 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
nPageCount = mrSlideSorter.GetModel().GetPageCount();
nActivePageCount = static_cast<sal_Int32>(mrSlideSorter.GetModel().GetDocument()->GetActiveSdPageCount());
aPageStr.append(" ").append(static_cast<sal_Int32>(nFirstPage), 10).append(" / ").append(nPageCount, 10);
if (nPageCount != nActivePageCount)
{
aPageStr.append(" (").append(nActivePageCount, 10).append(")");
}
aPageStr = (nPageCount == nActivePageCount) ? SD_RESSTR(STR_SD_PAGE_COUNT) : SD_RESSTR(STR_SD_PAGE_COUNT_CUSTOM);
aPageStr = aPageStr.replaceFirst("%1", OUString::number(nFirstPage));
aPageStr = aPageStr.replaceFirst("%2", OUString::number(nPageCount));
if(nPageCount != nActivePageCount)
aPageStr = aPageStr.replaceFirst("%3", OUString::number(nActivePageCount));
}
rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr.makeStringAndClear() ) );
rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr ) );
}
//Set layout
if (nSelectedPages == 1 && pPage != NULL)
{
......
......@@ -700,17 +700,12 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
sal_Int32 nPageCount = sal_Int32(GetDoc()->GetSdPageCount(mePageKind));
sal_Int32 nActivePageCount = sal_Int32(GetDoc()->GetActiveSdPageCount());
// Always show the slide/page number.
OUString aOUString = SD_RESSTR(STR_SD_PAGE);
aOUString += " ";
aOUString += OUString::number( maTabControl.GetCurPageId() );
aOUString += " / " ;
aOUString += OUString::number( nPageCount );
if (nPageCount != nActivePageCount)
{
aOUString += " (";
aOUString += OUString::number( nActivePageCount );
aOUString += ")";
}
OUString aOUString = (nPageCount == nActivePageCount) ? SD_RESSTR(STR_SD_PAGE_COUNT) : SD_RESSTR(STR_SD_PAGE_COUNT_CUSTOM);
aOUString = aOUString.replaceFirst("%1", OUString::number(maTabControl.GetCurPageId()));
aOUString = aOUString.replaceFirst("%2", OUString::number(nPageCount));
if(nPageCount != nActivePageCount)
aOUString = aOUString.replaceFirst("%3", OUString::number(nActivePageCount));
// If in layer mode additionally show the layer that contains all
// selected shapes of the page. If the shapes are distributed on
......
......@@ -1347,11 +1347,10 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
SdrPage* pPage = GetDoc()->GetSdPage( (sal_uInt16) nPos, PK_STANDARD );
aPageStr = SD_RESSTR(STR_SD_PAGE);
aPageStr += " ";
aPageStr += OUString::number( (sal_Int32)(nPos + 1) ); // sal_uLong -> sal_Int32
aPageStr += " / ";
aPageStr += OUString::number( nPageCount );
aPageStr = SD_RESSTR(STR_SD_PAGE_COUNT);
aPageStr = aPageStr.replaceFirst("%1", OUString::number((sal_Int32)(nPos + 1)));
aPageStr = aPageStr.replaceFirst("%2", OUString::number(nPageCount));
aLayoutStr = pPage->GetLayoutName();
sal_Int32 nIndex = aLayoutStr.indexOf(SD_LT_SEPARATOR);
......
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