diff options
-rw-r--r-- | desktop/source/app/sofficemain.cxx | 28 | ||||
-rw-r--r-- | ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m | 4 | ||||
-rw-r--r-- | ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m | 5 |
3 files changed, 0 insertions, 37 deletions
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 8d402fd2506f..e86d901df603 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -142,32 +142,4 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main() #endif } -#if defined(ANDROID) || defined(IOS) - -extern "C" void PtylTestEncryptionAndExport(const char *pathname) -{ - OUString sUri(pathname, strlen(pathname), RTL_TEXTENCODING_UTF8); - sUri = "file://" + sUri; - - css::uno::Reference<css::frame::XComponentLoader> loader(css::frame::Desktop::create(cppu::defaultBootstrap_InitialComponentContext()), css::uno::UNO_QUERY); - css::uno::Reference<css::lang::XComponent> component; - component.set(loader->loadComponentFromURL(sUri, "_default", 0, {})); - - utl::MediaDescriptor media; - media[utl::MediaDescriptor::PROP_FILTERNAME()] <<= OUString("MS Word 2007 XML"); - OUString password("myPassword"); - css::uno::Sequence<css::beans::NamedValue> encryptionData { { "OOXPassword", css::uno::makeAny(password) } }; - media[utl::MediaDescriptor::PROP_ENCRYPTIONDATA()] <<= encryptionData; - - css::uno::Reference<css::frame::XModel> model(component, css::uno::UNO_QUERY); - css::uno::Reference<css::frame::XStorable2> storable2(model, css::uno::UNO_QUERY); - OUString saveAsUri(sUri + ".new.docx"); - SAL_INFO("desktop.app", "Trying to store as " << saveAsUri); - OUString testPathName; - osl::File::getSystemPathFromFileURL(saveAsUri+".txt", testPathName); - storable2->storeToURL(saveAsUri, media.getAsConstPropertyValueList()); -} - -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m b/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m index bcf4e22246bf..addcccf99699 100644 --- a/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m +++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m @@ -65,15 +65,11 @@ static LibreOfficeKitDocument* document; return YES; } -const char *ptyl_test_encryption_pathname; - - (void)startDisplaying:(NSString*)documentPath; { ViewController *vc = [[ViewController alloc] init]; self.window.rootViewController = vc; - ptyl_test_encryption_pathname = [documentPath UTF8String]; - // kit = lok_init([[[NSBundle mainBundle] bundlePath] UTF8String]); kit = lok_init(NULL); document = kit->pClass->documentLoad(kit, [documentPath UTF8String]); diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m index de0d975b7795..98e3025780cd 100644 --- a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m +++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m @@ -136,9 +136,6 @@ static bool tileMatches(const char *spec, CGRect bb) y == (int) (bb.origin.y / bb.size.height)); } -extern void PtylTestEncryptionAndExport(const char *pathname); -extern const char *ptyl_test_encryption_pathname; - - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { // Even if I set the CATL's tileSize to 512x512 above, this is @@ -148,8 +145,6 @@ extern const char *ptyl_test_encryption_pathname; static bool once = false; if (!once) { once = true; - if (getenv("PTYL_TEST_ENCRYPTION_AND_EXPORT")) - PtylTestEncryptionAndExport(ptyl_test_encryption_pathname); } CGRect bb = CGContextGetClipBoundingBox(ctx); |