Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2927
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/27/2927/1
Give the number of slides also when more slides are selected
Change-Id: I2a169831f2caada6d052edb697036a53ca67ddd0
---
M sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index a3f2ba7..6db42a0 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -814,16 +814,15 @@
// page view and layout
SdPage* pPage = NULL;
SdPage* pFirstPage = NULL;
- sal_uInt16 nFirstPage;
- sal_uInt16 nSelectedPages =
(sal_uInt16)mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount();
- rtl::OUString aPageStr;
+ sal_uInt16 nFirstPage;
+ sal_uInt16 nSelectedPages =
mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount();
+ OUStringBuffer aPageStr;
String aLayoutStr;
+ //Set number of slides
if (nSelectedPages > 0)
- aPageStr = SD_RESSTR(STR_SD_PAGE);
-
- if (nSelectedPages == 1)
{
+ aPageStr = SD_RESSTR(STR_SLIDE_SINGULAR);
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
@@ -831,22 +830,20 @@
if (pDescriptor)
{
pPage = pDescriptor->GetPage();
- nFirstPage = pPage->GetPageNum()/2;
- pFirstPage = pPage;
-
- aPageStr += " ";
- aPageStr += rtl::OUString::valueOf( static_cast<sal_Int32>(nFirstPage + 1) );
- aPageStr += " / " ;
- aPageStr += rtl::OUString::valueOf(mrSlideSorter.GetModel().GetPageCount());
-
- aLayoutStr = pFirstPage->GetLayoutName();
- aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ nFirstPage = (pPage->GetPageNum()/2) + 1;
+ aPageStr.append(" ").append(static_cast<sal_Int32>(nFirstPage), 10).append(" /
").append(mrSlideSorter.GetModel().GetPageCount(), 10);
}
+ rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr.makeStringAndClear() ) );
}
- rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr ) );
- rSet.Put( SfxStringItem( SID_STATUS_LAYOUT, aLayoutStr ) );
-
+ //Set layout
+ if (nSelectedPages == 1 && pPage != NULL)
+ {
+ pFirstPage = pPage;
+ aLayoutStr = pFirstPage->GetLayoutName();
+ aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ rSet.Put( SfxStringItem( SID_STATUS_LAYOUT, aLayoutStr ) );
+ }
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) )
{
rSet.Put( SfxVoidItem( SID_ATTR_ZOOMSLIDER ) );
--
To view, visit https://gerrit.libreoffice.org/2927
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a169831f2caada6d052edb697036a53ca67ddd0
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Rob Snelders <libreoffice@ertai.nl>
Context
- [PATCH] Give the number of slides also when more slides are selected · Rob Snelders (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.