//
//  ValueManager.m
//  SIIMpaPrinterSample
//

#import "ValueManager.h"
#import <SIIMpaPrinterManager/SIIMpaPrinterManager.h>

@implementation ValueManager

+ (NSString *)getCurrentStringValue:(NSString *)key {
    return [[NSUserDefaults standardUserDefaults] stringForKey:key];
}

+ (void)setCurrentStringValue:(NSString *)key value:(NSString *)value {
    [[NSUserDefaults standardUserDefaults] setObject:value forKey:key];
}

+ (NSInteger)convert2DBarcodeTypeStringToInt:(NSString *)type {
    NSInteger value = -1;
    if ([type isEqualToString:TWO_DIMENSION_BARCODE_TYPE_QR_CODE]) {
        value = SII_MPM_TYPE_2DCODE_QR_CODE;
    } else if ([type isEqualToString:TWO_DIMENSION_BARCODE_TYPE_PDF417]) {
        value = SII_MPM_TYPE_2DCODE_PDF417;
    } else if ([type isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX]) {
        value = SII_MPM_TYPE_2DCODE_DATA_MATRIX;
    } else if ([type isEqualToString:TWO_DIMENSION_BARCODE_MAXI_CODE]) {
        value = SII_MPM_TYPE_2DCODE_MAXI_CODE;
    } else if ([type isEqualToString:TWO_DIMENSION_BARCODE_GS1_STACKED]) {
        value = SII_MPM_TYPE_2DCODE_GS1_STACKED;
    } else if ([type isEqualToString:TWO_DIMENSION_BARCODE_GS1_OMNI_DIRECTIONAL]) {
        value = SII_MPM_TYPE_2DCODE_GS1_OMNI_DIRECTIONAL;
    } else if ([type isEqualToString:TWO_DIMENSION_BARCODE_GS1_EXPANDED_STACKED]) {
        value = SII_MPM_TYPE_2DCODE_GS1_EXPANDED_STACKED;
    }
    return value;
}

+ (NSInteger)convert2DBarcodeModeStringToInt:(NSString *)mode {
    NSInteger value = -1;
    if ([mode isEqualToString:TWO_DIMENSION_BARCODE_QR_CODE_MODEL_1]) {
        value = SII_MPM_MODE_2DCODE_QR_CODE_MODEL1;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_QR_CODE_MODEL_2]) {
        value = SII_MPM_MODE_2DCODE_QR_CODE_MODEL2;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_PDF417_MODE_STANDARD]) {
        value = SII_MPM_MODE_2DCODE_PDF417_STANDARD;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_PDF417_MODE_COMPACT]) {
        value = SII_MPM_MODE_2DCODE_PDF417_COMPACT;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_AUTO]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_AUTO;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_10x10]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_10_10;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_12x12]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_12_12;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_14x14]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_14_14;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_16x16]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_16_16;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_18x18]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_18_18;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_20x20]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_20_20;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_22x22]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_22_22;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_24x24]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_24_24;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_26x26]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_26_26;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_32x32]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_32_32;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_36x36]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_36_36;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_40x40]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_40_40;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_44x44]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_44_44;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_48x48]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_48_48;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_52x52]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_52_52;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_64x64]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_64_64;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_72x72]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_72_72;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_80x80]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_80_80;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_88x88]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_88_88;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_96x96]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_96_96;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_104x104]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_104_104;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_120x120]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_120_120;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_132x132]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_132_132;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_144x144]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_144_144;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_8x18]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_8_18;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_8x32]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_8_32;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_12x26]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_12_26;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_12x36]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_12_36;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_16x36]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_16_36;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_DATA_MATRIX_MODE_16x48]) {
        value = SII_MPM_MODE_2DCODE_DATA_MATRIX_16_48;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_MAXI_CODE_MODE_2]) {
        value = SII_MPM_MODE_2DCODE_MAXI_CODE_2;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_MAXI_CODE_MODE_3]) {
        value = SII_MPM_MODE_2DCODE_MAXI_CODE_3;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_MAXI_CODE_MODE_4]) {
        value = SII_MPM_MODE_2DCODE_MAXI_CODE_4;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_MAXI_CODE_MODE_5]) {
        value = SII_MPM_MODE_2DCODE_MAXI_CODE_5;
    } else if ([mode isEqualToString:TWO_DIMENSION_BARCODE_MODE_NONE]) {
        value = SII_MPM_MODE_2DCODE_NONE;
    }
    return value;
}

