pastebin - collaborative debugging tool
rovema.kpaste.net RSS


cords bug #157 diff #001
Posted by Anonymous on Thu 23rd Sep 2021 12:16
raw | new post
modification of post by Anonymous (view diff)

  1. Index: Rds/CoRds/FormatListExport.cpp
  2. ===================================================================
  3. --- Rds/CoRds/FormatListExport.cpp      (revision 9291)
  4. +++ Rds/CoRds/FormatListExport.cpp      (working copy)
  5. @@ -144,8 +144,32 @@
  6.                                                    formatListsDirectoryLocation );
  7.  
  8.          const auto* formatListDirParent = formatListsDir->getParent();
  9. -        const auto path = formatListDirParent? formatListDirParent->getNodePath( &rds ) : "";
  10. +        auto path = formatListDirParent? formatListDirParent->getNodePath( &rds ) : "";
  11.  
  12. +       T_NodeID flttid1 = 0;
  13. +       rds.nodeExists(formatListsDirectoryLocation, "FormatListTitleTextID1", flttid1, 0);
  14. +       if (flttid1 != 0)
  15. +       {
  16. +               T_Bool  success = false;
  17. +               T_Int32 path_textid;
  18. +               std::string path_textid_str;
  19. +
  20. +               rds.getInt32(flttid1, NULL, success, path_textid, nullptr);
  21. +               if (success)
  22. +               {
  23. +                       path_textid_str = langResolver.getText(path_textid);
  24. +                       path = path_textid_str;
  25. +               }
  26. +               else
  27. +               {
  28. +                       std::cerr << "getFormatLists("
  29. +                               "flttid1=" << flttid1 <<
  30. +                               ", NULL, success=" << success <<
  31. +                               ", path_textid=" << path_textid <<
  32. +                               "): rds.getInt32() failed." << std::endl;
  33. +               }
  34. +       }
  35. +
  36.          if( !formatListsDir->isDirectory() )
  37.              continue;
  38.  
  39. Index: Rds/CoRds/LanguageResolver.h
  40. ===================================================================
  41. --- Rds/CoRds/LanguageResolver.h        (revision 9291)
  42. +++ Rds/CoRds/LanguageResolver.h        (working copy)
  43. @@ -60,12 +60,26 @@
  44.              }
  45.              catch( const std::exception& ex )
  46.              {
  47. -                std::cerr << "Unable to convert textId '" << textId << "': " << ex.what() << std::endl;
  48. +                std::cerr << __func__ << ": Unable to convert textId '" << textId << "': " << ex.what() << std::endl;
  49.              }
  50.          }
  51.          return textId;
  52.      }
  53.  
  54. +    std::string getText( const T_Int32 textIdNumeric ) const
  55. +    {
  56. +       try
  57. +       {
  58. +               return m_textSource->getText(textIdNumeric, m_currentLangCode.c_str());
  59. +       }
  60. +       catch( const std::exception& ex )
  61. +       {
  62. +               std::cerr << __func__ << ": Unable to convert textIdNumeric " << textIdNumeric << ": " << ex.what() << std::endl;
  63. +       }
  64. +
  65. +       return(C_Language::defaultText);
  66. +    }
  67. +
  68.      const std::string getLangugeCode()
  69.      {
  70.          if( ! m_currentLangCode.empty())

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at