[PATCH] Create Photo Album fix

Gergő Mocsi (via_Code_Review) gerrit at gerrit.libreoffice.org
Fri May 3 06:38:42 PDT 2013


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 at gmail.com>



More information about the LibreOffice mailing list