+ (NSInteger)convert2DBarcodeModuleSizeStringToInt:(NSString *)moduleSize {
    NSInteger value = -1;
    if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_DEFAULT]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_DEFAULT;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_2]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_2;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_3]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_3;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_4]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_4;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_5]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_5;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_6]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_6;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_7]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_7;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_8]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_8;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_9]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_9;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_10]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_10;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_11]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_11;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_12]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_12;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_13]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_13;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_14]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_14;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_15]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_15;
    } else if ([moduleSize isEqualToString:TWO_DIMENSION_BARCODE_MODULE_SIZE_16]) {
        value = SII_MPM_MODULE_SIZE_2DCODE_16;
    }
    return value;
}

+ (NSInteger)convert2DBarcodeErrorCorrectStringToInt:(NSString *)errorCorrect {
    NSInteger value = -1;
    if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_QR_ERROR_CORRECT_L]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_QR_CODE_L;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_QR_ERROR_CORRECT_M]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_QR_CODE_M;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_QR_ERROR_CORRECT_Q]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_QR_CODE_Q;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_QR_ERROR_CORRECT_H]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_QR_CODE_H;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_0]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_0;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_1]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_1;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_2]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_2;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_3]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_3;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_4]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_4;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_5]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_5;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_6]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_6;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_7]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_7;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_PDF417_ERROR_CORRECT_8]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_PDF417_8;
    } else if ([errorCorrect isEqualToString:TWO_DIMENSION_BARCODE_ERROR_CORRECT_NONE]) {
        value = SII_MPM_ERR_CORRECTION_2DCODE_NONE;
    }
    return value;
}

+ (NSInteger)convertBarcodeTypeStringToInt:(NSString *)type {
    NSInteger value = -1;
    if ([type isEqualToString:BARCODE_TYPE_UPC_A]) {
        value = SII_MPM_TYPE_BARCODE_UPC_A;
    } else if ([type isEqualToString:BARCODE_TYPE_UPC_E]) {
        value = SII_MPM_TYPE_BARCODE_UPC_E;
    } else if ([type isEqualToString:BARCODE_TYPE_JAN13]) {
        value = SII_MPM_TYPE_BARCODE_JAN13;
    } else if ([type isEqualToString:BARCODE_TYPE_JAN8]) {
        value = SII_MPM_TYPE_BARCODE_JAN8;
    } else if ([type isEqualToString:BARCODE_TYPE_CODE39]) {
        value = SII_MPM_TYPE_BARCODE_CODE39;
    } else if ([type isEqualToString:BARCODE_TYPE_ITF]) {
        value = SII_MPM_TYPE_BARCODE_ITF;
    } else if ([type isEqualToString:BARCODE_TYPE_CODABAR]) {
        value = SII_MPM_TYPE_BARCODE_CODABAR;
    } else if ([type isEqualToString:BARCODE_TYPE_CODE128]) {
        value = SII_MPM_TYPE_BARCODE_CODE128;
    } else if ([type isEqualToString:BARCODE_TYPE_CODE93]) {
        value = SII_MPM_TYPE_BARCODE_CODE93;
    } else if ([type isEqualToString:BARCODE_TYPE_JAN13_ADDON2]) {
        value = SII_MPM_TYPE_BARCODE_JAN13_ADDON2;
    } else if ([type isEqualToString:BARCODE_TYPE_JAN13_ADDON5]) {
        value = SII_MPM_TYPE_BARCODE_JAN13_ADDON5;
    } else if ([type isEqualToString:BARCODE_TYPE_GS1_OMNI_DIRECTIONAL]) {
        value = SII_MPM_TYPE_BARCODE_GS1_OMNI_DIRECTIONAL;
    } else if ([type isEqualToString:BARCODE_TYPE_GS1_TRUNCATED]) {
        value = SII_MPM_TYPE_BARCODE_GS1_TRUNCATED;
    } else if ([type isEqualToString:BARCODE_TYPE_GS1_LIMITED]) {
        value = SII_MPM_TYPE_BARCODE_GS1_LIMITED;
    } else if ([type isEqualToString:BARCODE_TYPE_GS1_EXPANDED]) {
        value = SII_MPM_TYPE_BARCODE_GS1_EXPANDED;
    }
    return value;
}

