Beispiel #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PubEditingHelper"/> class.
        /// </summary>
        /// <param name="decoratedEditingHelper">The decorated editing helper.</param>
        /// <param name="callbacks">The callbacks.</param>
        /// ------------------------------------------------------------------------------------
        public PubEditingHelper(EditingHelper decoratedEditingHelper, IEditingCallbacks callbacks)
            : base(callbacks)
        {
            m_decoratedEditingHelper = decoratedEditingHelper;

            Debug.Assert(callbacks is PublicationControl);
        }
Beispiel #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="TeEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">The callbacks.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="filterInstance">The filter instance.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="app">The app.</param>
		/// ------------------------------------------------------------------------------------
		public TeEditingHelper(IEditingCallbacks callbacks, FdoCache cache, int filterInstance,
			TeViewType viewType, IApp app)
			: base(cache, callbacks)
		{
			if (m_cache == null)
				throw new ArgumentNullException("cache");

			m_scr = m_cache.LangProject.TranslatedScriptureOA;
			m_app = app;

			IFdoServiceLocator servloc = m_cache.ServiceLocator;
			m_repoStText = servloc.GetInstance<IStTextRepository>();
			m_repoScrTxtPara = servloc.GetInstance<IScrTxtParaRepository>();
			m_repoScrBook = servloc.GetInstance<IScrBookRepository>();
			m_repoScrSection = servloc.GetInstance<IScrSectionRepository>();
			m_repoScrFootnote = servloc.GetInstance<IScrFootnoteRepository>();
			m_repoCmTrans = servloc.GetInstance<ICmTranslationRepository>();
			m_wsContainer = servloc.WritingSystems;
			m_repoCmObject = servloc.GetInstance<ICmObjectRepository>();
			m_repoSegment = servloc.GetInstance<ISegmentRepository>();

			m_viewType = viewType;
			m_filterInstance = filterInstance;
			PasteFixTssEvent += RemoveHardFormatting;
		}
Beispiel #3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PubEditingHelper"/> class.
        /// </summary>
        /// <param name="decoratedEditingHelper">The decorated editing helper.</param>
        /// <param name="cache">The FDO cache</param>
        /// <param name="callbacks">The callbacks.</param>
        /// ------------------------------------------------------------------------------------
        public PubEditingHelper(RootSiteEditingHelper decoratedEditingHelper, FdoCache cache,
                                IEditingCallbacks callbacks) : base(cache, callbacks)
        {
            m_decoratedEditingHelper = decoratedEditingHelper;

            Debug.Assert(callbacks is PublicationControl);
        }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="FootnoteEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
		/// <param name="cache">The cache for the DB connection</param>
		/// <param name="filterInstance">The special tag for the book filter</param>
		/// <param name="draftView">The corresponding draftview pane. If we determine that the
		/// "other pane" is supposed to be the other pane in the split window, then this
		/// should be used as the other pane as well.</param>
		/// <param name="viewType">Bit-flags indicating type of view.</param>
		/// <param name="app">The app.</param>
		/// ------------------------------------------------------------------------------------
		public FootnoteEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
			int filterInstance, FwRootSite draftView, TeViewType viewType, IApp app) :
			base(callbacks, cache, filterInstance, viewType, app)
		{
			m_draftView = draftView;
			if (m_draftView != null) // can be null for tests
			{
				m_draftViewEditingHelper = m_draftView.EditingHelper as TeEditingHelper;
				Debug.Assert(m_draftViewEditingHelper != null);
			}
		}
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="FootnoteEditingHelper"/> class.
 /// </summary>
 /// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
 /// <param name="cache">The cache for the DB connection</param>
 /// <param name="filterInstance">The special tag for the book filter</param>
 /// <param name="draftView">The corresponding draftview pane. If we determine that the
 /// "other pane" is supposed to be the other pane in the split window, then this
 /// should be used as the other pane as well.</param>
 /// <param name="viewType">Bit-flags indicating type of view.</param>
 /// <param name="app">The app.</param>
 /// ------------------------------------------------------------------------------------
 public FootnoteEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
                              int filterInstance, FwRootSite draftView, TeViewType viewType, IApp app) :
     base(callbacks, cache, filterInstance, viewType, app)
 {
     m_draftView = draftView;
     if (m_draftView != null)             // can be null for tests
     {
         m_draftViewEditingHelper = m_draftView.EditingHelper as TeEditingHelper;
         Debug.Assert(m_draftViewEditingHelper != null);
     }
 }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="FootnoteEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
		/// <param name="cache">The cache for the DB connection</param>
		/// <param name="filterInstance">The special tag for the book filter</param>
		/// <param name="draftView">The corresponding draftview pane. If we determine that the
		/// "other pane" is supposed to be the other pane in the split window, then this
		/// should be used as the other pane as well.</param>
		/// <param name="isBacktranslation">if set to <c>true</c> we're dealing with
		/// backtranslations.</param>
		/// ------------------------------------------------------------------------------------
		public FootnoteEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
			int filterInstance, FwRootSite draftView, bool isBacktranslation) :
			base(callbacks, cache, filterInstance, TeViewType.FootnoteView | TeViewType.Horizontal |
			(isBacktranslation ? TeViewType.BackTranslation : TeViewType.Scripture))
		{
			m_draftView = draftView;
			if (m_draftView != null) // can be null for tests
			{
				m_draftViewEditingHelper = m_draftView.EditingHelper as TeEditingHelper;
				Debug.Assert(m_draftViewEditingHelper != null);
			}
		}
