[Libreoffice-commits] .: 16 commits - basic/Library_sb.mk basic/Module_basic.mk basic/source bridges/source formula/source ios/qa Makefile postprocess/packcomponents postprocess/packregistry RepositoryFixes.mk sc/source sfx2/source solenv/gbuild solenv/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/Package_inc.mk svx/source sw/source vcl/inc vcl/ios vcl/Library_vcl.mk

Tor Lillqvist tml at kemper.freedesktop.org
Sun Mar 4 16:05:44 PST 2012


 Makefile                                                 |    6 
 RepositoryFixes.mk                                       |    1 
 basic/Library_sb.mk                                      |   17 
 basic/Module_basic.mk                                    |    5 
 basic/source/basmgr/basmgr-dummy.cxx                     |  389 ---------------
 basic/source/classes/sbxmod-dummy.cxx                    |  236 ---------
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx          |    8 
 bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl |    9 
 bridges/source/cpp_uno/gcc3_ios_arm/helper.S             |   20 
 bridges/source/cpp_uno/gcc3_ios_arm/makefile.mk          |   23 
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp.cxx          |  117 ++++
 formula/source/core/api/FormulaCompiler.cxx              |    2 
 ios/qa/sc/Makefile                                       |    6 
 postprocess/packcomponents/makefile.mk                   |   59 +-
 postprocess/packregistry/makefile.mk                     |   32 -
 sc/source/core/tool/interpr4.cxx                         |    3 
 sc/source/filter/excel/excimp8.cxx                       |    2 
 sc/source/ui/app/typemap.cxx                             |   71 +-
 sc/source/ui/docshell/docsh4.cxx                         |    6 
 sc/source/ui/docshell/docsh8.cxx                         |    4 
 sc/source/ui/unoobj/servuno.cxx                          |    2 
 sc/source/ui/view/cellsh1.cxx                            |    4 
 sc/source/ui/view/cellsh2.cxx                            |    2 
 sc/source/ui/view/tabvwshf.cxx                           |    4 
 sc/source/ui/view/tabvwshh.cxx                           |    2 
 sfx2/source/appl/app.cxx                                 |   34 +
 sfx2/source/appl/appbas.cxx                              |   36 +
 sfx2/source/appl/appbaslib.cxx                           |   16 
 sfx2/source/appl/appdata.cxx                             |    8 
 sfx2/source/appl/appdde.cxx                              |    3 
 sfx2/source/appl/appquit.cxx                             |    5 
 sfx2/source/appl/appserv.cxx                             |    6 
 sfx2/source/appl/appuno.cxx                              |    7 
 sfx2/source/doc/objserv.cxx                              |    4 
 sfx2/source/doc/objstor.cxx                              |    9 
 sfx2/source/doc/objxtor.cxx                              |   35 +
 sfx2/source/doc/sfxbasemodel.cxx                         |   31 +
 sfx2/source/view/viewfrm.cxx                             |    4 
 solenv/gbuild/platform/com_GCC_class.mk                  |    5 
 solenv/inc/unxiosr.mk                                    |    5 
 svx/Library_svx.mk                                       |    2 
 svx/Library_svxcore.mk                                   |    2 
 svx/Package_inc.mk                                       |    2 
 svx/source/form/fmscriptingenv.cxx                       |    5 
 sw/source/ui/app/docsh.cxx                               |    2 
 vcl/Library_vcl.mk                                       |    5 
 vcl/inc/ios/salcoretextfontutils.hxx                     |   62 ++
 vcl/inc/ios/salframeview.h                               |   72 --
 vcl/ios/source/gdi/salcoretextfontutils.cxx              |  270 ++++++++++
 vcl/ios/source/gdi/salcoretextlayout.cxx                 |  297 +++++++++++
 vcl/ios/source/gdi/salgdiutils.cxx                       |  307 +++++++++++
 vcl/ios/source/gdi/salnativewidgets.cxx                  |  242 +++++++++
 vcl/ios/source/window/salframeview.mm                    |  268 ++++++++++
 53 files changed, 1942 insertions(+), 832 deletions(-)

New commits:
commit e42515549eae51fa625b2d8789f20a5065365ac5
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Mar 5 02:00:40 2012 +0200

    Sprinkle DISABLE_SCRIPTING ifdefs

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 56af5a1..9c6794b 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3108,12 +3108,13 @@ lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
 void ScInterpreter::ScMacro()
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMacro" );
-    SbxBase::ResetError();
 
 #ifdef DISABLE_SCRIPTING
     PushNoValue();      // ohne DocShell kein CallBasic
     return;
 #else
+    SbxBase::ResetError();
+
     sal_uInt8 nParamCount = GetByte();
     String aMacro( pCur->GetExternal() );
 
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index ef09d2b..41d8c38 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -392,9 +392,11 @@ void ImportExcel8::EndSheet( void )
 
 void ImportExcel8::PostDocLoad( void )
 {
+#ifndef DISABLE_SCRIPTING
     // reading basic has been delayed until sheet objects (codenames etc.) are read
     if( HasBasic() )
         ReadBasic();
+#endif
     // #i11776# filtered ranges before outlines and hidden rows
     if( pExcRoot->pAutoFilterBuffer )
         pExcRoot->pAutoFilterBuffer->Apply();
diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx
index 1d4c3a0..257d911 100644
--- a/sc/source/ui/app/typemap.cxx
+++ b/sc/source/ui/app/typemap.cxx
@@ -26,39 +26,13 @@
  *
  ************************************************************************/
 
-
-
 #include <svx/svxids.hrc>
 #include "sc.hrc"
 #include "scitems.hxx"
 #include <editeng/memberids.hrc>
 
-
 #define ITEMID_DBTYPE           0
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 #include <sfx2/msg.hxx>
 #include <svl/stritem.hxx>
 #include <svl/slstitm.hxx>
@@ -132,7 +106,52 @@
 #define SvxChooseControlItem        SfxEnumItem
 #define avmedia_MediaItem           ::avmedia::MediaItem
 
+#if defined(IOS)
+/* Avoid clash with the ones from svx/source/form/typemap.cxx */
+#define aSfxBoolItem_Impl sc_source_ui_appl_typemap_aSfxBoolItem_Impl
+#define aSfxInt32Item_Impl sc_source_ui_appl_typemap_aSfxInt32Item_Impl
+#define aSfxObjectItem_Impl sc_source_ui_appl_typemap_aSfxObjectItem_Impl
+#define aSfxStringItem_Impl sc_source_ui_appl_typemap_aSfxStringItem_Impl
+#define aSfxUInt16Item_Impl sc_source_ui_appl_typemap_aSfxUInt16Item_Impl
+#define aSfxUInt32Item_Impl sc_source_ui_appl_typemap_aSfxUInt32Item_Impl
+#define aSfxVoidItem_Impl sc_source_ui_appl_typemap_aSfxVoidItem_Impl
+#define aSvxCharReliefItem_Impl sc_source_ui_appl_typemap_aSvxCharReliefItem_Impl
+#define aSvxClipboardFmtItem_Impl sc_source_ui_appl_typemap_aSvxClipboardFmtItem_Impl
+#define aSvxColorItem_Impl sc_source_ui_appl_typemap_aSvxColorItem_Impl
+#define aSvxContourItem_Impl sc_source_ui_appl_typemap_aSvxContourItem_Impl
+#define aSvxCrossedOutItem_Impl sc_source_ui_appl_typemap_aSvxCrossedOutItem_Impl
+#define aSvxFontHeightItem_Impl sc_source_ui_appl_typemap_aSvxFontHeightItem_Impl
+#define aSvxFontItem_Impl sc_source_ui_appl_typemap_aSvxFontItem_Impl
+#define aSvxLanguageItem_Impl sc_source_ui_appl_typemap_aSvxLanguageItem_Impl
+#define aSvxPostureItem_Impl sc_source_ui_appl_typemap_aSvxPostureItem_Impl
+#define aSvxShadowedItem_Impl sc_source_ui_appl_typemap_aSvxShadowedItem_Impl
+#define aSvxTextLineItem_Impl sc_source_ui_appl_typemap_aSvxTextLineItem_Impl
+#define aSvxWeightItem_Impl sc_source_ui_appl_typemap_aSvxWeightItem_Impl
+#endif
+
 #define SFX_TYPEMAP
 #include "scslots.hxx"
 
+#if defined(IOS)
+#undef aSfxBoolItem_Impl
+#undef aSfxInt32Item_Impl
+#undef aSfxObjectItem_Impl
+#undef aSfxStringItem_Impl
+#undef aSfxUInt16Item_Impl
+#undef aSfxUInt32Item_Impl
+#undef aSfxVoidItem_Impl
+#undef aSvxCharReliefItem_Impl
+#undef aSvxClipboardFmtItem_Impl
+#undef aSvxColorItem_Impl
+#undef aSvxContourItem_Impl
+#undef aSvxCrossedOutItem_Impl
+#undef aSvxFontHeightItem_Impl
+#undef aSvxFontItem_Impl
+#undef aSvxLanguageItem_Impl
+#undef aSvxPostureItem_Impl
+#undef aSvxShadowedItem_Impl
+#undef aSvxTextLineItem_Impl
+#undef aSvxWeightItem_Impl
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 8b527f5..e92fae8 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -182,12 +182,16 @@ void ScDocShell::Execute( SfxRequest& rReq )
                     }
                     else                // geschuetzte Zelle
                     {
+#ifndef DISABLE_SCRIPTING
                         SbxBase::SetError( SbxERR_BAD_PARAMETER );      //! welchen Fehler ?
+#endif
                         break;
                     }
                 }
             }
+#ifndef DISABLE_SCRIPTING
             SbxBase::SetError( SbxERR_NO_OBJECT );
+#endif
         }
         break;
 
@@ -1098,8 +1102,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
             ScTabViewShell* pSh = GetBestViewShell();
             if ( pSh )
                 pSh->Execute( rReq );
+#ifndef DISABLE_SCRIPTING
             else
                 SbxBase::SetError( SbxERR_NO_ACTIVE_OBJECT );
+#endif
         }
     }
 }
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0f90e04..6c0146f 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -584,6 +584,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
                 xRet.set(static_cast<sheet::XFormulaOpCodeMapper*>(new ScFormulaOpCodeMapperObj(::std::auto_ptr<formula::FormulaCompiler> (pComp))));
                 break;
             }
+#ifndef DISABLE_SCRIPTING
         case SC_SERVICE_VBAOBJECTPROVIDER:
             if (pDocShell && pDocShell->GetDocument()->IsInVBAMode())
             {
@@ -619,6 +620,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
                 }
             }
         break;
+#endif
     }
 
     return xRet;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index ec5b8e8..7fb77ed 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1682,8 +1682,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
                     rReq.Done();
                 }
+#ifndef DISABLE_SCRIPTING
                 else if (rReq.IsAPI())
                     SbxBase::SetError(SbxERR_BAD_PARAMETER);
+#endif
             }
             break;
 
@@ -1727,8 +1729,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 {
                     if (pTabViewShell->InsertName( aName, aSymbol, aAttrib ))
                         rReq.Done();
+#ifndef DISABLE_SCRIPTING
                     else
                         SbxBase::SetError( SbxERR_BAD_PARAMETER );  // Basic-error
+#endif
                 }
             }
             else
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 210277f..77121b7 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -676,8 +676,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
                     }
                     rReq.Done();
                 }
+#ifndef DISABLE_SCRIPTING
                 else if (rReq.IsAPI())
                     SbxBase::SetError(SbxERR_BAD_PARAMETER);
+#endif
             }
             break;
 
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 1858ecc..30638e1 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -447,7 +447,9 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                             {
                                 if( rReq.IsAPI() )
                                 {
+#ifndef DISABLE_SCRIPTING
                                     StarBASIC::Error( SbERR_SETPROP_FAILED ); // XXX Fehlerbehandlung???
+#endif
                                 }
                                 else
                                 {
@@ -784,7 +786,9 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                                 {
                                     if( rReq.IsAPI() )
                                     {
+#ifndef DISABLE_SCRIPTING
                                         StarBASIC::Error( SbERR_SETPROP_FAILED );
+#endif
                                     }
                                 }
                             }
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 0daa167..707cd7f 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -149,8 +149,10 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
                         }
                     }
                 }
+#ifndef DISABLE_SCRIPTING
                 if (!bDone)
                     SbxBase::SetError( SbxERR_BAD_PARAMETER );  // Basic-Fehler
+#endif
             }
             break;
 
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 231a257..e792eea 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -140,7 +140,9 @@ using namespace ::com::sun::star;
 
 // Static member
 SfxApplication* SfxApplication::pApp = NULL;
