| 233 | } |
| 234 | |
| 235 | void WriteConfigFile(ConfigParam* configParam) { |
| 236 | if (!configParam) { |
| 237 | return; |
| 238 | } |
| 239 | |
| 240 | const auto& configPath = GetConfigPath(); |
| 241 | if (configPath.empty()) { |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | std::string filename = configPath + "PAGConfig.xml"; |
| 246 | |
| 247 | XMLDocument doc; |
| 248 | XMLDeclaration* decl = doc.NewDeclaration("xml version=\"1.0\" encoding=\"utf-8\""); |
| 249 | doc.InsertFirstChild(decl); |
| 250 | |
| 251 | XMLElement* root = doc.NewElement("pag-exporter"); |
| 252 | doc.InsertEndChild(root); |
| 253 | |
| 254 | WriteCommonConfig(root, configParam); |
| 255 | WriteBitmapConfig(root, configParam); |
| 256 | |
| 257 | doc.SaveFile(filename.c_str()); |
| 258 | } |
| 259 | } // namespace exporter |
no test coverage detected