+ (NSInteger)convertBarcodeModuleWidthStringToInt:(NSString *)width {
    NSInteger value = -1;
    if ([width isEqualToString:BARCODE_MODULE_WIDTH_2]) {
        value = SII_MPM_MODULE_WIDTH_BARCODE_2;
    } else if ([width isEqualToString:BARCODE_MODULE_WIDTH_3]) {
        value = SII_MPM_MODULE_WIDTH_BARCODE_3;
    } else if ([width isEqualToString:BARCODE_MODULE_WIDTH_4]) {
        value = SII_MPM_MODULE_WIDTH_BARCODE_4;
    } else if ([width isEqualToString:BARCODE_MODULE_WIDTH_5]) {
        value = SII_MPM_MODULE_WIDTH_BARCODE_5;
    } else if ([width isEqualToString:BARCODE_MODULE_WIDTH_6]) {
        value = SII_MPM_MODULE_WIDTH_BARCODE_6;
    }
    return value;
}

+ (NSInteger)convertBarcodeHriSettingStringToInt:(NSString *)hri {
    NSInteger value = -1;
    if ([hri isEqualToString:BARCODE_HRI_SETTING_NONE]) {
        value = SII_MPM_HRI_BARCODE_NONE;
    } else if ([hri isEqualToString:BARCODE_HRI_SETTING_TOP_FONT_A]) {
        value = SII_MPM_HRI_BARCODE_TOP_FONT_A;
    } else if ([hri isEqualToString:BARCODE_HRI_SETTING_BOTTOM_FONT_A]) {
        value = SII_MPM_HRI_BARCODE_BOTTOM_FONT_A;
    } else if ([hri isEqualToString:BARCODE_HRI_SETTING_FONT_A]) {
        value = SII_MPM_HRI_BARCODE_FONT_A;
    } else if ([hri isEqualToString:BARCODE_HRI_SETTING_TOP_FONT_B]) {
        value = SII_MPM_HRI_BARCODE_TOP_FONT_B;
    } else if ([hri isEqualToString:BARCODE_HRI_SETTING_BOTTOM_FONT_B]) {
        value = SII_MPM_HRI_BARCODE_BOTTOM_FONT_B;
    } else if ([hri isEqualToString:BARCODE_HRI_SETTING_FONT_B]) {
        value = SII_MPM_HRI_BARCODE_FONT_B;
    }
    return value;
}

+ (NSInteger)convertBarcodeNwRatioStringToInt:(NSString *)nwRatio {
    NSInteger value = -1;
    if ([nwRatio isEqualToString:BARCODE_NW_RATIO_1TO2]) {
        value = SII_MPM_NWRATIO_BARCODE_1TO2;
    } else if ([nwRatio isEqualToString:BARCODE_NW_RATIO_1TO2_5]) {
        value = SII_MPM_NWRATIO_BARCODE_1TO2_5;
    } else if ([nwRatio isEqualToString:BARCODE_NW_RATIO_1TO3]) {
        value = SII_MPM_NWRATIO_BARCODE_1TO3;
    }
    return value;
}