Beispiel #7
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="FootnoteEditingHelper"/> class.
 /// </summary>
 /// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
 /// <param name="cache">The cache for the DB connection</param>
 /// <param name="filterInstance">The special tag for the book filter</param>
 /// <param name="draftView">The corresponding draftview pane. If we determine that the
 /// "other pane" is supposed to be the other pane in the split window, then this
 /// should be used as the other pane as well.</param>
 /// <param name="isBacktranslation">if set to <c>true</c> we're dealing with
 /// backtranslations.</param>
 /// ------------------------------------------------------------------------------------
 public FootnoteEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
                              int filterInstance, FwRootSite draftView, bool isBacktranslation) :
     base(callbacks, cache, filterInstance, TeViewType.FootnoteView | TeViewType.Horizontal |
          (isBacktranslation ? TeViewType.BackTranslation : TeViewType.Scripture))
 {
     m_draftView = draftView;
     if (m_draftView != null)             // can be null for tests
     {
         m_draftViewEditingHelper = m_draftView.EditingHelper as TeEditingHelper;
         Debug.Assert(m_draftViewEditingHelper != null);
     }
 }
Beispiel #8
0
 /// -----------------------------------------------------------------------------------
 /// <summary>
 /// Construct one.
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="callbacks"></param>
 /// -----------------------------------------------------------------------------------
 public DummyEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
     : base(cache, callbacks)
 {
 }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="NotesEditingHelper"/> class.
		/// </summary>
		/// <param name="cache">The DB connection</param>
		/// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
		/// <param name="filterInstance"></param>
		/// ------------------------------------------------------------------------------------
		public NotesEditingHelper(FdoCache cache, IEditingCallbacks callbacks, int filterInstance)
			: base(cache, callbacks)
		{
			m_scr = m_cache.LangProject.TranslatedScriptureOA;
		}
 /// --------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="T:DummyTeFootnoteEditingHelper"/> class.
 /// </summary>
 /// <param name="callbacks">The callbacks.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="filterInstance">The filter instance.</param>
 /// <param name="draftView">The draft view.</param>
 /// --------------------------------------------------------------------------------
 public DummyTeFootnoteEditingHelper(IEditingCallbacks callbacks,
                                     FdoCache cache, int filterInstance, FwRootSite draftView)
     : base(callbacks, cache, filterInstance, draftView,
            TeViewType.FootnoteView | TeViewType.Horizontal, null)
 {
 }
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="T:DiffViewEditingHelper"/> class.
 /// </summary>
 /// <param name="callbacks">The callbacks.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="filterInstance">The filter instance.</param>
 /// <param name="viewType">Type of the view.</param>
 /// <param name="book">The current book.</param>
 /// <param name="app">The app.</param>
 /// ------------------------------------------------------------------------------------
 public DiffViewEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
                              int filterInstance, TeViewType viewType, IScrBook book, IApp app)
     : base(callbacks, cache, filterInstance, viewType, app)
 {
     m_book = book;
 }
Beispiel #12
0
		public AnnotatedTextEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
			: base(cache, callbacks)
		{
			m_annotationAdjuster = new RawTextPaneAnnotationAdjuster(cache, this);
		}
			/// --------------------------------------------------------------------------------
			/// <summary>
			/// Initializes a new instance of the <see cref="T:DummyTeFootnoteEditingHelper"/> class.
			/// </summary>
			/// <param name="callbacks">The callbacks.</param>
			/// <param name="cache">The cache.</param>
			/// <param name="filterInstance">The filter instance.</param>
			/// <param name="draftView">The draft view.</param>
			/// --------------------------------------------------------------------------------
			public DummyTeFootnoteEditingHelper(IEditingCallbacks callbacks,
				FdoCache cache, int filterInstance, FwRootSite draftView)
				: base(callbacks, cache, filterInstance, draftView, false)
			{
				InTestMode = true;
			}
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OverriddenEditingHelper"/> class.
 /// </summary>
 /// <param name="callbacks">The callbacks.</param>
 /// ------------------------------------------------------------------------------------
 public OverriddenEditingHelper(IEditingCallbacks callbacks)
     : base(callbacks)
 {
 }
