Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3759

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/59/3759/1

Create Photo Album fix

Fixed some UI tweaks in handler function DownHdl: now images can me moved down correctly. Also, 
made some
simplification in handler UpHdl: I've moved forvard the declaration of local variable nActPos.

Change-Id: I879a6394865bb8442c0621dc2789efd9eedae87c
---
M sd/source/ui/dlg/PhotoAlbumDialog.cxx
1 file changed, 5 insertions(+), 5 deletions(-)



diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 5d6ba1e..fc4b256 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -650,12 +650,12 @@
     if (pImagesLst->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND
         && pImagesLst->GetSelectEntryPos() != 0)
     {
-        OUString sActEntry( pImagesLst->GetEntry(pImagesLst->GetSelectEntryPos()) );
+        sal_uInt16 nActPos = pImagesLst->GetSelectEntryPos();
+        OUString sActEntry( pImagesLst->GetEntry(nActPos) );
         // actual data
-        OUString* pActData = (OUString*) pImagesLst->GetEntryData(pImagesLst->GetSelectEntryPos());
+        OUString* pActData = (OUString*) pImagesLst->GetEntryData(nActPos);
         OUString sAct(*pActData);
 
-        sal_uInt16 nActPos = pImagesLst->GetSelectEntryPos();
         OUString sUpperEntry( pImagesLst->GetEntry(nActPos - 1) );
         // upper data
         OUString* pUpperData = (OUString*) pImagesLst->GetEntryData(nActPos - 1);
@@ -701,10 +701,10 @@
         pImagesLst->RemoveEntry( sDownEntry );
 
         pImagesLst->InsertEntry( sDownEntry, nActPos );
-        pImagesLst->SetEntryData( nActPos, (void*) new OUString(sAct));
+        pImagesLst->SetEntryData( nActPos, (void*) new OUString(sDown));
 
         pImagesLst->InsertEntry( sActEntry, nActPos + 1 );
-        pImagesLst->SetEntryData( nActPos + 1, (void*) new OUString(sDown));
+        pImagesLst->SetEntryData( nActPos + 1, (void*) new OUString(sAct));
 
         pImagesLst->SelectEntryPos(nActPos + 1);
 

-- 
To view, visit https://gerrit.libreoffice.org/3759
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I879a6394865bb8442c0621dc2789efd9eedae87c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Gergő Mocsi <gmocsi91@gmail.com>


Context


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.