Exemplo n.º 1
0
        public void ParseDescriptionTest()
        {
            OpenOfficeDictionaries dictionaries = new OpenOfficeDictionaries("dict-en.oxt");
            List<OpenOfficeDictionaryItem> list = dictionaries.GetAvailableDictionaries();
            Assert.AreEqual(5, list.Count);

            CollectionAssert.AreEqual(new string[] { "en-GB" }, list[0].Locales);
            CollectionAssert.AreEqual(new string[] { "en_GB.aff", "en_GB.dic" }, list[0].Locations);
        }
Exemplo n.º 2
0
        public OpenOfficeDictionaryItem(string name, string locations, string locales, OpenOfficeDictionaries dictionaryExtension)
        {
            Name = name;
            locations = locations.Replace("%origin%/", "");
            Locations = locations.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            Locales = locales.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

            this.dictionaryExtension = dictionaryExtension;
        }