[Libreoffice-commits] .: 5 commits - vcl/generic vcl/inc vcl/Library_vcl.mk vcl/null vcl/unx

Tor Lillqvist tml at kemper.freedesktop.org
Tue Jan 10 09:28:49 PST 2012


 vcl/Library_vcl.mk                    |   19 ++++++
 vcl/generic/fontmanager/helper.cxx    |   24 ++++----
 vcl/inc/vcl/helper.hxx                |    2 
 vcl/null/printerinfomanager.cxx       |   99 +++++++++++++++++++++++++++++++++-
 vcl/unx/generic/printer/ppdparser.cxx |    2 
 5 files changed, 132 insertions(+), 14 deletions(-)

New commits:
commit 92ac10d4ec44a72cb4509efe8a04eb3da3556c85
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Jan 10 19:14:35 2012 +0200

    Apparently need more (all?) methods

diff --git a/vcl/null/printerinfomanager.cxx b/vcl/null/printerinfomanager.cxx
index ca99f9f..4616c10 100644
--- a/vcl/null/printerinfomanager.cxx
+++ b/vcl/null/printerinfomanager.cxx
@@ -65,6 +65,21 @@ PrinterInfoManager::PrinterInfoManager( Type eType ) :
     // initSystemDefaultPaper();
 }
 
+PrinterInfoManager::~PrinterInfoManager()
+{
+
+}
+
+bool PrinterInfoManager::checkPrintersChanged( bool /* bWait */ )
+{
+    return false;
+}
+
+void PrinterInfoManager::initialize()
+{
+    // ???
+}
+
 void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const
 {
     rList.clear();
@@ -77,9 +92,74 @@ const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& /* rPrint
     return aEmptyInfo;
 }
 
+void PrinterInfoManager::changePrinterInfo( const OUString& /* rPrinter */, const PrinterInfo& /* rNewInfo */ )
+{
+
+}
+
+bool PrinterInfoManager::writePrinterConfig()
+{
+    return false;
+}
+
+bool PrinterInfoManager::addPrinter( const OUString& /* rPrinterName */, const OUString& /* rDriverName */ )
+{
+    return false;
+}
+
+bool PrinterInfoManager::removePrinter( const OUString& /* rPrinterName */, bool /* bCheckOnly */ )
+{
+    return false;
+}
+
+bool PrinterInfoManager::setDefaultPrinter( const OUString& /* rPrinterName */ )
+{
+    return false;
+}
+
+bool PrinterInfoManager::addOrRemovePossible() const
+{
+    return false;
+}
+
+void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& /* rInfo */ ) const
+{
+
+}
+
+void PrinterInfoManager::getSystemPrintCommands( std::list< OUString >& /* rCommands */ )
+{
+
+}
+
+const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::getSystemPrintQueues()
+{
+    return m_aSystemPrintQueues;
+}
+
 bool PrinterInfoManager::checkFeatureToken( const rtl::OUString& /* rPrinterName */, const char* /* pToken */ ) const
 {
     return false;
 }
 
+FILE* PrinterInfoManager::startSpool( const OUString& /* rPrintername */, bool /* bQuickCommand */ )
+{
+    return NULL;
+}
+
+int PrinterInfoManager::endSpool( const OUString& /*rPrintername*/, const OUString& /*rJobTitle*/, FILE* /* pFile */, const JobData& /*rDocumentJobData*/, bool /*bBanner*/ )
+{
+    return true;
+}
+
+void PrinterInfoManager::setupJobContextData( JobData& /* rData */ )
+{
+
+}
+
+void PrinterInfoManager::setDefaultPaper( PPDContext& /* rContext */ ) const
+{
+
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 5ed6f946881561df3910858e9b482b758c9b828f
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Jan 10 17:48:22 2012 +0200

    Avoid CUPS on Android

diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 3d2cebf..3083803 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -655,7 +655,9 @@ const PPDParser* PPDParser::getParser( const String& rFile )
         PrinterInfoManager& rMgr = PrinterInfoManager::get();
         if( rMgr.getType() == PrinterInfoManager::CUPS )
         {
+#ifndef ANDROID
             pNewParser = const_cast<PPDParser*>(static_cast<CUPSManager&>(rMgr).createCUPSParser( aFile ));
+#endif
         }
     }
     if( pNewParser )
