Kaydet (Commit) 988e2a75 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

remove that unused old code

Change-Id: I576f6be6d229e29d0ae35ffb00d118bfd44b5544
üst 087162b7
...@@ -142,32 +142,4 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main() ...@@ -142,32 +142,4 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
#endif #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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -65,15 +65,11 @@ static LibreOfficeKitDocument* document; ...@@ -65,15 +65,11 @@ static LibreOfficeKitDocument* document;
return YES; return YES;
} }
const char *ptyl_test_encryption_pathname;
- (void)startDisplaying:(NSString*)documentPath; - (void)startDisplaying:(NSString*)documentPath;
{ {
ViewController *vc = [[ViewController alloc] init]; ViewController *vc = [[ViewController alloc] init];
self.window.rootViewController = vc; self.window.rootViewController = vc;
ptyl_test_encryption_pathname = [documentPath UTF8String];
// kit = lok_init([[[NSBundle mainBundle] bundlePath] UTF8String]); // kit = lok_init([[[NSBundle mainBundle] bundlePath] UTF8String]);
kit = lok_init(NULL); kit = lok_init(NULL);
document = kit->pClass->documentLoad(kit, [documentPath UTF8String]); document = kit->pClass->documentLoad(kit, [documentPath UTF8String]);
......
...@@ -136,9 +136,6 @@ static bool tileMatches(const char *spec, CGRect bb) ...@@ -136,9 +136,6 @@ static bool tileMatches(const char *spec, CGRect bb)
y == (int) (bb.origin.y / bb.size.height)); 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 - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx
{ {
// Even if I set the CATL's tileSize to 512x512 above, this is // Even if I set the CATL's tileSize to 512x512 above, this is
...@@ -148,8 +145,6 @@ extern const char *ptyl_test_encryption_pathname; ...@@ -148,8 +145,6 @@ extern const char *ptyl_test_encryption_pathname;
static bool once = false; static bool once = false;
if (!once) { if (!once) {
once = true; once = true;
if (getenv("PTYL_TEST_ENCRYPTION_AND_EXPORT"))
PtylTestEncryptionAndExport(ptyl_test_encryption_pathname);
} }
CGRect bb = CGContextGetClipBoundingBox(ctx); CGRect bb = CGContextGetClipBoundingBox(ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment