MCPcopy Create free account
hub / github.com/buggins/coolreader / OnLoadFileFormatDetected

Method OnLoadFileFormatDetected

android/jni/docview.cpp:63–73  ·  view source on GitHub ↗

format detection finished

Source from the content-addressed store, hash-verified

61 }
62 /// format detection finished
63 virtual void OnLoadFileFormatDetected( doc_format_t fileFormat )
64 {
65 CRLog::info("DocViewCallback::OnLoadFileFormatDetected() called");
66 jobject e = _env.enumByNativeId("org/coolreader/crengine/DocumentFormat", (int)fileFormat);
67 jstring css = (jstring)_env->CallObjectMethod(_obj, _OnLoadFileFormatDetected, e);
68 if ( css ) {
69 lString16 s = _env.fromJavaString(css);
70 CRLog::info("OnLoadFileFormatDetected: setting CSS for format %d", (int)fileFormat);
71 _docview->setStyleSheet( UnicodeToUtf8(s) );
72 }
73 }
74 /// file loading is finished successfully - drawCoveTo() may be called there
75 virtual void OnLoadFileEnd()
76 {

Callers

nothing calls this directly

Calls 4

UnicodeToUtf8Function · 0.85
enumByNativeIdMethod · 0.80
fromJavaStringMethod · 0.80
setStyleSheetMethod · 0.45

Tested by

no test coverage detected