commit a24a1701d027c19c23c1378a94cc00fb46f2c7d7
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Jan 10 17:48:01 2012 +0200

    Rename weird "NetPath" term to the more descriptive "InstallationRootPath"

diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index dc54f08..b35ab24 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -51,7 +51,7 @@ namespace psp {
 
 OUString getOfficePath( enum whichOfficePath ePath )
 {
-    static OUString aNetPath;
+    static OUString aInstallationRootPath;
     static OUString aUserPath;
     static OUString aConfigPath;
     static OUString aEmpty;
@@ -61,8 +61,8 @@ OUString getOfficePath( enum whichOfficePath ePath )
     {
         bOnce = true;
         OUString aIni;
-        Bootstrap::get( OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aNetPath );
-        aIni = aNetPath + OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) );
+        Bootstrap::get( OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aInstallationRootPath );
+        aIni = aInstallationRootPath + OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) );
         Bootstrap aBootstrap( aIni );
         aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomDataUrl" ) ), aConfigPath );
         aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "UserInstallation" ) ), aUserPath );
@@ -74,11 +74,11 @@ OUString getOfficePath( enum whichOfficePath ePath )
             if( osl_getSystemPathFromFileURL( aConfigPath.pData, &aSysPath.pData ) == osl_File_E_None )
                 aConfigPath = aSysPath;
         }
