Commits

Anonymous committed d73a3d3

vcl116: #157567# print an error message on a completly broken system

Comments (0)

Files changed (3)

vcl/inc/vcl/svids.hrc

 #define SV_ACCESSERROR_JAVA_NOT_CONFIGURED  10507
 #define SV_ACCESSERROR_JAVA_DISABLED        10508
 #define SV_ACCESSERROR_TURNAROUND_MSG       10509
-#define SV_ACCESSERROR_LAST			    	SV_ACCESSERROR_TURNAROUND_MSG
+#define SV_ACCESSERROR_NO_FONTS             10510
+#define SV_ACCESSERROR_LAST			    	SV_ACCESSERROR_NO_FONTS
 
 #define SV_SHORTCUT_HELP                    10600
 #define SV_SHORTCUT_CONTEXTHELP             10601

vcl/source/gdi/outdev3.cxx

 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_vcl.hxx"
-#include <cstring>
-#include <i18npool/mslangid.hxx>
-
-#ifndef _SV_SVSYS_HXX
-#include <svsys.h>
+
+#include "i18npool/mslangid.hxx"
+
+#include "svsys.h"
+#include "vcl/salgdi.hxx"
+#include "vcl/sallayout.hxx"
+#include "rtl/tencinfo.h"
+#include "tools/debug.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/metric.hxx"
+#include "vcl/impfont.hxx"
+#include "vcl/metaact.hxx"
+#include "vcl/gdimtf.hxx"
+#include "vcl/outdata.hxx"
+#include "vcl/outfont.hxx"
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolypolygon.hxx"
+#include "basegfx/matrix/b2dhommatrix.hxx"
+#include "tools/poly.hxx"
+#include "vcl/outdev.h"
+#include "vcl/virdev.hxx"
+#include "vcl/print.hxx"
+#include "vcl/event.hxx"
+#include "vcl/window.h"
+#include "vcl/window.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/bmpacc.hxx"
+#include "unotools/fontcvt.hxx"
+#include "vcl/outdev.hxx"
+#include "vcl/edit.hxx"
+#include "unotools/fontcfg.hxx"
+#include "vcl/sysdata.hxx"
+#include "vcl/textlayout.hxx"
+#include "vcl/svids.hrc"
+#include "osl/file.h"
+#ifdef ENABLE_GRAPHITE
+#include "vcl/graphite_features.hxx"
 #endif
-#include <vcl/salgdi.hxx>
-#include <vcl/sallayout.hxx>
-#include <rtl/tencinfo.h>
-#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/metric.hxx>
-#include <vcl/impfont.hxx>
-#include <vcl/metaact.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/outdata.hxx>
-#include <vcl/outfont.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <tools/poly.hxx>
-#include <vcl/outdev.h>
-#include <vcl/virdev.hxx>
-#include <vcl/print.hxx>
-#include <vcl/event.hxx>
-#include <vcl/window.h>
-#include <vcl/window.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/bmpacc.hxx>
-#include <unotools/fontcvt.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/edit.hxx>
-#include <unotools/fontcfg.hxx>
-#include <vcl/sysdata.hxx>
-#include <vcl/textlayout.hxx>
-#ifndef _OSL_FILE_H
-#include <osl/file.h>
-#endif
-#ifdef ENABLE_GRAPHITE
-#include <vcl/graphite_features.hxx>
-#endif
-#ifdef USE_BUILTIN_RASTERIZER
-#include <vcl/glyphcache.hxx>
-#endif
-
-#include <vcl/unohelp.hxx>
-#include <pdfwriter_impl.hxx>
-#include <vcl/controllayout.hxx>
-#include <rtl/logfile.hxx>
-
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HDL_
-#include <com/sun/star/beans/PropertyValues.hdl>
-#endif
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <com/sun/star/i18n/WordType.hpp>
-#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+#include "vcl/glyphcache.hxx"
+
+#include "vcl/unohelp.hxx"
+#include "pdfwriter_impl.hxx"
+#include "vcl/controllayout.hxx"
+#include "rtl/logfile.hxx"
+
+#include "com/sun/star/beans/PropertyValues.hpp"
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/i18n/WordType.hpp"
+#include "com/sun/star/linguistic2/XLinguServiceManager.hpp"
 
 #if defined UNX
 #define GLYPH_FONT_HEIGHT   128
 #define GLYPH_FONT_HEIGHT   256
 #endif
 
-#include <sal/alloca.h>
+#include "sal/alloca.h"
 
 #include <cmath>
 #include <cstring>
             mpGraphics->GetDevFontList( mpFontList );
         }
     }
+    if( meOutDevType == OUTDEV_WINDOW && ! mpFontList->Count() )
+    {
+        String aError( RTL_CONSTASCII_USTRINGPARAM( "Application error: no fonts and no vcl resource found on your system" ) );
+        ResMgr* pMgr = ImplGetResMgr();
+        if( pMgr )
+        {
+            String aResStr( ResId( SV_ACCESSERROR_NO_FONTS, *pMgr ) );
+            if( aResStr.Len() )
+                aError = aResStr;
+        }
+        Application::Abort( aError );
+    }
 }
 
 // =======================================================================

vcl/source/src/stdtext.src

     Text [ en-US ] = "The Java Access Bridge could not be started.";
 };
 
+String SV_ACCESSERROR_NO_FONTS
+{
+    Text [ en-US ] = "No fonts could be found on the system.";
+};
+
 String SV_STDTEXT_ABOUT
 {
     Text [ en-US ] = "About %PRODUCTNAME";
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.