| 2934 | /////////////////////////////////////////////////////////////////////////// |
| 2935 | |
| 2936 | const char * Config::parseColorSpaceFromString(const char * str) const |
| 2937 | { |
| 2938 | int rightMostColorSpaceIndex = ParseColorSpaceFromString(*this, str); |
| 2939 | |
| 2940 | // Index is using all color spaces. |
| 2941 | if(rightMostColorSpaceIndex>=0) |
| 2942 | { |
| 2943 | return getImpl()->m_allColorSpaces->getColorSpaceNameByIndex(rightMostColorSpaceIndex); |
| 2944 | } |
| 2945 | |
| 2946 | if(!getImpl()->m_strictParsing) |
| 2947 | { |
| 2948 | // Is a default role defined? |
| 2949 | const char* csname = LookupRole(getImpl()->m_roles, ROLE_DEFAULT); |
| 2950 | if(csname && *csname) |
| 2951 | { |
| 2952 | const int csindex = getImpl()->getColorSpaceIndex(csname); |
| 2953 | if (-1 != csindex) |
| 2954 | { |
| 2955 | // This is necessary to not return a reference to a local variable. |
| 2956 | return getImpl()->m_allColorSpaces->getColorSpaceNameByIndex(csindex); |
| 2957 | } |
| 2958 | } |
| 2959 | } |
| 2960 | |
| 2961 | return ""; |
| 2962 | } |
| 2963 | |
| 2964 | bool Config::isStrictParsingEnabled() const |
| 2965 | { |
nothing calls this directly
no test coverage detected