[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - sw/qa

Jan Holesovsky kendy at collabora.com
Wed Oct 23 04:24:26 PDT 2013


 sw/qa/tiledrendering/tiledrendering.cxx |   26 ++++++++++++++++----------
 sw/qa/tiledrendering/tiledrendering.ui  |    2 +-
 2 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit e72f6a50b0ec133df0557cb45c6942990b3179eb
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Oct 23 13:19:11 2013 +0200

    Cosmetics.
    
    Change-Id: I9811c981c445222a888b1efd8c1666a60bd25dad

diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 6af94ec..3a7a096 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -51,24 +51,28 @@ public:
     void Open(OUString & aFileUrl);
 };
 
-
-class TiledRenderingDialog: public ModalDialog{
+class TiledRenderingDialog: public ModalDialog
+{
 private:
-    TiledRenderingApp * app;
+    TiledRenderingApp *mpApp;
+    FixedImage *mpImage;
+
 public:
     TiledRenderingDialog(TiledRenderingApp * app) :
         ModalDialog(DIALOG_NO_PARENT, "TiledRendering", "qa/sw/ui/tiledrendering.ui"),
-        app(app)
+        mpApp(app)
     {
         PushButton * renderButton;
-        get(renderButton,"buttonRenderTile");
+        get(renderButton, "buttonRenderTile");
         renderButton->SetClickHdl( LINK( this, TiledRenderingDialog, RenderHdl));
 
         PushButton * chooseDocumentButton;
-        get(chooseDocumentButton,"buttonChooseDocument");
+        get(chooseDocumentButton, "buttonChooseDocument");
         chooseDocumentButton->SetClickHdl( LINK( this, TiledRenderingDialog, ChooseDocumentHdl));
 
         SetStyle(GetStyle()|WB_CLOSEABLE);
+
+        get(mpImage, "imageTile");
     }
 
     virtual ~TiledRenderingDialog()
@@ -81,7 +85,7 @@ public:
     sal_Int32 ExtractInt(const char * name)
     {
         NumericField * pField;
-        get(pField,name);
+        get(pField, name);
         OUString aString(pField->GetText());
         return aString.toInt32();
     }
@@ -96,8 +100,6 @@ IMPL_LINK ( TiledRenderingDialog,  RenderHdl, Button *, EMPTYARG )
     ExtractInt("spinTilePosY");
     ExtractInt("spinTileWidth");
     ExtractInt("spinTileHeight");
-    FixedImage * pImage;
-    get(pImage,"imageTile");
     return 1;
 }
 
@@ -108,12 +110,13 @@ IMPL_LINK ( TiledRenderingDialog,  ChooseDocumentHdl, Button *, EMPTYARG )
     if( aDlgHelper.Execute() == ERRCODE_NONE )
     {
         OUString aFileUrl =xFP->getFiles().getConstArray()[0];
-        app->Open(aFileUrl);
+        mpApp->Open(aFileUrl);
     }
     return 1;
 }
 
-void TiledRenderingApp::Open(OUString & aFileUrl){
+void TiledRenderingApp::Open(OUString & aFileUrl)
+{
     static const OUString TARGET("_default");
     static const Sequence<beans::PropertyValue> PROPS (0);
     if(xComponent.get())
@@ -121,7 +124,7 @@ void TiledRenderingApp::Open(OUString & aFileUrl){
         xComponent->dispose();
         xComponent.clear();
     }
-    xComponent.set(xLoader->loadComponentFromURL(aFileUrl,TARGET,0,PROPS));
+    xComponent.set(xLoader->loadComponentFromURL(aFileUrl, TARGET, 0, PROPS));
 }
 
 void TiledRenderingApp::Init()
commit ed604a9f73939cc57cdc2826ecba77b48411dc23
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Wed Oct 23 11:55:16 2013 +0200

    added links to the image in tiled rendering
    
    Change-Id: Ic9d972fd67123e3ab04f023806f7f96c89a883a7

diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 9991bbe..6af94ec 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -21,6 +21,7 @@
 #include <vcl/vclmain.hxx>
 #include <vcl/field.hxx>
 #include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
 #include <sfx2/filedlghelper.hxx>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
 #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
@@ -95,6 +96,8 @@ IMPL_LINK ( TiledRenderingDialog,  RenderHdl, Button *, EMPTYARG )
     ExtractInt("spinTilePosY");
     ExtractInt("spinTileWidth");
     ExtractInt("spinTileHeight");
+    FixedImage * pImage;
+    get(pImage,"imageTile");
     return 1;
 }
 
diff --git a/sw/qa/tiledrendering/tiledrendering.ui b/sw/qa/tiledrendering/tiledrendering.ui
index f27939c..22222d4 100644
--- a/sw/qa/tiledrendering/tiledrendering.ui
+++ b/sw/qa/tiledrendering/tiledrendering.ui
@@ -256,7 +256,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkImage" id="image1">
+          <object class="GtkImage" id="imageTile">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="stock">gtk-missing-image</property>


More information about the Libreoffice-commits mailing list