+#ifndef DISABLE_SCRIPTING
 static BasicDLL*       pBasic   = NULL;
+#endif
 static SfxHelp*        pSfxHelp = NULL;
 
 namespace
@@ -223,8 +225,10 @@ SfxApplication::SfxApplication()
 
     pSfxHelp = new SfxHelp;
 
+#ifndef DISABLE_SCRIPTING
     pBasic   = new BasicDLL;
     StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) );
+#endif
     RTL_LOGFILE_CONTEXT_TRACE( aLog, "} initialize DDE" );
 }
 
@@ -241,8 +245,9 @@ SfxApplication::~SfxApplication()
 
     // delete global options
     SvtViewOptions::ReleaseOptions();
+#ifndef DISABLE_SCRIPTING
     delete pBasic;
-
+#endif
     if ( !pAppData_Impl->bDowning )
         Deinitialize();
 
@@ -482,14 +487,22 @@ void SfxApplication::Invalidate( sal_uInt16 nId )
 #define DOSTRING( x )                       #x
 #define STRING( x )                         DOSTRING( x )
 
+#ifndef DISABLE_SCRIPTING
+
 typedef long (SAL_CALL *basicide_handle_basic_error)(void*);
 typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(void*, sal_Bool, rtl_uString*);
 typedef void* (SAL_CALL *basicide_macro_organizer)(sal_Int16);
 
 extern "C" { static void SAL_CALL thisModule() {} }
 
+#endif
+
 IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) pStarBasic;
+    return 0;
+#else
     // get basctl dllname
     static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
 
@@ -505,12 +518,16 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
     long nRet = pSymbol ? pSymbol( pStarBasic ) : 0;
 
     return nRet;
+#endif
 }
 
 sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
 {
     sal_Bool result = sal_False;
 
+#ifdef DISABLE_SCRIPTING
+    (void) rScriptURL;
+#else
     ::com::sun::star::uno::Reference
         < ::com::sun::star::lang::XMultiServiceFactory > xSMgr =
             ::comphelper::getProcessServiceFactory();
@@ -541,6 +558,7 @@ sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
             // ignore, will just return FALSE
         }
     }
+#endif
     return result;
 }
 
@@ -549,6 +567,7 @@ SfxApplication::ChooseScript()
 {
     ::rtl::OUString aScriptURL;
 
+#ifndef DISABLE_SCRIPTING
     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
     if ( pFact )
     {
@@ -574,11 +593,15 @@ SfxApplication::ChooseScript()
 
           delete pDlg;
     }
+#endif
     return aScriptURL;
 }
 
 void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) nTabId;
+#else
     // get basctl dllname
     static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
 
@@ -592,11 +615,20 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
 
     // call basicide_choose_macro in basctl
     pSymbol( nTabId );
+#endif
 }
 
 ErrCode SfxApplication::CallBasic( const String& rCode, BasicManager* pMgr, SbxArray* pArgs, SbxValue* pRet )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) rCode;
+    (void) pMgr;
+    (void) pArgs;
+    (void) pRet;
+    return ERRCODE_BASIC_CANNOT_LOAD;
+#else
     return pMgr->ExecuteMacro( rCode, pArgs, pRet);
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 12ef3f0..0018663 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -138,48 +138,79 @@ sal_uInt16 SfxApplication::SaveBasicAndDialogContainer() const
 SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
            const char *pName, sal_uInt32 nSID, SbxDataType eType, SbxClassType eClassType )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) pBas;
+    (void) pObject;
+    (void) pName;
+    (void) nSID;
+    (void) eType;
+    (void) eClassType;
+    return 0;
+#else
     SbxVariable *pVar = pBas->Make( String::CreateFromAscii(pName), eClassType, eType ); //SbxCLASS_PROPERTY
     pVar->SetUserData( nSID );
     pVar->SetFlag( SBX_DONTSTORE );
     pObject->StartListening( pVar->GetBroadcaster() );
     return pVar;
+#endif
 }
 
 //--------------------------------------------------------------------
 
 BasicManager* SfxApplication::GetBasicManager()
 {
+#ifdef DISABLE_SCRIPTING
+    return 0;
+#else
     return BasicManagerRepository::getApplicationBasicManager( true );
+#endif
 }
 
 //--------------------------------------------------------------------
 
 Reference< XLibraryContainer > SfxApplication::GetDialogContainer()
 {
+#ifdef DISABLE_SCRIPTING
+    Reference< XLibraryContainer >  dummy;
+    return dummy;
+#else
     if ( !pAppData_Impl->pBasicManager->isValid() )
         GetBasicManager();
     return pAppData_Impl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::DIALOGS );
+#endif
 }
 
 //--------------------------------------------------------------------
 
 Reference< XLibraryContainer > SfxApplication::GetBasicContainer()
 {
+#ifdef DISABLE_SCRIPTING
+    Reference< XLibraryContainer >  dummy;
+    return dummy;
+#else
     if ( !pAppData_Impl->pBasicManager->isValid() )
         GetBasicManager();
     return pAppData_Impl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::SCRIPTS );
+#endif
 }
 
 //--------------------------------------------------------------------
 
 StarBASIC* SfxApplication::GetBasic()
 {
+#ifdef DISABLE_SCRIPTING
+    return 0;
+#else
     return GetBasicManager()->GetLib(0);
+#endif
 }
 
 //-------------------------------------------------------------------------
 void SfxApplication::PropExec_Impl( SfxRequest &rReq )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) rReq;
+#else
     rReq.GetArgs();
     sal_uInt16 nSID = rReq.GetSlot();
     switch ( nSID )
@@ -244,11 +275,15 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
             break;
         }
     }
+#endif
 }
 
 //-------------------------------------------------------------------------
 void SfxApplication::PropState_Impl( SfxItemSet &rSet )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) rSet;
+#else
     SfxWhichIter aIter(rSet);
     for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
     {
@@ -288,6 +323,7 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
             }
         }
     }
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index a5b6e33..a8fb71e 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -55,6 +55,7 @@ void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager )
 {
     impl_releaseContainers();
 
+#ifndef DISABLE_SCRIPTING
     // Note: we do not delete the old BasicManager. BasicManager instances are
     // nowadays obtained from the BasicManagerRepository, and the ownership is with
     // the repository.
@@ -74,10 +75,12 @@ void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager )
             DBG_UNHANDLED_EXCEPTION();
         }
     }
+#endif
 }
 
 void SfxBasicManagerHolder::storeAllLibraries()
 {
+#ifndef DISABLE_SCRIPTING
     OSL_PRECOND( isValid(), "SfxBasicManagerHolder::storeAllLibraries: not initialized!" );
     try
     {
@@ -90,10 +93,14 @@ void SfxBasicManagerHolder::storeAllLibraries()
     {
         DBG_UNHANDLED_EXCEPTION();
     }
+#endif
 }
 
 void SfxBasicManagerHolder::setStorage( const Reference< XStorage >& _rxStorage )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) _rxStorage;
+#else
     try
     {
         if ( mxBasicContainer.is() )
@@ -105,16 +112,21 @@ void SfxBasicManagerHolder::setStorage( const Reference< XStorage >& _rxStorage
     {
         DBG_UNHANDLED_EXCEPTION();
     }
+#endif
 }
 
 void SfxBasicManagerHolder::storeLibrariesToStorage( const Reference< XStorage >& _rxStorage )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) _rxStorage;
+#else
     OSL_PRECOND( isValid(), "SfxBasicManagerHolder::storeLibrariesToStorage: not initialized!" );
 
     if ( mxBasicContainer.is() )
         mxBasicContainer->storeLibrariesToStorage( _rxStorage );
     if ( mxDialogContainer.is() )
         mxDialogContainer->storeLibrariesToStorage( _rxStorage );
+#endif
 }
 
 Reference< XLibraryContainer > SfxBasicManagerHolder::getLibraryContainer( ContainerType _eType )
@@ -139,8 +151,12 @@ void SfxBasicManagerHolder::impl_releaseContainers()
 sal_Bool
 SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( Sequence< rtl::OUString >& sModules )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) sModules;
+#else
     if ( mpBasicManager )
         return mpBasicManager->LegacyPsswdBinaryLimitExceeded( sModules );
+#endif
     return sal_True;
 }
 
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 0358dd4..a5904eb 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -132,7 +132,9 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* )
     , bODFVersionWarningLater( sal_False )
 
 {
+#ifndef DISABLE_SCRIPTING
     BasicManagerRepository::registerCreationListener( *pBasMgrListener );
+#endif
 }
 
 SfxAppData_Impl::~SfxAppData_Impl()
@@ -141,8 +143,10 @@ SfxAppData_Impl::~SfxAppData_Impl()
     delete pTopFrames;
     delete pBasicManager;
 
+#ifndef DISABLE_SCRIPTING
     BasicManagerRepository::revokeCreationListener( *pBasMgrListener );
     delete pBasMgrListener;
+#endif
 }
 
 SfxDocumentTemplates* SfxAppData_Impl::GetDocumentTemplates()
@@ -156,12 +160,16 @@ SfxDocumentTemplates* SfxAppData_Impl::GetDocumentTemplates()
 
 void SfxAppData_Impl::OnApplicationBasicManagerCreated( BasicManager& _rBasicManager )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) _rBasicManager;
+#else
     pBasicManager->reset( &_rBasicManager );
 
     // global constants, additionally to the ones already added by createApplicationBasicManager:
     // ThisComponent
     Reference< XInterface > xCurrentComponent = SfxObjectShell::GetCurrentComponent();
     _rBasicManager.SetGlobalUNOConstant( "ThisComponent", makeAny( xCurrentComponent ) );
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 65be1fc..d46a016 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -350,6 +350,7 @@ long SfxObjectShell::DdeExecute
 */
 
 {
+#ifndef DISABLE_SCRIPTING
     StarBASIC* pBasic = GetBasic();
     DBG_ASSERT( pBasic, "Where is the Basic???" ) ;
     SbxVariable* pRet = pBasic->Execute( rCmd );
@@ -358,7 +359,7 @@ long SfxObjectShell::DdeExecute
         SbxBase::ResetError();
         return 0;
     }
-
+#endif
     return 1;
 }
 
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index f5a8f59..b78b30e 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -90,6 +90,7 @@ void SfxApplication::Deinitialize()
     if ( pAppData_Impl->bDowning )
         return;
 
+#ifndef DISABLE_SCRIPTING
     StarBASIC::Stop();
 
     // Save BASIC if possible
@@ -98,6 +99,7 @@ void SfxApplication::Deinitialize()
         SaveBasicManager();
 
     SaveBasicAndDialogContainer();
+#endif
 
     pAppData_Impl->bDowning = sal_True; // due to Timer from DecAliveCount and QueryExit
 
@@ -122,9 +124,12 @@ void SfxApplication::Deinitialize()
 
     // Release Controller and others
     // then the remaining components should alse disapear ( Beamer! )
+
+#ifndef DISABLE_SCRIPTING
     BasicManagerRepository::resetApplicationBasicManager();
     pAppData_Impl->pBasicManager->reset( NULL );
         // this will also delete pBasMgr
+#endif
 
     DBG_ASSERT( pAppData_Impl->pViewFrame == 0, "active foreign ViewFrame" );
 
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 8070b51..24e8188 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -532,6 +532,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             break;
         }
 
+#ifndef DISABLE_SCRIPTING
         case SID_BASICSTOP:
             StarBASIC::Stop();
             break;
@@ -539,6 +540,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         case SID_BASICBREAK :
             BASIC_DLL()->BasicBreak();
             break;
+#endif
 
         case SID_CRASH :
         {
@@ -666,10 +668,12 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
                     break;
                 }
 
+#ifndef DISABLE_SCRIPTING
                 case SID_BASICSTOP:
                     if ( !StarBASIC::IsRunning() )
                         rSet.DisableItem(nWhich);
                     break;
+#endif
 
                 case SID_HELPTIPS:
                 {
@@ -1174,8 +1178,10 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
                 String aPLZ = pStringItem->GetValue();
                 bRet = sal_True /*!!!SfxIniManager::CheckPLZ( aPLZ )*/;
             }
+#ifndef DISABLE_SCRIPTING
             else
                 SbxBase::SetError( SbxERR_WRONG_ARGS );
+#endif
             rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bRet ) );
         }
         break;
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 6026f19..fe9e65a 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1766,6 +1766,12 @@ void SAL_CALL SfxMacroLoader::removeStatusListener(
 ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::uno::Any& rRetval, SfxObjectShell* pSh )
     throw ( ::com::sun::star::uno::RuntimeException )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) rURL;
