diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2012-12-01 11:17:28 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2012-12-01 11:17:28 +0100 |
| commit | 9e8bd582fe704f06414f4018da65a49976511541 (patch) | |
| tree | 4d40f1247b311ad20ea686fb12deb2261fc5e036 /main/src/cgeo/geocaching/export | |
| parent | 2a399517f9bbd58fdd1f9bb79bac08ef5d1d344d (diff) | |
| download | cgeo-9e8bd582fe704f06414f4018da65a49976511541.zip cgeo-9e8bd582fe704f06414f4018da65a49976511541.tar.gz cgeo-9e8bd582fe704f06414f4018da65a49976511541.tar.bz2 | |
fix #2211: remove application-database indirection
Diffstat (limited to 'main/src/cgeo/geocaching/export')
| -rw-r--r-- | main/src/cgeo/geocaching/export/FieldnoteExport.java | 6 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/export/GpxExport.java | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/export/FieldnoteExport.java b/main/src/cgeo/geocaching/export/FieldnoteExport.java index 028ad54..cbb4762 100644 --- a/main/src/cgeo/geocaching/export/FieldnoteExport.java +++ b/main/src/cgeo/geocaching/export/FieldnoteExport.java @@ -3,7 +3,7 @@ package cgeo.geocaching.export; import cgeo.geocaching.LogEntry; import cgeo.geocaching.R; import cgeo.geocaching.cgCache; -import cgeo.geocaching.cgeoapplication; +import cgeo.geocaching.cgData; import cgeo.geocaching.activity.ActivityMixin; import cgeo.geocaching.activity.Progress; import cgeo.geocaching.connector.gc.Login; @@ -139,13 +139,11 @@ class FieldnoteExport extends AbstractExport { @Override protected Boolean doInBackground(Void... params) { final StringBuilder fieldNoteBuffer = new StringBuilder(); - final cgeoapplication app = cgeoapplication.getInstance(); - try { int i = 0; for (cgCache cache : caches) { if (cache.isLogOffline()) { - appendFieldNote(fieldNoteBuffer, cache, app.loadLogOffline(cache.getGeocode())); + appendFieldNote(fieldNoteBuffer, cache, cgData.loadLogOffline(cache.getGeocode())); publishProgress(++i); } } diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java index 7573db9..b1834b9 100644 --- a/main/src/cgeo/geocaching/export/GpxExport.java +++ b/main/src/cgeo/geocaching/export/GpxExport.java @@ -4,8 +4,8 @@ import cgeo.geocaching.LogEntry; import cgeo.geocaching.R; import cgeo.geocaching.Settings; import cgeo.geocaching.cgCache; +import cgeo.geocaching.cgData; import cgeo.geocaching.cgWaypoint; -import cgeo.geocaching.cgeoapplication; import cgeo.geocaching.activity.ActivityMixin; import cgeo.geocaching.activity.Progress; import cgeo.geocaching.enumerations.CacheAttribute; @@ -143,8 +143,7 @@ class GpxExport extends AbstractExport { gpx.write("<gpx version=\"1.0\" creator=\"c:geo - http://www.cgeo.org\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.topografix.com/GPX/1/0\" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0/1 http://www.groundspeak.com/cache/1/0/1/cache.xsd\">"); for (int i = 0; i < caches.size(); i++) { - // reload the cache. otherwise logs, attributes and other detailed information is not available - final cgCache cache = cgeoapplication.getInstance().loadCache(caches.get(i).getGeocode(), LoadFlags.LOAD_ALL_DB_ONLY); + final cgCache cache = cgData.loadCache(caches.get(i).getGeocode(), LoadFlags.LOAD_ALL_DB_ONLY); gpx.write("<wpt "); gpx.write("lat=\""); |
