Difference between
modified post 9b662306 by Anonymous on Thu 23rd Sep 2021 12:16
original post f9cae1 by Anonymous on Wed 22nd Sep 2021 15:53
Download diff
Show
old version |
new version |
both versions
| 1 | 1 | Index: Rds/CoRds/FormatListExport.cpp | |
| 2 | 2 | =================================================================== | |
| 3 | 3 | --- Rds/CoRds/FormatListExport.cpp (revision 9291) | |
| 4 | 4 | +++ Rds/CoRds/FormatListExport.cpp (working copy) | |
| 5 | - | @@ -144,8 +144,29 @@ | |
| 5 | + | @@ -144,8 +144,32 @@ | |
| 6 | 6 | formatListsDirectoryLocation ); | |
| 7 | 7 | ||
| 8 | 8 | const auto* formatListDirParent = formatListsDir->getParent(); | |
| 9 | 9 | - const auto path = formatListDirParent? formatListDirParent->getNodePath( &rds ) : ""; | |
| 10 | 10 | + auto path = formatListDirParent? formatListDirParent->getNodePath( &rds ) : ""; | |
| 11 | 11 | ||
| 13 | 12 | + T_NodeID flttid1 = 0; | |
| 14 | 13 | + rds.nodeExists(formatListsDirectoryLocation, "FormatListTitleTextID1", flttid1, 0); | |
| 15 | 14 | + if (flttid1 != 0) | |
| 16 | 15 | + { | |
| 17 | 16 | + T_Bool success = false; | |
| 18 | 17 | + T_Int32 path_textid; | |
| 19 | 18 | + std::string path_textid_str; | |
| 20 | 19 | + | |
| 21 | 20 | + rds.getInt32(flttid1, NULL, success, path_textid, nullptr); | |
| 22 | 21 | + if (success) | |
| 23 | 22 | + { | |
| 24 | 23 | + path_textid_str = langResolver.getText(path_textid); | |
| 25 | 24 | + path = path_textid_str; | |
| 26 | 25 | + } | |
| 27 | 26 | + else | |
| 28 | 27 | + { | |
| 29 | - | + std::cerr << "getFormatLists(flttid1=" << flttid1 << ", NULL, success=" << success << ", path_textid=" << path_textid << "): rds.getInt32() failed." <<std::endl; | |
| 28 | + | + std::cerr << "getFormatLists(" | |
| 29 | + | + "flttid1=" << flttid1 << | |
| 30 | 33 | + } | |
| 31 | 34 | + } | |
| 32 | - | +#endif | |
| 35 | + | + | |
| 33 | 36 | if( !formatListsDir->isDirectory() ) | |
| 34 | 37 | continue; | |
| 35 | 38 | ||
| 36 | 39 | Index: Rds/CoRds/LanguageResolver.h | |
| 37 | 40 | =================================================================== | |
| 38 | 41 | --- Rds/CoRds/LanguageResolver.h (revision 9291) | |
| 39 | 42 | +++ Rds/CoRds/LanguageResolver.h (working copy) | |
| 40 | - | @@ -66,6 +66,20 @@ | |
| 43 | + | @@ -60,12 +60,26 @@ | |
| 42 | 44 | } | |
| 45 | + | catch( const std::exception& ex ) | |
| 43 | 53 | ||
| 44 | 54 | + std::string getText( const T_Int32 textIdNumeric ) const | |
| 45 | 55 | + { | |
| 46 | 56 | + try | |
| 47 | 57 | + { | |
| 48 | 58 | + return m_textSource->getText(textIdNumeric, m_currentLangCode.c_str()); | |
| 49 | 59 | + } | |
| 50 | 60 | + catch( const std::exception& ex ) | |
| 51 | 61 | + { | |
| 52 | - | + std::cerr << "Unable to convert textIdNumeric '" << textIdNumeric << "': " << ex.what() << std::endl; | |
| 62 | + | + std::cerr << __func__ << ": Unable to convert textIdNumeric " << textIdNumeric << ": " << ex.what() << std::endl; | |
| 53 | 63 | + } | |
| 54 | 64 | + | |
| 55 | - | + return std::string("not found"); | |
| 65 | + | + return(C_Language::defaultText); | |
| 56 | 66 | + } | |
| 57 | 67 | + | |
| 58 | 68 | const std::string getLangugeCode() | |
| 59 | 69 | { | |
| 60 | 70 | if( ! m_currentLangCode.empty()) | |
| 61 | 71 |
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
rovema.kpaste.net RSS