-        if( ! aNetPath.compareToAscii( "file://", 7 ) )
+        if( ! aInstallationRootPath.compareToAscii( "file://", 7 ) )
         {
             OUString aSysPath;
-            if( osl_getSystemPathFromFileURL( aNetPath.pData, &aSysPath.pData ) == osl_File_E_None )
-                aNetPath = aSysPath;
+            if( osl_getSystemPathFromFileURL( aInstallationRootPath.pData, &aSysPath.pData ) == osl_File_E_None )
+                aInstallationRootPath = aSysPath;
         }
         if( ! aUserPath.compareToAscii( "file://", 7 ) )
         {
@@ -100,7 +100,7 @@ OUString getOfficePath( enum whichOfficePath ePath )
     switch( ePath )
     {
         case ConfigPath: return aConfigPath;
-        case NetPath: return aNetPath;
+        case InstallationRootPath: return aInstallationRootPath;
         case UserPath: return aUserPath;
     }
     return aEmpty;
@@ -128,7 +128,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
     OUStringBuffer aPathBuffer( 256 );
 
     // append net path
-    aPathBuffer.append( getOfficePath( psp::NetPath ) );
+    aPathBuffer.append( getOfficePath( psp::InstallationRootPath ) );
     if( aPathBuffer.getLength() )
     {
         aPathBuffer.appendAscii( "/share/psprint" );
@@ -206,7 +206,7 @@ OUString psp::getFontPath()
         OUStringBuffer aPathBuffer( 512 );
 
         OUString aConfigPath( getOfficePath( psp::ConfigPath ) );
-        OUString aNetPath( getOfficePath( psp::NetPath ) );
+        OUString aInstallationRootPath( getOfficePath( psp::InstallationRootPath ) );
         OUString aUserPath( getOfficePath( psp::UserPath ) );
         if( aConfigPath.getLength() )
         {
@@ -227,11 +227,11 @@ OUString psp::getFontPath()
         }
         if( aConfigPath.getLength() == 0 )
         {
-            if( aNetPath.getLength() )
+            if( aInstallationRootPath.getLength() )
             {
-                aPathBuffer.append( aNetPath );
+                aPathBuffer.append( aInstallationRootPath );
                 aPathBuffer.appendAscii( "/share/fonts/truetype;");
-                aPathBuffer.append( aNetPath );
+                aPathBuffer.append( aInstallationRootPath );
                 aPathBuffer.appendAscii( "/share/fonts/type1;" );
             }
             if( aUserPath.getLength() )
diff --git a/vcl/inc/vcl/helper.hxx b/vcl/inc/vcl/helper.hxx
index 732e980..732d4ac 100644
--- a/vcl/inc/vcl/helper.hxx
+++ b/vcl/inc/vcl/helper.hxx
@@ -57,7 +57,7 @@ void VCL_DLLPUBLIC normPath( rtl::OString& rPath );
 // rOrgPath will be subject to normPath
 void VCL_DLLPUBLIC splitPath( rtl::OString& rOrgPath, rtl::OString& rDir, rtl::OString& rBase );
 
-enum whichOfficePath { NetPath, UserPath, ConfigPath };
+enum whichOfficePath { InstallationRootPath, UserPath, ConfigPath };
 // note: gcc 3.4.1 warns about visibility if we retunr a const rtl::OUString& here
 // seems to be a bug in gcc, now we return an object instead of a reference
 rtl::OUString VCL_DLLPUBLIC getOfficePath( enum whichOfficePath ePath );
commit 9d0c50e81b0ebfed6c710817019ce95f6b0ba6ec
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Jan 10 17:46:30 2012 +0200

    Add a couple more methods

diff --git a/vcl/null/printerinfomanager.cxx b/vcl/null/printerinfomanager.cxx
index 934f277..ca99f9f 100644
--- a/vcl/null/printerinfomanager.cxx
+++ b/vcl/null/printerinfomanager.cxx
@@ -62,7 +62,24 @@ PrinterInfoManager::PrinterInfoManager( Type eType ) :
     m_aSystemDefaultPaper( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ),
     m_bDisableCUPS( false )
 {
-    initSystemDefaultPaper();
+    // initSystemDefaultPaper();
+}
+
+void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const
+{
+    rList.clear();
+}
+
+const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& /* rPrinter */ ) const
+{
+    static PrinterInfo aEmptyInfo;
+
+    return aEmptyInfo;
+}
+
+bool PrinterInfoManager::checkFeatureToken( const rtl::OUString& /* rPrinterName */, const char* /* pToken */ ) const
+{
+    return false;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 92c7c579b230f011acdfa3b90b43a0d39b84a14c
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Jan 10 17:45:16 2012 +0200

    Build more code on Android, too

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 4b153f0..8668a0e 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -437,10 +437,29 @@ $(eval $(call gb_Library_add_defs,vcl,\
     -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
 ))
 $(eval $(call gb_Library_add_exception_objects,vcl,\
+    vcl/generic/app/gensys \
+    vcl/generic/app/geninst \
+    vcl/generic/app/gendisp \
+    vcl/generic/print/bitmap_gfx \
+    vcl/generic/print/common_gfx \
+    vcl/generic/print/glyphset \
+    vcl/generic/print/printerjob \
+    vcl/generic/print/psputil \
+    vcl/generic/print/genpspgraphics \
+    vcl/generic/print/genprnpsp \
+    vcl/generic/print/text_gfx \
+    vcl/generic/fontmanager/fontsubst \
+    vcl/generic/glyphs/gcach_ftyp \
+    vcl/generic/glyphs/gcach_layout \
+    vcl/generic/glyphs/gcach_rbmp \
+    vcl/generic/glyphs/glyphcache \
     vcl/generic/fontmanager/fontcache \
     vcl/generic/fontmanager/fontconfig \
     vcl/generic/fontmanager/fontmanager \
+    vcl/generic/fontmanager/helper \
+    vcl/generic/fontmanager/parseAFM \
     vcl/unx/generic/plugadapt/salplug \
+    vcl/unx/generic/printer/jobdata \
     vcl/unx/generic/printer/ppdparser \
     vcl/null/printerinfomanager \
 ))


More information about the Libreoffice-commits mailing list