+    (void) rRetval;
+    (void) pSh;
+    return ERRCODE_BASIC_PROC_UNDEFINED;
+#else
     SfxObjectShell* pCurrent = pSh;
     if ( !pCurrent )
         // all not full qualified names use the BASIC of the given or current document
@@ -1905,6 +1911,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
 
     SbxBase::ResetError();
     return nErr;
+#endif
 }
 
 SFX_IMPL_XSERVICEINFO( SfxAppDispatchProvider, "com.sun.star.frame.DispatchProvider", "com.sun.star.comp.sfx2.AppDispatchProvider" )                                                                \
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index bce45ff..34565c8 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -766,7 +766,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
                 {
                     if ( !pNameItem )
                     {
+#ifndef DISABLE_SCRIPTING
                         SbxBase::SetError( SbxERR_WRONG_ARGS );
+#endif
                         rReq.Ignore();
                         return;
                     }
@@ -836,7 +838,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
             if ( (!pRegionItem && !pRegionNrItem ) || !pNameItem )
             {
                 DBG_ASSERT( rReq.IsAPI(), "non-API call without Arguments" );
+#ifndef DISABLE_SCRIPTING
                 SbxBase::SetError( SbxERR_WRONG_ARGS );
+#endif
                 rReq.Ignore();
                 return;
             }
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 604d824..dac0751 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -996,7 +996,7 @@ sal_Bool SfxObjectShell::DoSave()
             }
             else
                 bOk = sal_True;
-
+#ifndef DISABLE_SCRIPTING
             if ( HasBasic() )
             {
                 try
@@ -1033,6 +1033,7 @@ sal_Bool SfxObjectShell::DoSave()
                     bOk = sal_False;
                 }
             }
+#endif
         }
 
         if ( bOk )
@@ -3005,7 +3006,7 @@ sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
         sal_Bool bTemplate = ( rMedium.GetFilter()->IsOwnTemplateFormat() && nVersion > SOFFICE_FILEFORMAT_60 );
 
         SetupStorage( xStorage, nVersion, bTemplate );
-
+#ifndef DISABLE_SCRIPTING
         if ( HasBasic() )
         {
             // Initialize Basic
@@ -3014,7 +3015,7 @@ sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
             // Save dialog/script container
             pImp->pBasicManager->storeLibrariesToStorage( xStorage );
         }
-
+#endif
         return SaveAs( rMedium );
     }
     else return sal_False;
@@ -3552,6 +3553,7 @@ void SfxObjectShell::SetConfigOptionsChecked( sal_Bool bChecked )
 
 sal_Bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler )
 {
+#ifndef DISABLE_SCRIPTING
     if ( !HasBasic() )
         return sal_True;
 
@@ -3568,6 +3570,7 @@ sal_Bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference
             return pReq->isApprove();
         }
     }
+#endif
     // No interaction handler, default is to continue to save
     return sal_True;
 }
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 1cda68b..9e20d83 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -126,6 +126,8 @@ namespace {
 
 static WeakReference< XInterface > s_xCurrentComponent;
 
+#ifndef DISABLE_SCRIPTING
+
 // remember all registered components for VBA compatibility, to be able to remove them on disposing the model
 typedef ::std::map< XInterface*, ::rtl::OString > VBAConstantNameMap;
 static VBAConstantNameMap s_aRegisteredVBAConstants;
@@ -151,6 +153,8 @@ static VBAConstantNameMap s_aRegisteredVBAConstants;
     return ::rtl::OString();
 }
 
+#endif
+
 } // namespace
 
 //=========================================================================
@@ -188,6 +192,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
         SfxObjectShell::SetCurrentComponent( Reference< XInterface >() );
     }
 
+#ifndef DISABLE_SCRIPTING
     /*  Remove VBA component from AppBasic. As every application registers its
         own current component, the disposed component may not be the "current
         component" of the SfxObjectShell. */
@@ -201,6 +206,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
             s_aRegisteredVBAConstants.erase( aIt );
         }
     }
+#endif
 
     if ( mpDoc->Get_Impl()->bHiddenLockedByAPI )
     {
@@ -675,6 +681,7 @@ sal_uInt16 SfxObjectShell::PrepareClose
 }
 
 //--------------------------------------------------------------------
+#ifndef DISABLE_SCRIPTING
 namespace
 {
     static BasicManager* lcl_getBasicManagerForDocument( const SfxObjectShell& _rDocument )
@@ -708,15 +715,20 @@ namespace
         return pBasMgr;
     }
 }
+#endif
 
 //--------------------------------------------------------------------
 
 BasicManager* SfxObjectShell::GetBasicManager() const
 {
+#ifdef DISABLE_SCRIPTING
+    return NULL;
+#else
     BasicManager* pBasMgr = lcl_getBasicManagerForDocument( *this );
     if ( !pBasMgr )
         pBasMgr = SFX_APP()->GetBasicManager();
     return pBasMgr;
+#endif
 }
 
 //--------------------------------------------------------------------
@@ -730,6 +742,9 @@ void SfxObjectShell::SetHasNoBasic()
 
 sal_Bool SfxObjectShell::HasBasic() const
 {
+#ifdef DISABLE_SCRIPTING
+    return sal_False;
+#else
     if ( pImp->m_bNoBasicCapabilities )
         return sal_False;
 
@@ -737,9 +752,11 @@ sal_Bool SfxObjectShell::HasBasic() const
         const_cast< SfxObjectShell* >( this )->InitBasicManager_Impl();
 
     return pImp->pBasicManager->isValid();
+#endif
 }
 
 //--------------------------------------------------------------------
+#ifndef DISABLE_SCRIPTING
 namespace
 {
     const Reference< XLibraryContainer >&
@@ -768,11 +785,12 @@ namespace
         return _rxContainer;
     }
 }
-
+#endif
 //--------------------------------------------------------------------
 
 Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
 {
+#ifndef DISABLE_SCRIPTING
     if ( !pImp->m_bNoBasicCapabilities )
         return lcl_getOrCreateLibraryContainer( false, pImp->xDialogLibraries, GetModel() );
 
@@ -781,6 +799,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
         return pBasMgr->GetDialogLibraryContainer().get();
 
     OSL_FAIL( "SfxObjectShell::GetDialogContainer: falling back to the application - is this really expected here?" );
+#endif
     return SFX_APP()->GetDialogContainer();
 }
 
@@ -788,6 +807,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
 
 Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
 {
+#ifndef DISABLE_SCRIPTING
     if ( !pImp->m_bNoBasicCapabilities )
         return lcl_getOrCreateLibraryContainer( true, pImp->xBasicLibraries, GetModel() );
 
@@ -796,6 +816,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
         return pBasMgr->GetScriptLibraryContainer().get();
 
     OSL_FAIL( "SfxObjectShell::GetBasicContainer: falling back to the application - is this really expected here?" );
+#endif
     return SFX_APP()->GetBasicContainer();
 }
 
@@ -803,7 +824,11 @@ Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
 
 StarBASIC* SfxObjectShell::GetBasic() const
 {
+#ifdef DISABLE_SCRIPTING
+    return NULL;
+#else
     return GetBasicManager()->GetLib(0);
+#endif
 }
 
 //--------------------------------------------------------------------
@@ -845,10 +870,12 @@ void SfxObjectShell::InitBasicManager_Impl()
         does not take ownership but stores only the raw pointer. Owner of all
         Basic managers is the global BasicManagerRepository instance.
      */
+#ifndef DISABLE_SCRIPTING
     DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Lokaler BasicManager bereits vorhanden");
     pImp->pBasicManager->reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) );
     DBG_ASSERT( pImp->pBasicManager->isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" );
     pImp->bBasicInitialized = sal_True;
+#endif
 }
 
 //--------------------------------------------------------------------
@@ -930,6 +957,7 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp
     // In other words, it's still possible that we here do something which is not necessary,
     // but we should have filtered quite some unnecessary calls already.
 
+#ifndef DISABLE_SCRIPTING
     BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
     s_xCurrentComponent = _rxComponent;
     if ( pAppMgr )
@@ -958,6 +986,7 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp
             }
         }
     }
+#endif
 }
 
 Reference< XInterface > SfxObjectShell::GetCurrentComponent()
@@ -1022,14 +1051,18 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact )
     {
         aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.formula.FormulaProperties"));
     }
+#ifndef DISABLE_SCRIPTING
     else if ( aFact.EqualsAscii("sbasic") )
     {
         aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.BasicIDE"));
     }
+#endif
+#ifndef DISABLE_DBCONNECTIVITY
     else if ( aFact.EqualsAscii("sdatabase") )
     {
         aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument"));
     }
+#endif
 
     return aServiceName;
 }
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 1ff0f27..b4e0d0a 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -672,16 +672,26 @@ uno::Sequence< sal_Int8 > SAL_CALL SfxBaseModel::getImplementationId() throw( un
 uno::Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShell* pObjectShell )
 {
     uno::Reference< script::XStarBasicAccess > xRet;
+
+#ifdef DISABLE_SCRIPTING
+    (void) pObjectShell;
+#else
     if( pObjectShell )
     {
         BasicManager* pMgr = pObjectShell->GetBasicManager();
         xRet = getStarBasicAccess( pMgr );
     }
+#endif
     return xRet;
 }
 
 uno::Reference< XNAMECONTAINER > SAL_CALL SfxBaseModel::getLibraryContainer() throw( uno::RuntimeException )
 {
+#ifdef DISABLE_SCRIPTING
+    uno::Reference< XNAMECONTAINER > dummy;
+
+    return dummy;
+#else
     SfxModelGuard aGuard( *this );
 
     uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
@@ -692,6 +702,7 @@ uno::Reference< XNAMECONTAINER > SAL_CALL SfxBaseModel::getLibraryContainer() th
     if( rxAccess.is() )
         xRet = rxAccess->getLibraryContainer();
     return xRet;
+#endif
 }
 
 /**___________________________________________________________________________________________________
@@ -701,6 +712,12 @@ void SAL_CALL SfxBaseModel::createLibrary( const ::rtl::OUString& LibName, const
     const ::rtl::OUString& ExternalSourceURL, const ::rtl::OUString& LinkTargetURL )
         throw(ELEMENTEXISTEXCEPTION, uno::RuntimeException)
 {
+#ifdef DISABLE_SCRIPTING
+    (void) LibName;
+    (void) Password;
+    (void) ExternalSourceURL;
+    (void) LinkTargetURL;
+#else
     SfxModelGuard aGuard( *this );
 
     uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
@@ -709,6 +726,7 @@ void SAL_CALL SfxBaseModel::createLibrary( const ::rtl::OUString& LibName, const
 
     if( rxAccess.is() )
         rxAccess->createLibrary( LibName, Password, ExternalSourceURL, LinkTargetURL );
+#endif
 }
 
 /**___________________________________________________________________________________________________
@@ -718,6 +736,12 @@ void SAL_CALL SfxBaseModel::addModule( const ::rtl::OUString& LibraryName, const
     const ::rtl::OUString& Language, const ::rtl::OUString& Source )
         throw( NOSUCHELEMENTEXCEPTION, uno::RuntimeException)
 {
+#ifdef DISABLE_SCRIPTING
+    (void) LibraryName;
+    (void) ModuleName;
+    (void) Language;
+    (void) Source;
+#else
     SfxModelGuard aGuard( *this );
 
     uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
@@ -726,6 +750,7 @@ void SAL_CALL SfxBaseModel::addModule( const ::rtl::OUString& LibraryName, const
 
     if( rxAccess.is() )
         rxAccess->addModule( LibraryName, ModuleName, Language, Source );
+#endif
 }
 
 /**___________________________________________________________________________________________________
@@ -735,6 +760,11 @@ void SAL_CALL SfxBaseModel::addDialog( const ::rtl::OUString& LibraryName, const
     const ::com::sun::star::uno::Sequence< sal_Int8 >& Data )
         throw(NOSUCHELEMENTEXCEPTION, uno::RuntimeException)
 {
+#ifdef DISABLE_SCRIPTING
+    (void) LibraryName;
+    (void) DialogName;
+    (void) Data;
+#else
     SfxModelGuard aGuard( *this );
 
     uno::Reference< script::XStarBasicAccess >& rxAccess = m_pData->m_xStarBasicAccess;
@@ -743,6 +773,7 @@ void SAL_CALL SfxBaseModel::addDialog( const ::rtl::OUString& LibraryName, const
 
     if( rxAccess.is() )
         rxAccess->addDialog( LibraryName, DialogName, Data );
+#endif
 }
 
 
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 62e11ba..0b8a3eb 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2637,6 +2637,9 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sa
  */
 void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) sMacro;
