Пример #1
0
        public bool GetTextIteratorForName(string strFontNameOrStyleId, string strXPathFormat,
                                           IteratorMap mapNames2Iterator, bool bConvertAsCharValue)
        {
            bool bAdded = false;

            // before creating and adding this one, make sure it isn't a duplicate (which
            //	can now only happen if the same font is found in two different documents).
            //	It's okay that we'll ignore it in subsequent documents, because before we
            //	convert the files, we re-query for all of them
            if (!mapNames2Iterator.ContainsKey(strFontNameOrStyleId))
            {
                // get an iterator to see if there's any actual data in this font in this document
                //  (and don't add it here if not)
                string strXPathText = String.Format(strXPathFormat,
                                                    QuoteCharToUse(strFontNameOrStyleId),
                                                    strFontNameOrStyleId);
                XPathNodeIterator xpIteratorFontText = GetIterator(strXPathText);
                if ((bAdded = xpIteratorFontText.MoveNext()))
                {
                    mapNames2Iterator.Add(strFontNameOrStyleId, new IteratorXPath(xpIteratorFontText, bConvertAsCharValue));
                }
            }
            else
            {
                Debug.Assert(!Program.IsOnlyOneDoc, "Bad assumption: multiple fonts found for the same type of text and *not* because it's multiple documents! Send this document to [email protected] for help");
            }

            return(bAdded);
        }
Пример #2
0
 public override sealed void ResetMaps()
 {
     MapFontNames2Iterator         = new IteratorMap();
     MapSymbolFontNames2Iterator   = new IteratorMap();
     MapStyleId2Iterator           = new IteratorMap();
     MapDefStyleFontNames2Iterator = new IteratorMap();
     MapPStyleFontNames2Iterator   = new IteratorMap();
     MapCStyleFontNames2Iterator   = new IteratorMap();
 }
Пример #3
0
 public override sealed void ResetMaps()
 {
     MapCustomFontName2Iterator = new IteratorMap();
     MapStyleFontName2Iterator  = new IteratorMap();
     MapStyleName2Iterator      = new IteratorMap();
 }