Beispiel #15
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="NotesEditingHelper"/> class.
 /// </summary>
 /// <param name="cache">The DB connection</param>
 /// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
 /// <param name="filterInstance"></param>
 /// ------------------------------------------------------------------------------------
 public NotesEditingHelper(FdoCache cache, IEditingCallbacks callbacks, int filterInstance)
     : base(cache, callbacks)
 {
     m_scr = m_cache.LangProject.TranslatedScriptureOA;
 }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:DiffViewEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">The callbacks.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="filterInstance">The filter instance.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="book">The current book.</param>
		/// <param name="app">The app.</param>
		/// ------------------------------------------------------------------------------------
		public DiffViewEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
			int filterInstance, TeViewType viewType, IScrBook book, IApp app)
			: base(callbacks, cache, filterInstance, viewType, app)
		{
			m_book = book;
		}
Beispiel #17
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="DummyTeEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">The callbacks.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="filterInstance">The filter instance.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="app">The app.</param>
		/// ------------------------------------------------------------------------------------
		internal TestTeEditingHelper(IEditingCallbacks callbacks, FdoCache cache, int filterInstance,
			TeViewType viewType, IApp app) : base(callbacks, cache, filterInstance, viewType, app)
		{
		}
 public RuleFormulaEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
     : base(cache, callbacks)
 {
 }
Beispiel #19
0
			public RuleFormulaEditingHelper(IEditingCallbacks callbacks)
				: base(callbacks)
			{
			}
Beispiel #20
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="DummyTeEditingHelper"/> class.
 /// </summary>
 /// <param name="callbacks">The callbacks.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="filterInstance">The filter instance.</param>
 /// <param name="viewType">Type of the view.</param>
 /// <param name="app">The app.</param>
 /// ------------------------------------------------------------------------------------
 internal TestTeEditingHelper(IEditingCallbacks callbacks, FdoCache cache, int filterInstance,
                              TeViewType viewType, IApp app) : base(callbacks, cache, filterInstance, viewType, app)
 {
 }
Beispiel #21
0
 public PatternEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
     : base(cache, callbacks)
 {
 }
Beispiel #22
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="RootSiteEditingHelper"/> class.
 /// </summary>
 /// <param name="cache">The DB connection</param>
 /// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
 /// ------------------------------------------------------------------------------------
 public RootSiteEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
     : base(callbacks)
 {
     m_cache = cache;
 }
			/// --------------------------------------------------------------------------------
			/// <summary>
			///
			/// </summary>
			/// <param name="callbacks"></param>
			/// <param name="cache"></param>
			/// <param name="filterInstance"></param>
			/// <param name="viewType"></param>
			/// --------------------------------------------------------------------------------
			public DummyTeEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
				int filterInstance, TeViewType viewType)
				: base(callbacks, cache, filterInstance, viewType, null)
			{
			}
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="RootSiteEditingHelper"/> class.
		/// </summary>
		/// <param name="cache">The FDO Cache</param>
		/// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
		/// ------------------------------------------------------------------------------------
		public RootSiteEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
			: base(callbacks)
		{
			Cache = cache;
		}
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:OverriddenEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">The callbacks.</param>
		/// ------------------------------------------------------------------------------------
		public OverriddenEditingHelper(IEditingCallbacks callbacks)
			: base(callbacks)
		{
		}
Beispiel #26
0
 public RuleFormulaEditingHelper(IEditingCallbacks callbacks)
     : base(callbacks)
 {
 }
		/// --------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="NotesEditingHelper"/> class.
		/// </summary>
		/// <param name="cache">The DB connection</param>
		/// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
		/// <param name="helpTopicProvider">The Help topic provider.</param>
		/// --------------------------------------------------------------------------------
		public NotesEditingHelper(FdoCache cache, IEditingCallbacks callbacks,
			IHelpTopicProvider helpTopicProvider) : base(cache, callbacks)
		{
			m_scr = m_cache.LangProject.TranslatedScriptureOA;
			m_helpTopicProvider = helpTopicProvider;
		}
			/// --------------------------------------------------------------------------------
			/// <summary>
			/// Initializes a new instance of the <see cref="T:DummyTeFootnoteEditingHelper"/> class.
			/// </summary>
			/// <param name="callbacks">The callbacks.</param>
			/// <param name="cache">The cache.</param>
			/// <param name="filterInstance">The filter instance.</param>
			/// <param name="draftView">The draft view.</param>
			/// --------------------------------------------------------------------------------
			public DummyTeFootnoteEditingHelper(IEditingCallbacks callbacks,
				FdoCache cache, int filterInstance, FwRootSite draftView)
				: base(callbacks, cache, filterInstance, draftView,
				TeViewType.FootnoteView | TeViewType.Horizontal, null)
			{
			}
