android/Bootstrap/Makefile.shared |    4 ++--
 svtools/source/filter/filter.cxx  |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit ef348c6fc6444343ee8248f3ac1586a97477ba5c
Author: Tor Lillqvist <t...@iki.fi>
Date:   Mon Nov 26 09:40:42 2012 +0200

    Sprinkle some DISABLE_EXPORT, saves 100K of code in an Android view-only app
    
    Change-Id: I1b2840dcd11e38253f3620421b8774b8e0c21cf3

diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index 4d7aeff..4839dfa 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -843,6 +843,8 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const 
String& rPath, SvStream& rS
 
 //--------------------------------------------------------------------------
 
+#ifndef DISABLE_EXPORT
+
 static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& 
rConfigItem )
 {
     Graphic     aGraphic;
@@ -943,6 +945,8 @@ static Graphic ImpGetScaledGraphic( const Graphic& 
rGraphic, FilterConfigItem& r
     return aGraphic;
 }
 
+#endif
+
 static String ImpCreateFullFilterPath( const String& rPath, const String& 
rFilterName )
 {
     ::rtl::OUString aPathURL;
@@ -1840,6 +1844,14 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& 
rGraphic, const String& rPath,
 sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const 
INetURLObject& rPath,
     sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* 
pFilterData )
 {
+#ifdef DISABLE_EXPORT
+    (void) rGraphic;
+    (void) rPath;
+    (void) nFormat;
+    (void) pFilterData;
+
+    return GRFILTER_FORMATERROR;
+#else
     RTL_LOGFILE_CONTEXT( aLog, "GraphicFilter::ExportGraphic() (thb)" );
     sal_uInt16  nRetValue = GRFILTER_FORMATERROR;
     DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, 
"GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" );
@@ -1856,12 +1868,15 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& 
rGraphic, const INetURLO
             ImplDirEntryHelper::Kill( aMainUrl );
     }
     return nRetValue;
+#endif
 }
 
 // ------------------------------------------------------------------------
 
 #ifdef DISABLE_DYNLOADING
 
+#ifndef DISABLE_EXPORT
+
 extern "C" sal_Bool egiGraphicExport( SvStream& rStream, Graphic& rGraphic, 
FilterConfigItem* pConfigItem, sal_Bool );
 extern "C" sal_Bool emeGraphicExport( SvStream& rStream, Graphic& rGraphic, 
FilterConfigItem* pConfigItem, sal_Bool );
 extern "C" sal_Bool epbGraphicExport( SvStream& rStream, Graphic& rGraphic, 
FilterConfigItem* pConfigItem, sal_Bool );
@@ -1875,9 +1890,20 @@ extern "C" sal_Bool expGraphicExport( SvStream& rStream, 
Graphic& rGraphic, Filt
 
 #endif
 
+#endif
+
 sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const 
String& rPath,
     SvStream& rOStm, sal_uInt16 nFormat, const uno::Sequence< 
beans::PropertyValue >* pFilterData )
 {
+#ifdef DISABLE_EXPORT
+    (void) rGraphic;
+    (void) rPath;
+    (void) rOStm;
+    (void) nFormat;
+    (void) pFilterData;
+
+    return GRFILTER_FORMATERROR;
+#else
     RTL_LOGFILE_CONTEXT( aLog, "GraphicFilter::ExportGraphic() (thb)" );
     sal_uInt16 nFormatCount = GetExportFormatCount();
 
@@ -2237,6 +2263,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& 
rGraphic, const String&
         ImplSetError( nStatus, &rOStm );
     }
     return nStatus;
+#endif
 }
 
 // ------------------------------------------------------------------------
@@ -2262,6 +2289,11 @@ sal_Bool GraphicFilter::DoExportDialog( Window* pWindow, 
sal_uInt16 nFormat )
 
 sal_Bool GraphicFilter::DoExportDialog( Window*, sal_uInt16 nFormat, FieldUnit 
)
 {
+#ifdef DISABLE_EXPORT
+    (void) nFormat;
+
+    return sal_False;
+#else
     sal_Bool bRet = sal_False;
      com::sun::star::uno::Reference< 
com::sun::star::lang::XMultiServiceFactory >
         xSMgr( ::comphelper::getProcessServiceFactory() );
@@ -2286,6 +2318,7 @@ sal_Bool GraphicFilter::DoExportDialog( Window*, 
sal_uInt16 nFormat, FieldUnit )
         }
     }
     return bRet;
+#endif
 }
 
 // ------------------------------------------------------------------------
@@ -2343,12 +2376,14 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, 
pData )
             nFormat = GetImportFormatNumberForShortName( 
rtl::OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) );
             nRet = ImportGraphic( pData->maGraphic, String(), pData->mrStm, 
nFormat ) == 0;
         }
+#ifndef DISABLE_EXPORT
         else if( !aShortName.isEmpty() )
         {
             // Export
             nFormat = GetExportFormatNumberForShortName( 
rtl::OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) );
             nRet = ExportGraphic( pData->maGraphic, String(), pData->mrStm, 
nFormat ) == 0;
         }
+#endif
     }
     return nRet;
 }
commit 29f9c062175a87f7862e139a0ded7d2b15731197
Author: Tor Lillqvist <t...@iki.fi>
Date:   Mon Nov 26 09:34:47 2012 +0200

    Let's not break "make clean install"
    
    Change-Id: I1a1694bf4ad463ed18c99c5471c53ca26578dfdb

diff --git a/android/Bootstrap/Makefile.shared 
b/android/Bootstrap/Makefile.shared
index 33659c2..0fa264a 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -68,7 +68,7 @@ uninstall:
 
 clean: android_version_setup properties
        $(ANT) clean
-       rm -rf assets libs $(SODEST) $(OBJLOCAL) 
$(BOOTSTRAPDIR)/no-resource-compress.xml
+       rm -rf assets libs $(SODEST) $(OBJLOCAL)
 
 # If you reinstall an app several times *on the emulator*, even if you
 # uninstall it between, disk space seems to leak that won't get recycled until
commit a9747280ef8579a29da81167bdb6f1dd9b9c8b62
Author: Tor Lillqvist <t...@iki.fi>
Date:   Mon Nov 26 09:33:29 2012 +0200

    It's an emulator, not simulator
    
    Change-Id: I01665f9030c9a544a89d3857f96bf3073c706435

diff --git a/android/Bootstrap/Makefile.shared 
b/android/Bootstrap/Makefile.shared
index 83e9b6a..33659c2 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -70,7 +70,7 @@ clean: android_version_setup properties
        $(ANT) clean
        rm -rf assets libs $(SODEST) $(OBJLOCAL) 
$(BOOTSTRAPDIR)/no-resource-compress.xml
 
-# If you reinstall an app several times *on the simulator*, even if you
+# If you reinstall an app several times *on the emulator*, even if you
 # uninstall it between, disk space seems to leak that won't get recycled until
 # you stop and start... No idea if this holds for a device, too. (And you
 # can't "stop" a device anyway.)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to