summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorPtyl Dragon <ptyl@cloudon.com>2013-10-22 17:41:09 +0200
committerJan Holesovsky <kendy@collabora.com>2013-10-23 11:37:16 +0200
commitd8b87516c041c2e86973a7649e50acaebf4ee6d9 (patch)
treeb49f5ffb76b3dc179f60933ee4806b6c0bdc749b /sw
parentlibrelogo: support linecap settings (diff)
downloadcore-d8b87516c041c2e86973a7649e50acaebf4ee6d9.tar.gz
core-d8b87516c041c2e86973a7649e50acaebf4ee6d9.zip
added callback for render
Change-Id: I56f47926eeff6ab57903c8eedf6528465fc41c9e
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/tiledrendering/tiledrendering.cxx62
1 files changed, 51 insertions, 11 deletions
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 5ea5f482674d..9f296bdac876 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -19,6 +19,8 @@
#include <vcl/help.hxx>
#include <vcl/svapp.hxx>
#include <vcl/vclmain.hxx>
+#include <vcl/field.hxx>
+#include <vcl/button.hxx>
class UIPreviewApp : public Application
{
@@ -29,6 +31,39 @@ public:
using namespace com::sun::star;
+class TiledRenderingDialog: public ModalDialog{
+public:
+ TiledRenderingDialog() : ModalDialog(DIALOG_NO_PARENT, "TiledRendering", "qa/sw/ui/tiledrendering.ui"){
+ PushButton * renderButton;
+ get(renderButton,"buttonRenderTile");
+ renderButton->SetClickHdl( LINK( this, TiledRenderingDialog, RenderHdl));
+ }
+ virtual ~TiledRenderingDialog(){}
+
+ DECL_LINK ( RenderHdl, Button * );
+
+ sal_Int32 extractInt(const char * name){
+ NumericField * pField;
+ get(pField,name);
+ OUString aString(pField->GetText());
+ SAL_INFO("TiledRenderingDialog","param " << name << " returned " << aString);
+ return aString.toInt32();
+ }
+
+};
+
+IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG )
+{
+ extractInt("spinContextWidth");
+ extractInt("spinContextHeight");
+ extractInt("spinTilePosX");
+ extractInt("spinTilePosY");
+ extractInt("spinTileWidth");
+ extractInt("spinTileHeight");
+
+ return 1;
+}
+
void UIPreviewApp::Init()
{
uno::Reference<uno::XComponentContext> xContext =
@@ -47,13 +82,13 @@ void UIPreviewApp::Init()
int UIPreviewApp::Main()
{
- std::vector<OUString> uifiles;
- for (sal_uInt16 i = 0; i < GetCommandLineParamCount(); ++i)
- {
- OUString aFileUrl;
- osl::File::getFileURLFromSystemPath(GetCommandLineParam(i), aFileUrl);
- uifiles.push_back(aFileUrl);
- }
+ //std::vector<OUString> uifiles;
+ //for (sal_uInt16 i = 0; i < GetCommandLineParamCount(); ++i)
+ //{
+ // OUString aFileUrl;
+ // osl::File::getFileURLFromSystemPath(GetCommandLineParam(i), aFileUrl);
+ // uifiles.push_back(aFileUrl);
+ //}
//if (uifiles.empty())
//{
@@ -66,9 +101,10 @@ int UIPreviewApp::Main()
try
{
- Dialog *pDialog = new ModalDialog(DIALOG_NO_PARENT, "TiledRendering", "qa/sw/ui/tiledrendering.ui");
- pDialog->Execute();
+ TiledRenderingDialog pDialog;
+
+ pDialog.Execute();
/*
{
VclBuilder aBuilder(pDialog, OUString(), "sw/qa/tiledrendering/tiledrendering.ui");
@@ -84,8 +120,6 @@ int UIPreviewApp::Main()
pRealDialog->Execute();
}
}*/
-
- delete pDialog;
}
catch (const uno::Exception &e)
{
@@ -95,6 +129,12 @@ int UIPreviewApp::Main()
return EXIT_SUCCESS;
}
+void render(){
+
+
+}
+
+
void vclmain::createApplication()
{
static UIPreviewApp aApp;