Beispiel #29
0
 public AnnotatedTextEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
     : base(cache, callbacks)
 {
     m_annotationAdjuster = new RawTextPaneAnnotationAdjuster(cache, this);
 }
Beispiel #30
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="TeEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks">The callbacks.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="filterInstance">The filter instance.</param>
		/// <param name="viewType">Type of the view.</param>
		/// ------------------------------------------------------------------------------------
		public TeEditingHelper(IEditingCallbacks callbacks, FdoCache cache, int filterInstance,
			TeViewType viewType) : base(cache, callbacks)
		{
			CanDoRtL = true;
			if (m_cache != null)
				m_scr = m_cache.LangProject.TranslatedScriptureOA;

			m_viewType = viewType;
			m_filterInstance = filterInstance;
			m_projectSettings = TeProjectSettings.LoadSettings(cache);
			m_annotationAdjuster = new AnnotationAdjuster(cache, this);
			PasteFixTssEvent += RemoveHardFormatting;
			m_syncHandler = new FocusMessageHandling(this);
		}
Beispiel #31
0
		internal DummyDiffViewEditingHelper(IEditingCallbacks callbacks, FdoCache cache, IScrBook book)
			: base(callbacks, cache, 0, TeViewType.Scripture | TeViewType.DiffView, book, null)
		{
		}
Beispiel #32
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="FwEditingHelper"/> class.
 /// </summary>
 /// <param name="cache">The DB connection</param>
 /// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
 /// ------------------------------------------------------------------------------------
 public FwEditingHelper(LcmCache cache, IEditingCallbacks callbacks)
     : base(cache, callbacks)
 {
 }
Beispiel #33
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="FwEditingHelper"/> class.
		/// </summary>
		/// <param name="cache">The DB connection</param>
		/// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
		/// ------------------------------------------------------------------------------------
		public FwEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
			: base(cache, callbacks)
		{
		}
 /// --------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="T:DummyTeFootnoteEditingHelper"/> class.
 /// </summary>
 /// <param name="callbacks">The callbacks.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="filterInstance">The filter instance.</param>
 /// <param name="draftView">The draft view.</param>
 /// --------------------------------------------------------------------------------
 public DummyTeFootnoteEditingHelper(IEditingCallbacks callbacks,
                                     FdoCache cache, int filterInstance, FwRootSite draftView)
     : base(callbacks, cache, filterInstance, draftView, false)
 {
     InTestMode = true;
 }
Beispiel #35
0
			public RuleFormulaEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
				: base(cache, callbacks)
			{
			}
 /// --------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="NotesEditingHelper"/> class.
 /// </summary>
 /// <param name="cache">The DB connection</param>
 /// <param name="callbacks">implementation of <see cref="IEditingCallbacks"/></param>
 /// <param name="helpTopicProvider">The Help topic provider.</param>
 /// --------------------------------------------------------------------------------
 public NotesEditingHelper(FdoCache cache, IEditingCallbacks callbacks,
                           IHelpTopicProvider helpTopicProvider) : base(cache, callbacks)
 {
     m_scr = m_cache.LangProject.TranslatedScriptureOA;
     m_helpTopicProvider = helpTopicProvider;
 }
			/// --------------------------------------------------------------------------------
			/// <summary>
			///
			/// </summary>
			/// <param name="callbacks"></param>
			/// <param name="cache"></param>
			/// <param name="filterInstance"></param>
			/// <param name="viewType"></param>
			/// --------------------------------------------------------------------------------
			public DummyTeEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
				int filterInstance, TeViewType viewType)
				: base(callbacks, cache, filterInstance, viewType)
			{
				InTestMode = true;
			}
Beispiel #38
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="TeEditingHelper"/> class.
		/// </summary>
		/// <param name="callbacks"></param>
		/// <param name="cache"></param>
		/// <param name="filterInstance"></param>
		/// <param name="viewType"></param>
		/// ------------------------------------------------------------------------------------
		public TestTeEditingHelper(IEditingCallbacks callbacks, FdoCache cache,
			int filterInstance, TeViewType viewType)
			: base(callbacks, cache, filterInstance, viewType)
		{
			m_projectSettings.SendSyncMessages = false;
			m_projectSettings.ReceiveSyncMessages = false;
		}
			public ComplexConcPatternEditingHelper(FdoCache cache, IEditingCallbacks callbacks)
				: base(cache, callbacks)
			{
			}