+#else
     if ( sMacro.isEmpty() )
         return;
 
@@ -2816,6 +2819,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
     {
         // add code for "session only" macro
     }
+#endif
 }
 
 void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index d604cb2..1f7b5bf 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -437,6 +437,10 @@ namespace svxform
     //--------------------------------------------------------------------
     void FormScriptingEnvironment::doFireScriptEvent( const ScriptEvent& _rEvent, Any* _pSyncronousResult )
     {
+#ifdef DISABLE_SCRIPTING
+        (void) _rEvent;
+        (void) _pSyncronousResult;
+#else
         SolarMutexClearableGuard aSolarGuard;
         ::osl::ClearableMutexGuard aGuard( m_aMutex );
 
@@ -513,6 +517,7 @@ namespace svxform
             SolarMutexGuard aSolarGuarsReset;
             xObjectShell = NULL;
         }
+#endif
     }
 
     //--------------------------------------------------------------------
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index bb6adec..ef3d10a 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -581,6 +581,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     if( pFlt->GetUserData().EqualsAscii( "HTML") )
     {
         SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
+#ifndef DISABLE_SCRIPTING
         if( !rHtmlOpt.IsStarBasic() && rHtmlOpt.IsStarBasicWarning() && HasBasic() )
         {
             uno::Reference< XLibraryContainer > xLibCont(GetBasicContainer(), UNO_QUERY);
@@ -602,6 +603,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
                 }
             }
         }
+#endif
         UpdateDocInfoForSave();
     }
 
commit af9618b29f186c3991d9225cc50b55dc78612f27
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Mar 5 01:54:14 2012 +0200

    Workaround for weird gbuild looping problem with Clang for iOS

diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index b8de73e..78c1a7e 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -55,10 +55,11 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
 		-c $(3) \
 		-o $(1) \
-		-MMD -MT $(1) \
-		-MP -MF $(4) \
+		$(if $(filter IOS,$(OS)),,-MMD -MT $(1) \
+			-MP -MF $(4)) \
 		-I$(dir $(3)) \
 		$(INCLUDE_STL) $(INCLUDE))
+	$(if $(filter IOS,$(OS)), at echo $(1) : $(3) >$(4))
 endef
 
 define gb_SrsPartTarget__command_dep
commit 07994a5a74a67d790d6fcb59b49ddaa9a3f6eb27
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Mar 5 01:45:32 2012 +0200

    Do deliver dbcharsethelper.hxx even if DISABLE_DBCONNECTIVITY

diff --git a/svx/Package_inc.mk b/svx/Package_inc.mk
index 9eaba5b..bd07e7b 100644
--- a/svx/Package_inc.mk
+++ b/svx/Package_inc.mk
@@ -56,9 +56,7 @@ $(eval $(call gb_Package_add_file,svx_inc,inc/svx/EnhancedCustomShapeFunctionPar
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/ucsubset.hxx,svx/ucsubset.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sderitm.hxx,svx/sderitm.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/obj3d.hxx,svx/obj3d.hxx))
-ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/dbcharsethelper.hxx,svx/dbcharsethelper.hxx))
-endif
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdangitm.hxx,svx/sdangitm.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/grfcrop.hxx,svx/grfcrop.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sxtraitm.hxx,svx/sxtraitm.hxx))
commit 240171aa5da027b6e123e41f1d6368350b9f4290
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Mar 5 01:30:46 2012 +0200

    Don't use HAVE_GCC_VISIBILITY_FEATURE for iOS here
    
    We don't use it in gbuild/platform/IOS_ARM_CCC.mk either. Need to be
    consistent or we get linker warnings. Should we use it? Probably it
    isn't that important for iOS?

diff --git a/solenv/inc/unxiosr.mk b/solenv/inc/unxiosr.mk
index 6928b94..05bded5 100644
--- a/solenv/inc/unxiosr.mk
+++ b/solenv/inc/unxiosr.mk
@@ -40,11 +40,6 @@ LINKOUTPUT_FILTER=
 
 CFLAGS=-fmessage-length=0 -c $(EXTRA_CFLAGS)
 
-# enable visibility define in "sal/types.h"
-.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
-CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
-.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
-
 # ---------------------------------
 #  Compilation flags
 # ---------------------------------
