pastebin - collaborative debugging tool
rovema.kpaste.net RSS


cords bug #157 diff #001
Posted by Anonymous on Wed 22nd Sep 2021 15:53
raw | new post
view followups (newest first): cords bug #157 diff #001 by Anonymous

  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,29 @@
  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. +#if 1
  13. +       T_NodeID flttid1 = 0;
  14. +       rds.nodeExists(formatListsDirectoryLocation, "FormatListTitleTextID1", flttid1, 0);
  15. +       if (flttid1 != 0)
  16. +       {
  17. +               T_Bool  success = false;
  18. +               T_Int32 path_textid;
  19. +               std::string path_textid_str;
  20. +
  21. +               rds.getInt32(flttid1, NULL, success, path_textid, nullptr);
  22. +               if (success)
  23. +               {
  24. +                       path_textid_str = langResolver.getText(path_textid);
  25. +                       path = path_textid_str;
  26. +               }
  27. +               else
  28. +               {
  29. +                       std::cerr << "getFormatLists(flttid1=" << flttid1 << ", NULL, success=" << success << ", path_textid=" << path_textid << "): rds.getInt32() failed." <<std::endl;
  30. +               }
  31. +       }
  32. +#endif
  33.          if( !formatListsDir->isDirectory() )
  34.              continue;
  35.  
  36. Index: Rds/CoRds/LanguageResolver.h
  37. ===================================================================
  38. --- Rds/CoRds/LanguageResolver.h        (revision 9291)
  39. +++ Rds/CoRds/LanguageResolver.h        (working copy)
  40. @@ -66,6 +66,20 @@
  41.          return textId;
  42.      }
  43.  
  44. +    std::string getText( const T_Int32 textIdNumeric ) const
  45. +    {
  46. +       try
  47. +       {
  48. +               return m_textSource->getText(textIdNumeric, m_currentLangCode.c_str());
  49. +       }
  50. +       catch( const std::exception& ex )
  51. +       {
  52. +               std::cerr << "Unable to convert textIdNumeric '" << textIdNumeric << "': " << ex.what() << std::endl;
  53. +       }
  54. +
  55. +       return std::string("not found");
  56. +    }
  57. +
  58.      const std::string getLangugeCode()
  59.      {
  60.          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