summaryrefslogtreecommitdiff
path: root/vcl/ios/source/app/salinst.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/ios/source/app/salinst.cxx')
-rw-r--r--vcl/ios/source/app/salinst.cxx69
1 files changed, 11 insertions, 58 deletions
diff --git a/vcl/ios/source/app/salinst.cxx b/vcl/ios/source/app/salinst.cxx
index f95930ba0045..fb5bfb9aa662 100644
--- a/vcl/ios/source/app/salinst.cxx
+++ b/vcl/ios/source/app/salinst.cxx
@@ -74,7 +74,6 @@ extern sal_Bool ImplSVMain();
static int* gpnInit = 0;
static bool bNoSVMain = true;
-static bool bLeftMain = false;
// -----------------------------------------------------------------------
class IosDelayedSettingsChanged : public Timer
@@ -129,12 +128,13 @@ static void initUIApp()
sal_Bool ImplSVMainHook( int * pnInit )
{
+ char sMain[] = "main";
gpnInit = pnInit;
bNoSVMain = false;
initUIApp();
- char* pArgv[] = { "main", NULL };
+ char* pArgv[] = { sMain, NULL };
UIApplicationMain( 1, pArgv, NULL, NULL );
return TRUE; // indicate that ImplSVMainHook is implemented
@@ -588,6 +588,7 @@ void IosSalInstance::DestroyObject( SalObject* pObject )
SalPrinter* IosSalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
{
+ (void) pInfoPrinter;
return NULL;
}
@@ -603,6 +604,7 @@ void IosSalInstance::DestroyPrinter( SalPrinter* pPrinter )
void IosSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
{
// ???
+ (void) pList;
}
// -----------------------------------------------------------------------
@@ -633,13 +635,18 @@ XubString IosSalInstance::GetDefaultPrinter()
// -----------------------------------------------------------------------
SalInfoPrinter* IosSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pSetupData )
+ ImplJobSetup* pSetupData )
{
+ (void) pQueueInfo;
+ (void) pSetupData;
+
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
SalInfoPrinter* pNewInfoPrinter = NULL;
+
// ???
+
return pNewInfoPrinter;
}
@@ -688,61 +695,7 @@ void* IosSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
return (void*)"";
}
-// We need to re-encode file urls because osl_getFileURLFromSystemPath converts
-// to UTF-8 before encoding non ascii characters, which is not what other apps expect.
-static rtl::OUString translateToExternalUrl(const rtl::OUString& internalUrl)
-{
- rtl::OUString extUrl;
-
- uno::Reference< lang::XMultiServiceFactory > sm = comphelper::getProcessServiceFactory();
- if (sm.is())
- {
- uno::Reference< beans::XPropertySet > pset;
- sm->queryInterface( getCppuType( &pset )) >>= pset;
- if (pset.is())
- {
- uno::Reference< uno::XComponentContext > context;
- static const rtl::OUString DEFAULT_CONTEXT( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) );
- pset->getPropertyValue(DEFAULT_CONTEXT) >>= context;
- if (context.is())
- extUrl = uri::ExternalUriReferenceTranslator::create(context)->translateToExternal(internalUrl);
- }
- }
- return extUrl;
-}
-
-// #i104525# many versions of OSX have problems with some URLs:
-// when an app requests OSX to add one of these URLs to the "Recent Items" list
-// then this app gets killed (TextEdit, Preview, etc. and also OOo)
-static bool isDangerousUrl( const rtl::OUString& rUrl )
-{
- // use a heuristic that detects all known cases since there is no official comment
- // on the exact impact and root cause of the OSX bug
- const int nLen = rUrl.getLength();
- const sal_Unicode* p = rUrl.getStr();
- for( int i = 0; i < nLen-3; ++i, ++p ) {
- if( p[0] != '%' )
- continue;
- // escaped percent?
- if( (p[1] == '2') && (p[2] == '5') )
- return true;
- // escapes are considered to be UTF-8 encoded
- // => check for invalid UTF-8 leading byte
- if( (p[1] != 'f') && (p[1] != 'F') )
- continue;
- int cLowNibble = p[2];
- if( (cLowNibble >= '0' ) && (cLowNibble <= '9'))
- return false;
- if( cLowNibble >= 'a' )
- cLowNibble -= 'a' - 'A';
- if( (cLowNibble < 'A') || (cLowNibble >= 'C'))
- return true;
- }
-
- return false;
-}
-
-void IosSalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& /*rMimeType*/)
+void IosSalInstance::AddToRecentDocumentList(const rtl::OUString& /*rFileUrl*/, const rtl::OUString& /*rMimeType*/)
{
}