commit cc9b1e4e41f4c958efbe68b931cd0f1010b2a104
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Mar 5 01:24:47 2012 +0200

    Make the iOS ARM code position-independent

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx
index e225a56..8b9e130 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx
@@ -368,7 +368,11 @@ extern "C" void cpp_vtable_call(
 
 extern "C" { 
 extern int nFunIndexes, nVtableOffsets;
-extern unsigned char **codeSnippets; 
+#ifdef __arm
+extern int codeSnippets[];
+#else
+extern unsigned char **codeSnippets;
+#endif
 }
 
 unsigned char * codeSnippet(
@@ -389,7 +393,7 @@ unsigned char * codeSnippet(
         return NULL;
     
 #ifdef __arm
-    return codeSnippets[functionIndex*nVtableOffsets*2 + vtableOffset*2 + bHasHiddenParam];
+    return ((unsigned char *) &codeSnippets) + codeSnippets[functionIndex*nVtableOffsets*2 + vtableOffset*2 + bHasHiddenParam];
 #else
     enum { General, Void, Hyper, Float, Double, Class } exec;
     int flag = 0;
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl b/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
index 4fe9f2f..b6bd0e9 100755
--- a/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
@@ -33,10 +33,9 @@ sub gen_arm ($$)
     my ($funIndex, $vtableOffset) = @_;
     printf ("codeSnippet%08x%d:\n", $funIndex, $vtableOffset);
     printf ("\tmov ip, pc\n");
-    printf ("\tldr pc, [pc, #4]\n");
+    printf ("\tb _privateSnippetExecutor\n");
     printf ("\t.long %#08x\n", $funIndex);
     printf ("\t.long %d\n", $vtableOffset);
-    printf ("\t.long _privateSnippetExecutor\n");
 }
 
 sub gen_x86 ($$$)
@@ -48,8 +47,6 @@ sub gen_x86 ($$$)
     printf ("\tjmp _privateSnippetExecutor%s\n", $executor);
 }
 
-printf ("\t.text\n");
-
 printf ("#ifdef __arm\n");
 printf ("\t.align 4\n");
 
@@ -94,8 +91,8 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
     foreach my $vtableOffset (0 .. $nVtableOffsets-1)
     {
 	printf ("#ifdef __arm\n");
-	printf ("\t.long codeSnippet%08x%d\n", $funIndex, $vtableOffset);
-	printf ("\t.long codeSnippet%08x%d\n", $funIndex|0x80000000, $vtableOffset);
+	printf ("\t.long codeSnippet%08x%d - _codeSnippets\n", $funIndex, $vtableOffset);
+	printf ("\t.long codeSnippet%08x%d - _codeSnippets\n", $funIndex|0x80000000, $vtableOffset);
 	printf ("#else\n");
 	foreach my $executor ('General', 'Void', 'Hyper', 'Float', 'Double', 'Class')
 	{
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/helper.S b/bridges/source/cpp_uno/gcc3_ios_arm/helper.S
index 5a620b6..9c5ada3 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/helper.S
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/helper.S
@@ -24,6 +24,9 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
+#include "codesnippets.S"
+
 #ifdef __arm
 @ ARM support code for LibreOffice C++/UNO bridging
 @
@@ -35,7 +38,6 @@
 	.file	"helper.S"
 	.text
 	.align	4
-	.globl _privateSnippetExecutor
 
 _privateSnippetExecutor:
 	stmfd sp!, {r0-r3}         @ follow other parameters on stack
@@ -53,7 +55,6 @@ _privateSnippetExecutor:
     .text
 
 .align 1, 0x90
-.globl _privateSnippetExecutorGeneral
 _privateSnippetExecutorGeneral:
 LFBg:
     movl    %esp,%ecx
@@ -74,7 +75,6 @@ LFEg:
     .long   .-_privateSnippetExecutorGeneral
 
 .align 1, 0x90
-.globl _privateSnippetExecutorVoid
 _privateSnippetExecutorVoid:
 LFBv:
     movl    %esp,%ecx
@@ -94,7 +94,6 @@ LFEv:
     .long   .-_privateSnippetExecutorVoid
 
 .align 1, 0x90
-.globl _privateSnippetExecutorHyper
 _privateSnippetExecutorHyper:
 LFBh:
     movl    %esp,%ecx
@@ -116,7 +115,6 @@ LFEh:
     .long   .-_privateSnippetExecutorHyper
 
 .align 1, 0x90
-.globl _privateSnippetExecutorFloat
 _privateSnippetExecutorFloat:
 LFBf:
     movl    %esp,%ecx
@@ -137,7 +135,6 @@ LFEf:
     .long   .-_privateSnippetExecutorFloat
 
 .align 1, 0x90
-.globl _privateSnippetExecutorDouble
 _privateSnippetExecutorDouble:
 LFBd:
     movl    %esp,%ecx
@@ -158,7 +155,6 @@ LFEd:
     .long   .-_privateSnippetExecutorDouble
 
 .align 1, 0x90
-.globl _privateSnippetExecutorClass
 _privateSnippetExecutorClass:
 LFBc:
     movl    %esp,%ecx
@@ -201,7 +197,6 @@ LSCIE1:
     .byte   1
     .align 2
 LECIE1:
-    .globl _privateSnippetExecutorGeneral.eh
 _privateSnippetExecutorGeneral.eh:
 LSFDEg:
     .set L$set$g1,LEFDEg-LASFDEg
@@ -224,7 +219,6 @@ LASFDEg:
     .byte   4
     .align 2
 LEFDEg:
-    .globl _privateSnippetExecutorVoid.eh
 _privateSnippetExecutorVoid.eh:
 LSFDEv:
     .set L$set$v1,LEFDEv-LASFDEv
@@ -247,7 +241,6 @@ LASFDEv:
     .byte   4
     .align 2
 LEFDEv:
-    .globl _privateSnippetExecutorHyper.eh
 _privateSnippetExecutorHyper.eh:
 LSFDEh:
     .set L$set$h1,LEFDEh-LASFDEh
@@ -270,7 +263,6 @@ LASFDEh:
     .byte   4
     .align 2
 LEFDEh:
-    .globl _privateSnippetExecutorFloat.eh
 _privateSnippetExecutorFloat.eh:
 LSFDEf:
     .set L$set$f1,LEFDEf-LASFDEf
@@ -293,7 +285,6 @@ LASFDEf:
     .byte   4
     .align 2
 LEFDEf:
-    .globl _privateSnippetExecutorDouble.eh
 _privateSnippetExecutorDouble.eh:
 LSFDEd:
     .set L$set$d1,LEFDEd-LASFDEd
@@ -316,7 +307,6 @@ LASFDEd:
     .byte   4
     .align 2
 LEFDEd:
-    .globl _privateSnippetExecutorClass.eh
 _privateSnippetExecutorClass.eh:
 LSFDEc:
     .set L$set$c1,LEFDEc-LASFDEc
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/makefile.mk b/bridges/source/cpp_uno/gcc3_ios_arm/makefile.mk
index 8854280..e3c48ea 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/makefile.mk
@@ -25,7 +25,7 @@
 #
 #*************************************************************************
 
-PRJ=..$/..$/..
+PRJ=../../..
 
 PRJNAME=bridges
 TARGET=gcc3_uno
@@ -43,20 +43,19 @@ ENABLE_EXCEPTIONS=TRUE
 CFLAGSNOOPT=-O0
 
 SLOFILES= \
-    $(SLO)$/except.obj		\
-    $(SLO)$/cpp2uno.obj		\
-    $(SLO)$/uno2cpp.obj 	\
-    $(SLO)$/codesnippets.obj    \
-    $(SLO)$/helper.obj
+    $(SLO)/except.obj	\
+    $(SLO)/cpp2uno.obj	\
+    $(SLO)/uno2cpp.obj	\
+    $(SLO)/helper.obj
 
 SHL1TARGET= $(TARGET)
 
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+SHL1DEF=$(MISC)/$(SHL1TARGET).def
 SHL1IMPLIB=i$(TARGET)
-SHL1VERSIONMAP=..$/..$/bridge_exports.map
+SHL1VERSIONMAP=../../bridge_exports.map
 
 SHL1OBJS = $(SLOFILES)
-SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
+SHL1LIBS = $(SLB)/cpp_uno_shared.lib
 SHL1RPATH = URELIB
 
 SHL1STDLIBS= \
@@ -68,10 +67,10 @@ SHL1STDLIBS= \
 
 .INCLUDE :  target.mk
 
-$(SLO)$/%.obj: %.S
-    $(CC) -c -o $(SLO)$/$(@:b).o $<
+$(SLO)/helper.obj: helper.S $(MISC)/codesnippets.S generate-snippets.pl
+    $(CC) -c -I $(MISC) -o $(SLO)/helper.o helper.S
     touch $@
 
-codesnippets.S: generate-snippets.pl
+$(MISC)/codesnippets.S: generate-snippets.pl
     $(PERL) generate-snippets.pl >$@
 
commit 8574b1f5b525bd924e6453dc64525faebfd1c4da
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Mar 5 00:25:08 2012 +0200

    Add "clean" target

diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index 3c26b7c..2081346 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -27,3 +27,6 @@ all: $(APPDIR)/$(APP)
 $(APPDIR)/$(APP): $(SRCS)
 	mkdir -p $(APPDIR)
 	$(CXX) -o $@ $(CFLAGS) $(gb_OBJCXXFLAGS) $(SRCS) $(LIBS)
+
+clean:
+	rm -rf $(APPDIR)
commit c91f279e7e2fc1e520758016d35aee723d6e009b
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Mar 4 23:46:09 2012 +0200

    Revert "Build libsb with a few dummy classes also for --disable-scripting"
    
    Nah, these dummy classes would turn out quite complex anyway. Better
    to just use ifdefs elsewhere, the number required is not that large.
    
    This reverts commit 6d33801b4498f5c13d2dc75588f88c22a11f455b.

diff --git a/Makefile b/Makefile
index cd1d27f..b83ee6a 100644
--- a/Makefile
+++ b/Makefile
@@ -384,12 +384,12 @@ bootstrap: $(WORKDIR_BOOTSTRAP)
 #
 build: bootstrap fetch $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross-toolset)
 ifeq ($(DISABLE_SCRIPTING),TRUE)
-# We must get the headers from vbahelper "delivered" because as we
-# don't link to any libs from there they won't otherwise be, or
+# We must get the headers from basic and vbahelper "delivered" because
+# as we don't link to any libs from those they won't otherwise be, or
 # something. And we still do include those headers always even if the
 # libs aren't built in the --disable-scripting case. (Ifdefs for
 # DISABLE_SCRIPTING will be added to the code later as necessary.)
-	$(GNUMAKE) vbahelper
+	$(GNUMAKE) basic vbahelper
 endif
 ifeq ($(DISABLE_DBCONNECTIVITY),TRUE)
 # Ditto for dbconnectivity in the --disable-database-connectivity case
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index c15643f..ef2b957 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -132,6 +132,7 @@ endif # ifeq ($(OS),WNT)
 
 ifeq (,$(filter SCRIPTING,$(BUILD_TYPE)))
 
+gb_Library_FILENAMES := $(patsubst sb:libsb%,,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst vbahelper:libvbahelper%,,$(gb_Library_FILENAMES))
 
 endif
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 0629c39..0171682 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -64,8 +64,6 @@ $(eval $(call gb_Library_add_linked_libs,sb,\
 	$(gb_STDLIBS) \
 ))
 
-ifneq ($(DISABLE_SCRIPTING),TRUE)
-
 $(eval $(call gb_Library_add_exception_objects,sb,\
 	basic/source/basmgr/basicmanagerrepository \
 	basic/source/basmgr/basmgr \
@@ -140,21 +138,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
 	basic/source/sbx/sbxvar \
 ))
 
-else
-
-$(eval $(call gb_Library_add_exception_objects,sb,\
-	basic/source/basmgr/basmgr-dummy \
-	basic/source/classes/sbxmod-dummy \
-))
-
-#	basic/source/classes/sbunoobj-dummy \
-#	basic/source/runtime/basrdll-dummy \
-#	basic/source/sbx/sbxobj-dummy \
-#	basic/source/sbx/sbxvalue-dummy \
-#	basic/source/sbx/sbxvar-dummy \
-
-endif
-
 # Uncomment the following line if DBG_TRACE_PROFILING is active in source/inc/sbtrace.hxx
 # $(eval $(call gb_Library_add_linked_libs,sb,\
 	canvastools \
diff --git a/basic/Module_basic.mk b/basic/Module_basic.mk
index af235db..bbd9b61 100644
--- a/basic/Module_basic.mk
+++ b/basic/Module_basic.mk
@@ -32,6 +32,7 @@ ifneq ($(DISABLE_SCRIPTING),TRUE)
 
 $(eval $(call gb_Module_add_targets,basic,\
 	AllLangResTarget_sb \
+	Library_sb \
 ))
 
 $(eval $(call gb_Module_add_check_targets,basic,\
@@ -41,10 +42,6 @@ $(eval $(call gb_Module_add_check_targets,basic,\
 endif
 
 $(eval $(call gb_Module_add_targets,basic,\
-	Library_sb \
-))
-
-$(eval $(call gb_Module_add_targets,basic,\
 	Package_inc \
 ))
 
diff --git a/basic/source/basmgr/basmgr-dummy.cxx b/basic/source/basmgr/basmgr-dummy.cxx
deleted file mode 100644
index c6f57fb..0000000
--- a/basic/source/basmgr/basmgr-dummy.cxx
+++ /dev/null
@@ -1,389 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <tools/stream.hxx>
-#include <sot/storage.hxx>
-#include <tools/urlobj.hxx>
-#include <svl/smplhint.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/window.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/msgbox.hxx>
-#include <basic/sbx.hxx>
-#include <sot/storinfo.hxx>
-#include <unotools/pathoptions.hxx>
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <basic/sbmod.hxx>
-#include <unotools/intlwrapper.hxx>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/string.hxx>
-
-#include <basic/sbuno.hxx>
-#include <basic/basmgr.hxx>
-#include <basic/global.hxx>
-#include <sbunoobj.hxx>
-#include "basrid.hxx"
-#include "sbintern.hxx"
-#include <sb.hrc>
-
-#include <vector>
-
-#define LIB_SEP         0x01
-#define LIBINFO_SEP     0x02
-#define LIBINFO_ID      0x1491
-#define PASSWORD_MARKER 0x31452134
-
-
-// Library API, implemented for XML import/export
-
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/XContainer.hpp>
-#include <com/sun/star/script/XStarBasicAccess.hpp>
-#include <com/sun/star/script/XStarBasicModuleInfo.hpp>
-#include <com/sun/star/script/XStarBasicDialogInfo.hpp>
-#include <com/sun/star/script/XStarBasicLibraryInfo.hpp>
-#include <com/sun/star/script/XLibraryContainerPassword.hpp>
-#include <com/sun/star/script/ModuleInfo.hpp>
-#include <com/sun/star/script/vba/XVBACompatibility.hpp>
-#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
-
-#include <cppuhelper/implbase1.hxx>
-
-using com::sun::star::uno::Reference;
-using ::std::vector;
-using ::std::advance;
-using namespace com::sun::star::container;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::script;
-using namespace cppu;
-
-typedef WeakImplHelper1< XNameContainer > NameContainerHelper;
-typedef WeakImplHelper1< XStarBasicModuleInfo > ModuleInfoHelper;
-typedef WeakImplHelper1< XStarBasicDialogInfo > DialogInfoHelper;
-typedef WeakImplHelper1< XStarBasicLibraryInfo > LibraryInfoHelper;
-typedef WeakImplHelper1< XStarBasicAccess > StarBasicAccessHelper;
-
-// Version 1
-//    sal_uIntPtr   nEndPos
-//    sal_uInt16    nId
-//    sal_uInt16    nVer
-//    sal_Bool      bDoLoad
-//    String    LibName
-//    String    AbsStorageName
-//    String    RelStorageName
-// Version 2
-//  + sal_Bool      bReference
-
-TYPEINIT1( BasicManager, SfxBroadcaster );
-DBG_NAME( BasicManager );
-
-StreamMode eStreamReadMode = STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL;
-StreamMode eStorageReadMode = STREAM_READ | STREAM_SHARE_DENYWRITE;
-
-//----------------------------------------------------------------------------
-// BasicManager impl data
-struct BasicManagerImpl
-{
-};
-
-BasicError::BasicError( sal_uIntPtr nId, sal_uInt16 nR, const String& rErrStr ) :
-    aErrStr( rErrStr )
-{
-    nErrorId    = nId;
-    nReason     = nR;
-}
-
-BasicError::BasicError( const BasicError& rErr ) :
-    aErrStr( rErr.aErrStr )
-{
-    nErrorId    = rErr.nErrorId;
-    nReason     = rErr.nReason;
-}
-
-
-//=====================================================================
-
-class BasicLibInfo
-{
-};
-
-
-//=====================================================================
-
-class BasicLibs
-{
-};
-
-BasicManager::BasicManager( SotStorage& /* rStorage */, const String& /* rBaseURL */, StarBASIC* /* pParentFromStdLib */, String* /* pLibPath */, sal_Bool /* bDocMgr */ )
-{
-}
-
-#if 0
-const Reference< XPersistentLibraryContainer >& BasicManager::GetDialogLibraryContainer()  const
-{
-    static Reference< XPersistentLibraryContainer > dummy;
-
-    return dummy;
-}
-
-const Reference< XPersistentLibraryContainer >& BasicManager::GetScriptLibraryContainer()  const
-{
-    static Reference< XPersistentLibraryContainer > dummy;
-
-    return dummy;
-}
-#endif
-void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& /* rInfo */ )
-{
-}
-
-BasicManager::BasicManager( StarBASIC* /* pSLib */, String* /* pLibPath */, sal_Bool /* bDocMgr */ )
-{
-}
-
-void BasicManager::ImpMgrNotLoaded( const String& /* rStorageName */ )
-{
-}
-
-
-void BasicManager::ImpCreateStdLib( StarBASIC* /* pParentFromStdLib */ )
-{
-}
-
-void BasicManager::LoadBasicManager( SotStorage& /* rStorage */, const String& /* rBaseURL */, sal_Bool /* bLoadLibs */ )
-{
-}
-
-void BasicManager::LoadOldBasicManager( SotStorage& /* rStorage */ )
-{
-}
-
-BasicManager::~BasicManager()
-{
-    DBG_DTOR( BasicManager, 0 );
-
-    // Notify listener if something needs to be saved
-    Broadcast( SfxSimpleHint( SFX_HINT_DYING) );
-
-    // Destroy Basic-Infos...
-    // In reverse order
-    delete pLibs;
-    delete mpImpl;
-}
-
-void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager )
-{
-    delete _rpManager;
-    _rpManager = NULL;
-}
-
-
-bool BasicManager::HasExeCode( const String& /* sLib */ )
-{
-    return false;
-}
-
-void BasicManager::Init()
-{
-}
-
-BasicLibInfo* BasicManager::CreateLibInfo()
-{
-    return 0;
-}
-
-sal_Bool BasicManager::ImpLoadLibary( BasicLibInfo* /* pLibInfo */, SotStorage* /* pCurStorage */, sal_Bool /* bInfosOnly */ )
-{
-    return sal_False;
-}
-
-sal_Bool BasicManager::ImplEncryptStream( SvStream& /* rStrm */ ) const
-{
-    return sal_False;
-}
-
-// This code is necessary to load the BASIC of Beta 1
-// TODO: Which Beta 1?
-sal_Bool BasicManager::ImplLoadBasic( SvStream& /* rStrm */, StarBASICRef& /* rOldBasic */ ) const
-{
-    return sal_False;
-}
-
-void BasicManager::CheckModules( StarBASIC* /* pLib */, sal_Bool /* bReference */ ) const
-{
-}
-
-StarBASIC* BasicManager::AddLib( SotStorage& /* rStorage */, const String& /* rLibName */, sal_Bool /* bReference */ )
-{
-    return 0;
-}
-
-sal_Bool BasicManager::IsReference( sal_uInt16 /* nLib */ )
-{
-    return sal_False;
-}
-
-sal_Bool BasicManager::RemoveLib( sal_uInt16 /* nLib */ )
-{
-    return sal_False;
-}
-
-sal_Bool BasicManager::RemoveLib( sal_uInt16 /* nLib */, sal_Bool /* bDelBasicFromStorage */ )
-{
-    return sal_False;
-}
-
-sal_uInt16 BasicManager::GetLibCount() const
-{
-    return 0;
-}
-
-StarBASIC* BasicManager::GetLib( sal_uInt16 /* nLib */ ) const
-{
-    return 0;
-}
-
-StarBASIC* BasicManager::GetStdLib() const
-{
-    return 0;
-}
-
-StarBASIC* BasicManager::GetLib( const String& /* rName */ ) const
-{
-    return 0;
-}
-
-sal_uInt16 BasicManager::GetLibId( const String& /* rName */ ) const
-{
-    return LIB_NOTFOUND;
-}
-
-sal_Bool BasicManager::HasLib( const String& /* rName */ ) const
-{
-    return sal_False;
-}
-
-sal_Bool BasicManager::SetLibName( sal_uInt16 /* nLib */, const String& /* rName */ )
-{
-    return sal_False;
-}
-
-String BasicManager::GetLibName( sal_uInt16 /* nLib */ )
-{
-    return String();
-}
-
-sal_Bool BasicManager::LoadLib( sal_uInt16 /* nLib */ )
-{
-    return sal_False;
-}
-
-StarBASIC* BasicManager::CreateLib( const String& /* rLibName */ )
-{
-    return 0;
-}
-
-// For XML import/export:
-StarBASIC* BasicManager::CreateLib
-( const String& /* rLibName */, const String& /* Password */, const String& /* LinkTargetURL */ )
-{
-    return 0;
-}
-
-StarBASIC* BasicManager::CreateLibForLibContainer( const String& /* rLibName */,
-                                                   const Reference< XLibraryContainer >& /* xScriptCont */ )
-{
-    return 0;
-}
-
-
-BasicLibInfo* BasicManager::FindLibInfo( StarBASIC* /* pBasic */ ) const
-{
-    return 0;
-}
-
-
-sal_Bool BasicManager::IsModified() const
-{
-    return sal_False;
-}
-
-sal_Bool BasicManager::IsBasicModified() const
-{
-    return sal_False;
-}
-
-std::vector<BasicError>& BasicManager::GetErrors()
-{
-    static std::vector<BasicError> dummy;
-
-    return dummy;
-}
-
-bool BasicManager::GetGlobalUNOConstant( const sal_Char* /* _pAsciiName */, ::com::sun::star::uno::Any& /* aOut */ )
-{
-    return false;
-}
-
-Any BasicManager::SetGlobalUNOConstant( const sal_Char* /* _pAsciiName */, const Any& /* _rValue */ )
-{
-    return Any();
-}
-
-bool BasicManager::LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& /* _out_rModuleNames */ )
-{
-    return false;
-}
-
-
-bool BasicManager::HasMacro( String const& /* i_fullyQualifiedName */ ) const
-{
-    return false;
-}
-
-ErrCode BasicManager::ExecuteMacro( String const& /* i_fullyQualifiedName */, SbxArray* /* i_arguments */, SbxValue* /* retValue */ )
-{
-    return ERRCODE_BASIC_PROC_UNDEFINED;
-}
-
-ErrCode BasicManager::ExecuteMacro( String const& /* i_fullyQualifiedName */, String const& /* i_commaSeparatedArgs */, SbxValue* /* i_retValue */ )
-{
-    return ERRCODE_BASIC_PROC_UNDEFINED;
-}
-
-// Basic XML Import/Export
-Reference< XStarBasicAccess > getStarBasicAccess( BasicManager* /* pMgr */ )
-{
-    static Reference< XStarBasicAccess > dummy;
-
-    return dummy;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/classes/sbxmod-dummy.cxx b/basic/source/classes/sbxmod-dummy.cxx
deleted file mode 100644
index f83d9db..0000000
--- a/basic/source/classes/sbxmod-dummy.cxx
+++ /dev/null
@@ -1,236 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include <list>
-
-#include <vcl/svapp.hxx>
-#include <tools/stream.hxx>
-#include <svl/brdcst.hxx>
-#include <tools/shl.hxx>
-#include <basic/sbx.hxx>
-#include "sbdiagnose.hxx"
-#include "sb.hxx"
-#include <sbjsmeth.hxx>
-#include "sbjsmod.hxx"
-#include "sbintern.hxx"
-#include "image.hxx"
-#include "opcodes.hxx"
-#include "runtime.hxx"
-#include "token.hxx"
-#include "sbunoobj.hxx"
-
-#include <svtools/syntaxhighlight.hxx>
-
-#include <basic/basrdll.hxx>
-#include <osl/mutex.hxx>
-#include <basic/sbobjmod.hxx>
-#include <basic/vbahelper.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <unotools/eventcfg.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/vba/XVBACompatibility.hpp>
-#include <com/sun/star/document/XVbaMethodParameter.hpp>
-#include <com/sun/star/script/vba/VBAScriptEventId.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/document/XEventBroadcaster.hpp>
-#include <com/sun/star/document/XEventListener.hpp>
-
-using namespace com::sun::star;
-
-#include <stdio.h>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <comphelper/processfactory.hxx>
-#include <vcl/svapp.hxx>
-#include <map>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <basic/sbobjmod.hxx>
-#include <com/sun/star/uno/XAggregation.hpp>
-#include <com/sun/star/script/XInvocation.hpp>
-
-using namespace ::com::sun::star;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::reflection;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::script;
-
-
-#include <com/sun/star/script/XLibraryContainer.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/awt/XDialogProvider.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <comphelper/anytostring.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/VbQueryClose.hpp>
-
-typedef ::cppu::WeakImplHelper1< XInvocation > DocObjectWrapper_BASE;
-typedef ::std::map< sal_Int16, Any, ::std::less< sal_Int16 > > OutParamMap;
-::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
-void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue );
-
-// TYPEINIT1(SbModule,SbxObject)
-// TYPEINIT1(SbMethod,SbxMethod)
-
-SbModule::SbModule( const String& /* rName */,  sal_Bool /* bVBACompat */ )
-         : SbxObject( String( ) )
-{
-}
-
-SbModule::~SbModule()
-{
-}
-
-uno::Reference< script::XInvocation >
-SbModule::GetUnoModule()
-{
-    static uno::Reference< script::XInvocation > dummy;
-
-    return dummy;
-}
-
-sal_Bool SbModule::IsCompiled() const
-{
-    return sal_False;
-}
-
-const SbxObject* SbModule::FindType( String /* aTypeName */ ) const
-{
-    return 0;
-}
-
-void SbModule::Clear()
-{
-}
-
-SbxVariable* SbModule::Find( const XubString& /* rName */, SbxClassType /* t */ )
-{
-    return 0;
-}
-
-const ::rtl::OUString& SbModule::GetSource32() const
-{
-    static ::rtl::OUString dummy;
-
-    return dummy;
-}
-
-const String& SbModule::GetSource() const
-{
-    static String dummy;
-
-    return dummy;
-}
-
-void SbModule::SetParent( SbxObject* /* p */ )
-{
-}
-
-void SbModule::SFX_NOTIFY( SfxBroadcaster& /* rBC */, const TypeId& /* rBCType */,
-                           const SfxHint& /* rHint */, const TypeId& /* rHintType */ )
-{
-}
-
-void SbModule::SetSource( const String& /* r */ )
-{
-}
-
-SbMethod* SbModule::GetFunctionForLine( sal_uInt16 /* nLine */ )
-{
-    return 0;
-}
-
-sal_Bool SbModule::IsVBACompat() const
-{
-    return sal_False;
-}
-
-void SbModule::SetVBACompat( sal_Bool /* bCompat */ )
-{
-}
-
-sal_Bool SbModule::IsBreakable( sal_uInt16 /* nLine */ ) const
-{
-    return sal_False;
-}
-
-size_t SbModule::GetBPCount() const
-{
-    return 0;
-}
-
-sal_uInt16 SbModule::GetBP( size_t /* n */ ) const
-{
-    return 0;
-}
-
-sal_Bool SbModule::IsBP( sal_uInt16 /* nLine */ ) const
-{
-    return sal_False;
-}
-
-sal_Bool SbModule::SetBP( sal_uInt16 /* nLine */ )
-{
-    return sal_False;
-}
-
-sal_Bool SbModule::ClearBP( sal_uInt16 /* nLine */ )
-{
-    return sal_False;
-}
-
-void SbModule::ClearAllBP()
-{
-}
-
-sal_Bool SbModule::LoadData( SvStream& /* rStrm */, sal_uInt16 /* nVer */ )
-{
-    return sal_False;
-}
-
-sal_Bool SbModule::StoreData( SvStream& /* rStrm */ ) const
-{
-    return sal_False;
-}
-
-sal_Bool SbModule::LoadCompleted()
-{
-    return sal_False;
-}
-
-sal_Bool SbModule::Compile()
-{
-    return sal_False;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index 3bfbcdd..3c26b7c 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -20,7 +20,7 @@ SRCS = filters-test.m
 
 CFLAGS = $(SOLARINC)
 
-LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsblo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
+LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
 
 all: $(APPDIR)/$(APP)
 
commit 8d8c7739d7d47aa8da481d12b94d2d195bbe0467
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Mar 4 23:24:51 2012 +0200

    More libs

diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index ae50f1d..3bfbcdd 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -20,7 +20,7 @@ SRCS = filters-test.m
 
 CFLAGS = $(SOLARINC)
 
-LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -li18nisolang1gcc3 -li18npaperlo -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsblo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
+LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsblo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
 
 all: $(APPDIR)/$(APP)
 
commit 87618ea84b5b8e2cb0524311315abbcb1c7755be
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Mar 4 23:24:22 2012 +0200

    Brutal dummy hacks based on "aqua" code just to get iOS stuff to link

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 843dceb..3e4aa8a 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -517,6 +517,7 @@ $(eval $(call gb_Library_add_cxxflags,vcl,\
 $(eval $(call gb_Library_add_objcxxobjects,vcl,\
     vcl/ios/source/app/salnstimer \
     vcl/ios/source/app/vcluiapp \
+    vcl/ios/source/window/salframeview \
 ))
 $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/ios/source/app/saldata \
@@ -526,8 +527,12 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/ios/source/dtrans/iOSTransferable \
     vcl/ios/source/dtrans/ios_clipboard \
     vcl/ios/source/dtrans/service_entry \
+    vcl/ios/source/gdi/salcoretextfontutils \
+    vcl/ios/source/gdi/salcoretextlayout \
     vcl/ios/source/gdi/salbmp \
     vcl/ios/source/gdi/salgdi \
+    vcl/ios/source/gdi/salnativewidgets \
+    vcl/ios/source/gdi/salgdiutils \
     vcl/ios/source/gdi/salvd \
     vcl/ios/source/window/salframe \
     vcl/ios/source/window/salmenu \
diff --git a/vcl/inc/ios/salcoretextfontutils.hxx b/vcl/inc/ios/salcoretextfontutils.hxx
new file mode 100644
index 0000000..ed94b91
--- /dev/null
+++ b/vcl/inc/ios/salcoretextfontutils.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALCORETEXTFONTUTILS_HXX
+#define _SV_SALCORETEXTFONTUTILS_HXX
+
+class ImplIosFontData;
+class ImplDevFontList;
+
+#include <premac.h>
+#include <CoreText/CoreText.h>
+#include <postmac.h>
+
+#include <map>
+
+/* This class has the responsibility of assembling a list of CoreText
+   fonts available on the system and enabling access to that list.
+ */
+class SystemFontList
+{
+public:
+    SystemFontList();
+    ~SystemFontList();
+
+    void AnnounceFonts( ImplDevFontList& ) const;
+    ImplIosFontData* GetFontDataFromRef( CTFontRef ) const;
+
+private:
+    typedef boost::unordered_map<CTFontRef,ImplIosFontData*> IosFontContainer;
+    IosFontContainer maFontContainer;
+
+    void InitGlyphFallbacks();
+};
+
+#endif  // _SV_SALCORETEXTFONTUTILS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salframeview.h b/vcl/inc/ios/salframeview.h
index e631209..6925989 100644
--- a/vcl/inc/ios/salframeview.h
+++ b/vcl/inc/ios/salframeview.h
@@ -64,79 +64,7 @@
 -(BOOL)acceptsFirstResponder;
 -(BOOL)isOpaque;
 -(void)drawRect: (CGRect)aRect;
--(void)magnifyWithEvent: (UIEvent*)pEvent;
--(void)rotateWithEvent: (UIEvent*)pEvent;
--(void)swipeWithEvent: (UIEvent*)pEvent;
--(void)keyDown: (UIEvent*)pEvent;
 -(void)flagsChanged: (UIEvent*)pEvent;
--(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar;
--(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
--(BOOL)sendKeyToFrameDirect: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
--(BOOL)sendSingleCharacter:(UIEvent*)pEvent;
--(BOOL)handleKeyDownException:(UIEvent*)pEvent;
--(void)clearLastEvent;
-/*
-    text action methods
-*/
--(void)insertText:(id)aString;
--(void)insertTab: (id)aSender;
--(void)insertBacktab: (id)aSender;
--(void)moveLeft: (id)aSender;
--(void)moveLeftAndModifySelection: (id)aSender;
--(void)moveBackwardAndModifySelection: (id)aSender;
--(void)moveRight: (id)aSender;
--(void)moveRightAndModifySelection: (id)aSender;
--(void)moveForwardAndModifySelection: (id)aSender;
--(void)moveUp: (id)aSender;
--(void)moveDown: (id)aSender;
--(void)moveWordBackward: (id)aSender;
--(void)moveWordBackwardAndModifySelection: (id)aSender;
--(void)moveWordLeftAndModifySelection: (id)aSender;
--(void)moveWordForward: (id)aSender;
--(void)moveWordForwardAndModifySelection: (id)aSender;
--(void)moveWordRightAndModifySelection: (id)aSender;
--(void)moveToEndOfLine: (id)aSender;
--(void)moveToRightEndOfLine: (id)aSender;
--(void)moveToLeftEndOfLine: (id)aSender;
--(void)moveToEndOfLineAndModifySelection: (id)aSender;
--(void)moveToRightEndOfLineAndModifySelection: (id)aSender;
--(void)moveToLeftEndOfLineAndModifySelection: (id)aSender;
--(void)moveToBeginningOfLine: (id)aSender;
--(void)moveToBeginningOfLineAndModifySelection: (id)aSender;
--(void)moveToEndOfParagraph: (id)aSender;
--(void)moveToEndOfParagraphAndModifySelection: (id)aSender;
--(void)moveToBeginningOfParagraph: (id)aSender;
--(void)moveToBeginningOfParagraphAndModifySelection: (id)aSender;
--(void)moveParagraphForward: (id)aSender;
--(void)moveParagraphForwardAndModifySelection: (id)aSender;
--(void)moveParagraphBackward: (id)aSender;
--(void)moveParagraphBackwardAndModifySelection: (id)aSender;
--(void)moveToEndOfDocument: (id)aSender;
--(void)scrollToEndOfDocument: (id)aSender;
--(void)moveToEndOfDocumentAndModifySelection: (id)aSender;
--(void)moveToBeginningOfDocument: (id)aSender;
--(void)scrollToBeginningOfDocument: (id)aSender;
--(void)moveToBeginningOfDocumentAndModifySelection: (id)aSender;
--(void)insertNewline: (id)aSender;
--(void)deleteBackward: (id)aSender;
--(void)deleteForward: (id)aSender;
--(void)cancelOperation: (id)aSender;
--(void)deleteBackwardByDecomposingPreviousCharacter: (id)aSender;
--(void)deleteWordBackward: (id)aSender;
--(void)deleteWordForward: (id)aSender;
--(void)deleteToBeginningOfLine: (id)aSender;
--(void)deleteToEndOfLine: (id)aSender;
--(void)deleteToBeginningOfParagraph: (id)aSender;
--(void)deleteToEndOfParagraph: (id)aSender;
--(void)insertLineBreak: (id)aSender;
--(void)insertParagraphSeparator: (id)aSender;
--(void)selectWord: (id)aSender;
--(void)selectLine: (id)aSender;
--(void)selectParagraph: (id)aSender;
--(void)selectAll: (id)aSender;
--(void)noop: (id)aSender;
--(id)parentAttribute;
--(UIView *)viewElementForParent;
 @end
 
 #endif
diff --git a/vcl/ios/source/gdi/salcoretextfontutils.cxx b/vcl/ios/source/gdi/salcoretextfontutils.cxx
new file mode 100644
index 0000000..b67e954
--- /dev/null
+++ b/vcl/ios/source/gdi/salcoretextfontutils.cxx
@@ -0,0 +1,270 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <boost/assert.hpp>
+#include <vector>
+#include <set>
+
+#include "vcl/svapp.hxx"
+
+#include "ios/salgdi.h"
+#include "ios/saldata.hxx"
+#include "ios/salcoretextfontutils.hxx"
+
+// we have to get the font attributes from the name table
+// since neither head's macStyle nor OS/2's panose are easily available
+// during font enumeration. macStyle bits would be not sufficient anyway
+// and SFNT fonts on Mac usually do not contain an OS/2 table.
+static void UpdateAttributesFromPSName( const String& rPSName, ImplDevFontAttributes& rDFA )
+{
+    rtl::OString aPSName( rtl::OUStringToOString( rPSName, RTL_TEXTENCODING_UTF8 ).toAsciiLowerCase() );
+
+    // TODO: use a multi-string ignore-case matcher once it becomes available
+    if( (aPSName.indexOf("regular") != -1)
+    ||  (aPSName.indexOf("normal") != -1)
+    ||  (aPSName.indexOf("roman") != -1)
+    ||  (aPSName.indexOf("medium") != -1)
+    ||  (aPSName.indexOf("plain") != -1)
+    ||  (aPSName.indexOf("standard") != -1)
+    ||  (aPSName.indexOf("std") != -1) )
+    {
+       rDFA.meWidthType = WIDTH_NORMAL;
+       rDFA.meWeight    = WEIGHT_NORMAL;
+       rDFA.meItalic    = ITALIC_NONE;
+    }
+
+    // heuristics for font weight
+    if (aPSName.indexOf("extrablack") != -1)
+        rDFA.meWeight = WEIGHT_BLACK;
+    else if (aPSName.indexOf("black") != -1)
+        rDFA.meWeight = WEIGHT_BLACK;
+    //else if (aPSName.indexOf("book") != -1)
+    //    rDFA.meWeight = WEIGHT_SEMIBOLD;
+    else if( (aPSName.indexOf("semibold") != -1)
+    ||  (aPSName.indexOf("smbd") != -1))
+        rDFA.meWeight = WEIGHT_SEMIBOLD;
+    else if (aPSName.indexOf("ultrabold") != -1)
+        rDFA.meWeight = WEIGHT_ULTRABOLD;
+    else if (aPSName.indexOf("extrabold") != -1)
+        rDFA.meWeight = WEIGHT_BLACK;
+    else if( (aPSName.indexOf("bold") != -1)
+    ||  (aPSName.indexOf("-bd") != -1))
+        rDFA.meWeight = WEIGHT_BOLD;
+    else if (aPSName.indexOf("extralight") != -1)
+        rDFA.meWeight = WEIGHT_ULTRALIGHT;
+    else if (aPSName.indexOf("ultralight") != -1)
+        rDFA.meWeight = WEIGHT_ULTRALIGHT;
+    else if (aPSName.indexOf("light") != -1)
+        rDFA.meWeight = WEIGHT_LIGHT;
+    else if (aPSName.indexOf("thin") != -1)
+        rDFA.meWeight = WEIGHT_THIN;
+    else if (aPSName.indexOf("-w3") != -1)
+        rDFA.meWeight = WEIGHT_LIGHT;
+    else if (aPSName.indexOf("-w4") != -1)
+        rDFA.meWeight = WEIGHT_SEMILIGHT;
+    else if (aPSName.indexOf("-w5") != -1)
+        rDFA.meWeight = WEIGHT_NORMAL;
+    else if (aPSName.indexOf("-w6") != -1)
+        rDFA.meWeight = WEIGHT_SEMIBOLD;
+    else if (aPSName.indexOf("-w7") != -1)
+        rDFA.meWeight = WEIGHT_BOLD;
+    else if (aPSName.indexOf("-w8") != -1)
+        rDFA.meWeight = WEIGHT_ULTRABOLD;
+    else if (aPSName.indexOf("-w9") != -1)
+        rDFA.meWeight = WEIGHT_BLACK;
+
+    // heuristics for font slant
+    if( (aPSName.indexOf("italic") != -1)
+    ||  (aPSName.indexOf(" ital") != -1)
+    ||  (aPSName.indexOf("cursive") != -1)
+    ||  (aPSName.indexOf("-it") != -1)
+    ||  (aPSName.indexOf("lightit") != -1)
+    ||  (aPSName.indexOf("mediumit") != -1)
+    ||  (aPSName.indexOf("boldit") != -1)
+    ||  (aPSName.indexOf("cnit") != -1)
+    ||  (aPSName.indexOf("bdcn") != -1)
+    ||  (aPSName.indexOf("bdit") != -1)
+    ||  (aPSName.indexOf("condit") != -1)
+    ||  (aPSName.indexOf("bookit") != -1)
+    ||  (aPSName.indexOf("blackit") != -1) )
+        rDFA.meItalic = ITALIC_NORMAL;
+    if( (aPSName.indexOf("oblique") != -1)
+    ||  (aPSName.indexOf("inclined") != -1)
+    ||  (aPSName.indexOf("slanted") != -1) )
+        rDFA.meItalic = ITALIC_OBLIQUE;
+
+    // heuristics for font width
+    if( (aPSName.indexOf("condensed") != -1)
+    ||  (aPSName.indexOf("-cond") != -1)
+    ||  (aPSName.indexOf("boldcond") != -1)
+    ||  (aPSName.indexOf("boldcn") != -1)
+    ||  (aPSName.indexOf("cnit") != -1) )
+        rDFA.meWidthType = WIDTH_CONDENSED;
+    else if (aPSName.indexOf("narrow") != -1)
+        rDFA.meWidthType = WIDTH_SEMI_CONDENSED;
+    else if (aPSName.indexOf("expanded") != -1)
+        rDFA.meWidthType = WIDTH_EXPANDED;
+    else if (aPSName.indexOf("wide") != -1)
+        rDFA.meWidthType = WIDTH_EXPANDED;
+
+    // heuristics for font pitch
+    if( (aPSName.indexOf("mono") != -1)
+    ||  (aPSName.indexOf("courier") != -1)
+    ||  (aPSName.indexOf("monaco") != -1)
+    ||  (aPSName.indexOf("typewriter") != -1) )
+        rDFA.mePitch = PITCH_FIXED;
+
+    // heuristics for font family type
+    if( (aPSName.indexOf("script") != -1)
+    ||  (aPSName.indexOf("chancery") != -1)
+    ||  (aPSName.indexOf("zapfino") != -1))
+        rDFA.meFamily = FAMILY_SCRIPT;
+    else if( (aPSName.indexOf("comic") != -1)
+    ||  (aPSName.indexOf("outline") != -1)
+    ||  (aPSName.indexOf("pinpoint") != -1) )
+        rDFA.meFamily = FAMILY_DECORATIVE;
+    else if( (aPSName.indexOf("sans") != -1)
+    ||  (aPSName.indexOf("arial") != -1) )
+        rDFA.meFamily = FAMILY_SWISS;
+    else if( (aPSName.indexOf("roman") != -1)
+    ||  (aPSName.indexOf("times") != -1) )
+        rDFA.meFamily = FAMILY_ROMAN;
+
+    // heuristics for codepoint semantic
+    if( (aPSName.indexOf("symbol") != -1)
+    ||  (aPSName.indexOf("dings") != -1)
+    ||  (aPSName.indexOf("dingbats") != -1)
+    ||  (aPSName.indexOf("ornaments") != -1)
+    ||  (aPSName.indexOf("embellishments") != -1) )
+        rDFA.mbSymbolFlag  = true;
+
+   // #i100020# special heuristic for names with single-char styles
+   // NOTE: we are checking name that hasn't been lower-cased
+   if( rPSName.Len() > 3 )
+   {
+        int i = rPSName.Len();
+        sal_Unicode c = rPSName.GetChar( --i );
+        if( c == 'C' ) { // "capitals"
+            rDFA.meFamily = FAMILY_DECORATIVE;
+            c = rPSName.GetChar( --i );
+        }
+        if( c == 'O' ) { // CFF-based OpenType
+            c = rPSName.GetChar( --i );
+        }
+        if( c == 'I' ) { // "italic"
+            rDFA.meItalic = ITALIC_NORMAL;
+            c = rPSName.GetChar( --i );
+        }
+        if( c == 'B' )   // "bold"
+            rDFA.meWeight = WEIGHT_BOLD;
+        if( c == 'C' )   // "capitals"
+            rDFA.meFamily = FAMILY_DECORATIVE;
+        // TODO: check that all single-char styles have been resolved?
+    }
+}
+
+static bool GetDevFontAttributes( CTFontRef nFontRef, ImplDevFontAttributes& rDFA )
+{
+    // all CT fonts are device fonts that can be directly rotated
+    rDFA.mbOrientation = true;
+    rDFA.mbDevice      = true;
+    rDFA.mnQuality     = 0;
+
+    // reset the attributes
+    rDFA.meFamily     = FAMILY_DONTKNOW;
+    rDFA.mePitch      = PITCH_VARIABLE;
+    rDFA.meWidthType  = WIDTH_NORMAL;
+    rDFA.meWeight     = WEIGHT_NORMAL;
+    rDFA.meItalic     = ITALIC_NONE;
+    rDFA.mbSymbolFlag = false;
+
+    // Implement...
+
+    return false;
+}
+
+// =======================================================================
+
+SystemFontList::SystemFontList()
+{
+}
+
+SystemFontList::~SystemFontList()
+{
+}
+
+void SystemFontList::AnnounceFonts( ImplDevFontList& rFontList ) const
+{
+}
+
+// not all fonts are suitable for glyph fallback => sort them
+struct GfbCompare{ bool operator()(const ImplIosFontData*, const ImplIosFontData*); };
+
+inline bool GfbCompare::operator()( const ImplIosFontData* pA, const ImplIosFontData* pB )
+{
+    // use symbol fonts only as last resort
+    bool bPreferA = !pA->IsSymbolFont();
+    bool bPreferB = !pB->IsSymbolFont();
+    if( bPreferA != bPreferB )
+        return bPreferA;
+    // prefer scalable fonts
+    bPreferA = pA->IsScalable();
+    bPreferB = pB->IsScalable();
+    if( bPreferA != bPreferB )
+        return bPreferA;
+    // prefer non-slanted fonts
+    bPreferA = (pA->GetSlant() == ITALIC_NONE);
+    bPreferB = (pB->GetSlant() == ITALIC_NONE);
+    if( bPreferA != bPreferB )
+        return bPreferA;
+    // prefer normal weight fonts
+    bPreferA = (pA->GetWeight() == WEIGHT_NORMAL);
+    bPreferB = (pB->GetWeight() == WEIGHT_NORMAL);
+    if( bPreferA != bPreferB )
+        return bPreferA;
+    // prefer normal width fonts
+    bPreferA = (pA->GetWidthType() == WIDTH_NORMAL);
+    bPreferB = (pB->GetWidthType() == WIDTH_NORMAL);
+    if( bPreferA != bPreferB )
+        return bPreferA;
+    return false;
+}
+
+void SystemFontList::InitGlyphFallbacks()
+{
+}
+
+ImplIosFontData* SystemFontList::GetFontDataFromRef( CTFontRef nFontRef ) const
+{
+    IosFontContainer::const_iterator it = maFontContainer.find( nFontRef );
+    if( it == maFontContainer.end() )
+        return NULL;
+    return (*it).second;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/ios/source/gdi/salcoretextlayout.cxx b/vcl/ios/source/gdi/salcoretextlayout.cxx
new file mode 100644
index 0000000..461bb9c
--- /dev/null
+++ b/vcl/ios/source/gdi/salcoretextlayout.cxx
@@ -0,0 +1,297 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#include "tools/debug.hxx"
+
+#include "ios/saldata.hxx"
+#include "ios/salgdi.h"
+#include "ios/salcoretextfontutils.hxx"
+
+#include "sallayout.hxx"
+#include "salgdi.hxx"
+
+#include <math.h>
+
+class CoreTextLayout : public SalLayout
+{
+public:
+                    CoreTextLayout( CTFontSymbolicTraits&, float fFontScale );
+    virtual         ~CoreTextLayout();
+
+    virtual bool    LayoutText( ImplLayoutArgs& );
+    virtual void    AdjustLayout( ImplLayoutArgs& );
+    virtual void    DrawText( SalGraphics& ) const;
+
+    virtual int     GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int&,
+                        sal_Int32* pGlyphAdvances, int* pCharIndexes ) const;
+
+    virtual long    GetTextWidth() const;
+    virtual long    FillDXArray( long* pDXArray ) const;
+    virtual int     GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const;
+    virtual void    GetCaretPositions( int nArraySize, long* pCaretXArray ) const;
+    virtual bool    GetGlyphOutlines( SalGraphics&, PolyPolyVector& ) const;
+    virtual bool    GetBoundRect( SalGraphics&, Rectangle& ) const;
+
+    const ImplFontData* GetFallbackFontData( sal_GlyphId ) const;
+
+    virtual void    InitFont() const;
+    virtual void    MoveGlyph( int nStart, long nNewXPos );
+    virtual void    DropGlyph( int nStart );
+    virtual void    Simplify( bool bIsBase );
+
+private:
+    // ???
+    float               mfFontScale;
+
+private:
+    bool    InitGIA( ImplLayoutArgs* pArgs = NULL ) const;
+    bool    GetIdealX() const;
+    bool    GetDeltaY() const;
+    void    InvalidateMeasurements();
+
+    // cached details about the resulting layout
+    // mutable members since these details are all lazy initialized
+    mutable int         mnGlyphCount;           // glyph count
+    mutable Fixed       mnCachedWidth;          // cached value of resulting typographical width
+    int                 mnTrailingSpaceWidth;   // in Pixels
+
+    mutable CGGlyph*        mpGlyphIds;
+    mutable Fixed*          mpCharWidths;       // map relative charpos to charwidth
+    mutable int*            mpChars2Glyphs;     // map relative charpos to absolute glyphpos
+    mutable int*            mpGlyphs2Chars;     // map absolute glyphpos to absolute charpos
+    mutable bool*           mpGlyphRTLFlags;    // BiDi status for glyphs: true if RTL
+    mutable Fixed*          mpGlyphAdvances;    // contains glyph widths for the justified layout
+    mutable Fixed*          mpGlyphOrigAdvs;    // contains glyph widths for the unjustified layout
+    mutable Fixed*          mpDeltaY;           // vertical offset from the baseline
+
+    struct SubPortion { int mnMinCharPos, mnEndCharPos; Fixed mnXOffset; };
+    typedef std::vector<SubPortion> SubPortionVector;
+    mutable SubPortionVector    maSubPortions;
+
+    // storing details about fonts used in glyph-fallback for this layout
+    mutable class FallbackInfo* mpFallbackInfo;
+
+    // x-offset relative to layout origin
+    // currently only used in RTL-layouts
+    mutable Fixed           mnBaseAdv;
+};
+
+class FallbackInfo
+{
+public:
+    FallbackInfo() : mnMaxLevel(0) {}
+    int AddFallback( CTFontRef );
+    const ImplFontData* GetFallbackFontData( int nLevel ) const;
+
+private:
+    const ImplIosFontData* maFontData[ MAX_FALLBACK ];
+    CTFontRef              maCTFontRef[ MAX_FALLBACK ];
+    int                    mnMaxLevel;
+};
+
+CoreTextLayout::CoreTextLayout( CTFontSymbolicTraits& rCoreTextStyle, float fFontScale )
+:
+    mfFontScale( fFontScale ),
+    mnGlyphCount( -1 ),
+    mnCachedWidth( 0 ),
+    mnTrailingSpaceWidth( 0 ),
+    mpGlyphIds( NULL ),
+    mpCharWidths( NULL ),
+    mpChars2Glyphs( NULL ),
+    mpGlyphs2Chars( NULL ),
+    mpGlyphRTLFlags( NULL ),
+    mpGlyphAdvances( NULL ),
+    mpGlyphOrigAdvs( NULL ),
+    mpDeltaY( NULL ),
+    mpFallbackInfo( NULL ),
+    mnBaseAdv( 0 )
+{}
+
+// -----------------------------------------------------------------------
+
+CoreTextLayout::~CoreTextLayout()
+{
+    delete[] mpGlyphRTLFlags;
+    delete[] mpGlyphs2Chars;
+    delete[] mpChars2Glyphs;
+    if( mpCharWidths != mpGlyphAdvances )
+        delete[] mpCharWidths;
+    delete[] mpGlyphIds;
+    delete[] mpGlyphOrigAdvs;
+    delete[] mpGlyphAdvances;
+
+    delete mpFallbackInfo;
+}
+
+bool CoreTextLayout::LayoutText( ImplLayoutArgs& rArgs )
+{
+    // Implement...
+    return true;
+}
+
+void CoreTextLayout::AdjustLayout( ImplLayoutArgs& rArgs )
+{
+    // Implement...
+}
+
+void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
+{
+    // Implement...
+}
+
+int CoreTextLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int& nStart,
+    sal_Int32* pGlyphAdvances, int* pCharIndexes ) const
+{
+    if( nStart < 0 )                // first glyph requested?
+        nStart = 0;
+
+    // Implement...
+
+    return 0;
+}
+
+long CoreTextLayout::GetTextWidth() const
+{
+    // Implement...
+
+    return 0;
+}
+
+long CoreTextLayout::FillDXArray( long* pDXArray ) const
+{
+    // short circuit requests which don't need full details
+    if( !pDXArray )
+        return GetTextWidth();
+
+    // Implement...
+
+    return 0;
+}
+
+int CoreTextLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
+{
+    return 0;
+}
+
+void CoreTextLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
+{
+}
+
+bool CoreTextLayout::GetBoundRect( SalGraphics&, Rectangle& rVCLRect ) const
+{
+    return true;
+}
+
+bool CoreTextLayout::InitGIA( ImplLayoutArgs* pArgs ) const
+{
+    // no need to run InitGIA more than once on the same CoreTextLayout object
+    if( mnGlyphCount >= 0 )
+        return true;
+    mnGlyphCount = 0;
+
+    // Implement...
+
+    return true;
+}
+
+// -----------------------------------------------------------------------
+
+bool CoreTextLayout::GetIdealX() const
+{
+    // compute the ideal advance widths only once
+    if( mpGlyphOrigAdvs != NULL )
+        return true;
+
+    // Implement...
+
+    return true;
+}
+
+// -----------------------------------------------------------------------
+
+bool CoreTextLayout::GetDeltaY() const
+{
+    return true;
+}
+
+// -----------------------------------------------------------------------
+
+#define DELETEAZ( X ) { delete[] X; X = NULL; }
+
+void CoreTextLayout::InvalidateMeasurements()
+{
+    mnGlyphCount = -1;
+    DELETEAZ( mpGlyphIds );
+    DELETEAZ( mpCharWidths );
+    DELETEAZ( mpChars2Glyphs );
+    DELETEAZ( mpGlyphs2Chars );
+    DELETEAZ( mpGlyphRTLFlags );
+    DELETEAZ( mpGlyphAdvances );
+    DELETEAZ( mpGlyphOrigAdvs );
+    DELETEAZ( mpDeltaY );
+}
+
+// glyph fallback is supported directly by Ios
+// so methods used only by MultiSalLayout can be dummy implementated
+bool CoreTextLayout::GetGlyphOutlines( SalGraphics&, PolyPolyVector& ) const { return false; }
+void CoreTextLayout::InitFont() const {}
+void CoreTextLayout::MoveGlyph( int /*nStart*/, long /*nNewXPos*/ ) {}
+void CoreTextLayout::DropGlyph( int /*nStart*/ ) {}
+void CoreTextLayout::Simplify( bool /*bIsBase*/ ) {}
+
+// get the ImplFontData for a glyph fallback font
+// for a glyphid that was returned by CoreTextLayout::GetNextGlyphs()
+const ImplFontData* CoreTextLayout::GetFallbackFontData( sal_GlyphId nGlyphId ) const
+{
+    // check if any fallback fonts were needed
+    if( !mpFallbackInfo )
+        return NULL;
+    // check if the current glyph needs a fallback font
+    int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
+    if( !nFallbackLevel )
+        return NULL;
+    return mpFallbackInfo->GetFallbackFontData( nFallbackLevel );
+}
+
+int FallbackInfo::AddFallback( CTFontRef  nFontId )
+{
+    return 0;
+}
+
+const ImplFontData* FallbackInfo::GetFallbackFontData( int nFallbackLevel ) const
+{
+    const ImplIosFontData* pFallbackFont = maFontData[ nFallbackLevel-1 ];
+    return pFallbackFont;
+}
+
+SalLayout* IosSalGraphics::GetTextLayout( ImplLayoutArgs&, int /*nFallbackLevel*/ )
+{
+    return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/ios/source/gdi/salgdiutils.cxx b/vcl/ios/source/gdi/salgdiutils.cxx
new file mode 100644
index 0000000..e496493
--- /dev/null
+++ b/vcl/ios/source/gdi/salgdiutils.cxx
@@ -0,0 +1,307 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list