1.Fixed Jira Issue 2.Removed Unused functions
authorchitta ranjan <chitta.rs@samsung.com>
Tue, 9 Apr 2013 08:55:26 +0000 (17:55 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Tue, 9 Apr 2013 08:55:26 +0000 (17:55 +0900)
Change-Id: Icda038e93108f4126d78b8534e74f3bb5864417e
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
inc/IvImageViewerPresentationModel.h
src/IvImageCropForm.cpp
src/IvImageViewerForm.cpp
src/IvImageViewerPresentationModel.cpp

index 501aa9b..112ae54 100644 (file)
@@ -70,9 +70,6 @@ public:
        void RequestImage(const Tizen::Base::String& filePath) const;
        Tizen::Content::ContentId GetFileContentId(const Tizen::Base::String& filePath) const;
 
-       int GetSetterIndex(void) const;
-       void SetSetterIndex(const int index);
-
        int GetDurationOfSlideShow(void) const;
        SlideShowTransitionEffect GetTransitionEffectOfSlideShow(void) const;
 
@@ -111,7 +108,6 @@ private:
        Tizen::Base::Collection::ArrayList* __pImageCaches;
        long long __contactId;
        int __startIndex;
-       int __setterIndex;
        Tizen::Base::String __type;
        int __durationOfSlideShow;
        SlideShowTransitionEffect __transitionEffectOfSlideShow;
index a7e1148..17a0e07 100644 (file)
@@ -231,30 +231,6 @@ ImageCropForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId&
                        }
                }
        }
-//     if (pArgs != null)
-//     {
-//             __sourceFilePath = *(static_cast<String*>(pArgs->GetAt(0)));
-//             __cropMode = *(static_cast<String*>(pArgs->GetAt(1)));
-//             delete pArgs;
-//     }
-//     else
-//     {
-//             __sourceFilePath = __pPresentationModel->GetFilePathAt(0);
-//     }
-/*     if (__sourceFilePath.IsEmpty() == false && __cropMode.IsEmpty() == false)
-       {
-               __cropMode.ToLowerCase();
-               result r = __imageBuffer.Construct(__sourceFilePath.GetPointer());
-               if (r == E_SUCCESS)
-               {
-                       __imageWidth = __imageBuffer.GetWidth();
-                       __imageHeight = __imageBuffer.GetHeight();
-                       __pCurrentBitmap = __imageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_RGB565, BUFFER_SCALING_AUTO);
-               }
-               Image img;
-               __imageFormat = img.GetImageFormat(__sourceFilePath);
-       }*/
-       SetValue();
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
index 78f1462..26aedb6 100644 (file)
@@ -1117,7 +1117,7 @@ ImageViewerForm::CreateItem(int index)
 
        int curIndex = index;
 
-       if(__shuffle == true && __pShuffledList != null)
+       if (__shuffle == true && __pShuffledList != null)
        {
                curIndex = __pShuffledList[index];
        }
@@ -1440,9 +1440,26 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
        case ACTION_ID_FOOTER_BUTTON_CROP:
        {
                String filePath;
+               filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
+               ImageBuffer imagebuffer;
+               result r = imagebuffer.Construct(filePath);
+               if (r != E_SUCCESS)
+               {
+                       return;
+               }
+               int imageWidth = imagebuffer.GetWidth();
+               int imageHeight = imagebuffer.GetHeight();
+               if (imageWidth <= (CROP_RECTANGLE_HEIGHT * 3) || imageHeight <= (CROP_RECTANGLE_HEIGHT * 3))
+               {
+                       MessageBox messageBox;
+                       String messageText = ResourceManager::GetString(L"IDS_IMGE_POP_IMAGE_IS_TOO_SMALL");
+                       messageBox.Construct(L"", messageText, MSGBOX_STYLE_OK, 3000);
+                       int modalResult = 0;
+                   messageBox.ShowAndWait(modalResult);
+                   return;
+               }
                String cropMode = L"auto";
                ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-               filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
                pList->Add(new (std::nothrow) String(filePath));
                pList->Add(new (std::nothrow) String(cropMode));
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
@@ -2158,7 +2175,7 @@ ImageViewerForm::GetQuickThumbnailN(String& filePath)
                {
                        Canvas mainCanvas;
                        mainCanvas.Construct(DUMMY_IMAGE_RECTANGLE);
-                       mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), DUMMY_IMAGE_RECTANGLE);
+                       mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_BLACK), DUMMY_IMAGE_RECTANGLE);
                        pBitmap = new (std::nothrow) Bitmap();
                        pBitmap->Construct(mainCanvas, DUMMY_IMAGE_RECTANGLE);
                }
index 0c99032..e2a9f22 100644 (file)
@@ -57,7 +57,6 @@ ImageViewerPresentationModel::ImageViewerPresentationModel(void)
        : __pImageCaches(null)
        , __contactId(0)
        , __startIndex(0)
-       , __setterIndex(0)
        , __durationOfSlideShow(0)
        , __transitionEffectOfSlideShow(SLIDE_SHOW_TRANSITION_EFFECT_PAGE)
        , __pSettingPresentationModel(null)
@@ -442,18 +441,6 @@ ImageViewerPresentationModel::GetFileContentId(const String& filePath) const
 }
 
 int
-ImageViewerPresentationModel::GetSetterIndex(void) const
-{
-       return __setterIndex;
-}
-
-void
-ImageViewerPresentationModel::SetSetterIndex(const int index)
-{
-       __setterIndex = index;
-}
-
-int
 ImageViewerPresentationModel::GetDurationOfSlideShow(void) const
 {
        return __durationOfSlideShow;