+ (NSInteger)convertFontStringToInt:(NSString *)font {
    NSInteger value = -1;
    if ([font isEqualToString:TEXT_FONT_A]) {
        value = SII_MPM_CHAR_TYPE_FONT_A;
    } else if ([font isEqualToString:TEXT_FONT_B]) {
        value = SII_MPM_CHAR_TYPE_FONT_B;
    }
    return value;
}

+ (NSInteger)convertScaleStringToInt:(NSString *)scale {
    NSInteger value = -1;
    if ([scale isEqualToString:TEXT_SCALE_1]) {
        value = SII_MPM_CHAR_SCALE_X1;
    } else if ([scale isEqualToString:TEXT_SCALE_2]) {
        value = SII_MPM_CHAR_SCALE_X2;
    } else if ([scale isEqualToString:TEXT_SCALE_3]) {
        value = SII_MPM_CHAR_SCALE_X3;
    } else if ([scale isEqualToString:TEXT_SCALE_4]) {
        value = SII_MPM_CHAR_SCALE_X4;
    } else if ([scale isEqualToString:TEXT_SCALE_5]) {
        value = SII_MPM_CHAR_SCALE_X5;
    } else if ([scale isEqualToString:TEXT_SCALE_6]) {
        value = SII_MPM_CHAR_SCALE_X6;
    } else if ([scale isEqualToString:TEXT_SCALE_7]) {
        value = SII_MPM_CHAR_SCALE_X7;
    } else if ([scale isEqualToString:TEXT_SCALE_8]) {
        value = SII_MPM_CHAR_SCALE_X8;
    }
    return value;
}

+ (NSInteger)convertUnderlineStringToInt:(NSString *)underline {
    NSInteger value = -1;
    if ([underline isEqualToString:TEXT_UNDERLINE_NONE]) {
        value = SII_MPM_CHAR_UNDERLINE_NONE;
    } else if ([underline isEqualToString:TEXT_UNDERLINE_1DOT]) {
        value = SII_MPM_CHAR_UNDERLINE_1DOT;
    } else if ([underline isEqualToString:TEXT_UNDERLINE_2DOT]) {
        value = SII_MPM_CHAR_UNDERLINE_2DOT;
    }
    return value;
}

+ (NSInteger)convertBoldStringToInt:(NSString *)bold {
    NSInteger value = -1;
    if ([bold isEqualToString:TEXT_BOLD_OFF]) {
        value = SII_MPM_CHAR_BOLD_OFF;
    } else if ([bold isEqualToString:TEXT_BOLD_ON]) {
        value = SII_MPM_CHAR_BOLD_ON;
    }
    return value;
}

+ (NSInteger)convertReverseStringToInt:(NSString *)reverse {
    NSInteger value = -1;
    if ([reverse isEqualToString:TEXT_REVERSE_OFF]) {
        value = SII_MPM_CHAR_REVERSE_OFF;
    } else if ([reverse isEqualToString:TEXT_REVERSE_ON]) {
        value = SII_MPM_CHAR_REVERSE_ON;
    }
    return value;
}

+ (NSInteger)convertRotationStringToInt:(NSString *)rotation {
    NSInteger value = -1;
    if ([rotation isEqualToString:TEXT_ROTATION_NONE]) {
        value = SII_MPM_ROTATE_NONE;
    } else if ([rotation isEqualToString:TEXT_ROTATION_90_TO_RIGHT]) {
        value = SII_MPM_ROTATE_90_TO_RIGHT;
    } else if ([rotation isEqualToString:TEXT_ROTATION_180]) {
        value = SII_MPM_ROTATE_180;
    } else if ([rotation isEqualToString:TEXT_ROTATION_90_TO_LEFT]) {
        value = SII_MPM_ROTATE_90_TO_LEFT;
    }
    return value;
}

@end
