[Libreoffice-commits] core.git: 6 commits - extensions/source extras/source reportdesign/inc reportdesign/source reportdesign/uiconfig reportdesign/UIConfig_dbreport.mk sc/source svx/source vcl/source

Caolán McNamara caolanm at redhat.com
Tue Jul 8 08:15:20 PDT 2014


 extensions/source/propctrlr/propeventtranslation.cxx  |    2 
 extras/source/glade/libreoffice-catalog.xml.in        |    6 
 reportdesign/UIConfig_dbreport.mk                     |    2 
 reportdesign/inc/RptResId.hrc                         |    1 
 reportdesign/source/ui/dlg/CondFormat.cxx             |  136 ++----
 reportdesign/source/ui/dlg/CondFormat.hrc             |   19 
 reportdesign/source/ui/dlg/CondFormat.src             |  215 ---------
 reportdesign/source/ui/dlg/Condition.cxx              |  383 +++++-----------
 reportdesign/source/ui/dlg/Condition.hxx              |   63 +-
 reportdesign/source/ui/inc/CondFormat.hxx             |   19 
 reportdesign/uiconfig/dbreport/ui/condformatdialog.ui |  128 +++++
 reportdesign/uiconfig/dbreport/ui/conditionwin.ui     |  406 ++++++++++++++++++
 sc/source/filter/xml/xmlwrap.cxx                      |   10 
 svx/source/xml/xmleohlp.cxx                           |   22 
 vcl/source/window/dialog.cxx                          |    3 
 15 files changed, 784 insertions(+), 631 deletions(-)

New commits:
commit 65f12c0e16638d3285539d9901e7300f3d12c615
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 8 16:13:51 2014 +0100

    hook up scrolling
    
    Change-Id: Iaf30a41dcc74e4542d3df60ca26354876badc81f

diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index a687b14..82fb0fd 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -92,9 +92,9 @@ namespace rptui
             long nHeight = m_aConditions[0]->get_preferred_size().Height();
             size_t nVisibleConditions = ::std::min(nCount, MAX_CONDITIONS);
             nHeight *= nVisibleConditions;
-            if (nHeight != m_pConditionPlayground->get_height_request())
+            if (nHeight != m_pScrollWindow->get_height_request())
             {
-                m_pConditionPlayground->set_height_request(nHeight);
+                m_pScrollWindow->set_height_request(nHeight);
                 if (!isCalculatingInitialLayoutSize() && !bFirst)
                     setOptimalLayoutSize();
             }
@@ -111,7 +111,9 @@ namespace rptui
         ,m_bConstructed( false )
     {
         get(m_pConditionPlayground, "condPlaygroundDrawingarea");
-        get(m_pCondScroll, "condScrollbar");
+        get(m_pScrollWindow, "scrolledwindow");
+        m_pScrollWindow->setUserManagedScrolling(true);
+        m_pCondScroll = &(m_pScrollWindow->getVertScrollBar());
 
         OSL_ENSURE( m_xFormatConditions.is(), "ConditionalFormattingDialog::ConditionalFormattingDialog: ReportControlModel is NULL -> Prepare for GPF!" );
 
@@ -183,6 +185,7 @@ namespace rptui
 
             ConditionPtr pCon( new Condition( m_pConditionPlayground, *this, m_rController ) );
             pCon->setCondition( xCond );
+            pCon->reorderWithinParent(_nNewCondIndex);
             m_aConditions.insert( m_aConditions.begin() + _nNewCondIndex, pCon );
         }
         catch( const Exception& )
@@ -314,26 +317,11 @@ namespace rptui
 
     void ConditionalFormattingDialog::impl_layoutConditions()
     {
-#if 0
-        // position the condition's playground
-        long nConditionWidth = impl_getConditionWidth();
-        long nConditionHeight = LogicToPixel( Size( 0, CONDITION_HEIGHT ), MAP_APPFONT ).Height();
-        size_t nVisibleConditions = ::std::min( impl_getConditionCount(), MAX_CONDITIONS );
-        Size aPlaygroundSize( nConditionWidth, nVisibleConditions * nConditionHeight );
-        m_pConditionPlayground->SetSizePixel( aPlaygroundSize );
-        _out_rBelowLastVisible = Point( 0, aPlaygroundSize.Height() );
-
-        // position the single conditions
-        Point aConditionPos( 0, -1 * nConditionHeight * impl_getFirstVisibleConditionIndex() );
-        for (   Conditions::const_iterator cond = m_aConditions.begin();
-                cond != m_aConditions.end();
-                ++cond
-            )
-        {
-            (*cond)->setPosSizePixel( aConditionPos.X(), aConditionPos.Y(), nConditionWidth, nConditionHeight );
-            aConditionPos.Move( 0, nConditionHeight );
-        }
-#endif
+        if (m_aConditions.empty())
+            return;
+        long nConditionHeight = m_aConditions[0]->get_preferred_size().Height();
+        Point aConditionPos(0, -1 * nConditionHeight * impl_getFirstVisibleConditionIndex());
+        m_pScrollWindow->get_child()->SetPosPixel(aConditionPos);
     }
 
     void ConditionalFormattingDialog::impl_layoutAll()
@@ -356,6 +344,7 @@ namespace rptui
             {
                 ConditionPtr pCon( new Condition( m_pConditionPlayground, *this, m_rController ) );
                 Reference< XFormatCondition > xCond( m_xCopy->getByIndex(i), UNO_QUERY );
+                pCon->reorderWithinParent(i);
                 pCon->setCondition( xCond );
                 pCon->updateToolbar( xCond.get() );
                 m_aConditions.push_back( pCon );
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index b14867a..12e675b 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -62,7 +62,6 @@ ConditionField::ConditionField(Condition* pParent, Edit* pSubEdit, PushButton *p
     , m_pFormula(pFormula)
 {
     m_pSubEdit->EnableRTL( false );
-    m_pSubEdit->SetPosPixel( Point() );
 
     m_pFormula->SetText(OUString("..."));
     m_pFormula->SetClickHdl( LINK( this, ConditionField, OnFormula ) );
@@ -159,7 +158,6 @@ void OColorPopup::KeyInput( const KeyEvent& rKEvt )
     m_aColorSet.KeyInput(rKEvt);
 }
 
-
 void OColorPopup::Resize()
 {
     Size aSize = GetOutputSizePixel();
@@ -168,7 +166,6 @@ void OColorPopup::Resize()
     m_aColorSet.SetPosSizePixel( Point(2,2), aSize );
 }
 
-
 void OColorPopup::StartSelection()
 {
     m_aColorSet.StartSelection();
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
index 6edee15..130caa7 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -27,6 +27,7 @@
 #include <vcl/dialog.hxx>
 #include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/scrbar.hxx>
 
 #include <boost/shared_ptr.hpp>
@@ -75,6 +76,7 @@ namespace rptui
         OModuleClient   m_aModuleClient;
         Window*         m_pConditionPlayground;
         Conditions      m_aConditions;
+        VclScrolledWindow* m_pScrollWindow;
         ScrollBar*      m_pCondScroll;
 
         ::rptui::OReportController&                         m_rController;
diff --git a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
index b6b57f4..741ce74 100644
--- a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
+++ b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
@@ -84,14 +84,24 @@
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
             <child>
-              <object class="GtkBox" id="condPlaygroundDrawingarea">
+              <object class="GtkScrolledWindow" id="scrolledwindow">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="orientation">vertical</property>
+                <property name="vscrollbar_policy">always</property>
+                <property name="shadow_type">in</property>
                 <child>
-                  <placeholder/>
+                      <object class="GtkBox" id="condPlaygroundDrawingarea">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
                 </child>
               </object>
               <packing>
@@ -100,19 +110,6 @@
                 <property name="position">0</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkScrollbar" id="condScrollbar">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="vexpand">True</property>
-                <property name="orientation">vertical</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
commit 554a61317267cc364b0bf53131db1be07e035cfb
Author: Palenik Mihály <palenik.mihaly at gmail.com>
Date:   Thu Jul 3 20:35:20 2014 +0200

    Convert RID_CONDFORMAT to .ui
    
    Change-Id: I23ac6a7328a43c2fb63f2f804f6718f64e73eb8e

diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 9b0bee1..c7c93a1 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -42,11 +42,11 @@
     <glade-widget-class title="Thesaurus Edit" name="cuilo-ReplaceEdit"
                         generic-name="ReplaceEdit" parent="GtkEntry"
                         icon-name="widget-gtk-textentry"/>
-    <glade-widget-class title="Thesaurus Lookup" name="cuilo-LookUpComboBox"
-                        generic-name="LookUpComboBox" parent="GtkEntry"
+    <glade-widget-class title="Condition Edit" name="rptuilo-ConditionField"
+                        generic-name="ConditionEdit" parent="GtkEntry"
                         icon-name="widget-gtk-comboboxtext"/>
     <glade-widget-class title="Hyphen Edit" name="cuilo-HyphenEdit"
-                        generic-name="ReplaceEdit" parent="GtkEntry"
+                        generic-name="HyphenEdit" parent="GtkEntry"
                         icon-name="widget-gtk-textentry"/>
     <glade-widget-class title="OSQL NameEdit" name="dbulo-OSQLNameEdit"
                         generic-name="OSQLNameEdit" parent="GtkEntry"
diff --git a/reportdesign/UIConfig_dbreport.mk b/reportdesign/UIConfig_dbreport.mk
index 79a4db7..ec44450 100644
--- a/reportdesign/UIConfig_dbreport.mk
+++ b/reportdesign/UIConfig_dbreport.mk
@@ -37,6 +37,8 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/dbreport,\
 $(eval $(call gb_UIConfig_add_uifiles,modules/dbreport,\
 	reportdesign/uiconfig/dbreport/ui/backgrounddialog \
 	reportdesign/uiconfig/dbreport/ui/chardialog \
+	reportdesign/uiconfig/dbreport/ui/condformatdialog \
+	reportdesign/uiconfig/dbreport/ui/conditionwin \
 	reportdesign/uiconfig/dbreport/ui/datetimedialog \
 	reportdesign/uiconfig/dbreport/ui/pagedialog \
 	reportdesign/uiconfig/dbreport/ui/pagenumberdialog \
diff --git a/reportdesign/inc/RptResId.hrc b/reportdesign/inc/RptResId.hrc
index 160d034..ccdcf35 100644
--- a/reportdesign/inc/RptResId.hrc
+++ b/reportdesign/inc/RptResId.hrc
@@ -40,7 +40,6 @@
 // Dialog Control Id's -----------------------------------------------------------
 #define RID_GROUPS_SORTING              ( RID_DIALOG_START + 0 )
 #define RID_DATETIME_DLG                ( RID_DIALOG_START + 2 )
-#define RID_CONDFORMAT                  ( RID_DIALOG_START + 3 )
 #define WIN_CONDITION                   ( RID_DIALOG_START + 4 )
 #define RID_NAVIGATOR                   ( RID_DIALOG_START + 5 )
 
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 706f2d6..a687b14 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -80,40 +80,57 @@ namespace rptui
         }
     };
 
+    void ConditionalFormattingDialog::impl_setPrefHeight(bool bFirst)
+    {
+        if (!m_bConstructed && !bFirst)
+            return;
 
-    // class ConditionalFormattingDialog
+        //allow dialog to resize itself
+        size_t nCount = impl_getConditionCount();
+        if (nCount)
+        {
+            long nHeight = m_aConditions[0]->get_preferred_size().Height();
+            size_t nVisibleConditions = ::std::min(nCount, MAX_CONDITIONS);
+            nHeight *= nVisibleConditions;
+            if (nHeight != m_pConditionPlayground->get_height_request())
+            {
+                m_pConditionPlayground->set_height_request(nHeight);
+                if (!isCalculatingInitialLayoutSize() && !bFirst)
+                    setOptimalLayoutSize();
+            }
+        }
+    }
 
+    // class ConditionalFormattingDialog
     ConditionalFormattingDialog::ConditionalFormattingDialog(
             Window* _pParent, const Reference< XReportControlModel >& _rxFormatConditions, ::rptui::OReportController& _rController )
-        :ModalDialog( _pParent, ModuleRes(RID_CONDFORMAT) )
-        ,m_aConditionPlayground( this, ModuleRes( WND_COND_PLAYGROUND ) )
-        ,m_aSeparator(this,     ModuleRes(FL_SEPARATOR1))
-        ,m_aPB_OK(this,         ModuleRes(PB_OK))
-        ,m_aPB_CANCEL(this,     ModuleRes(PB_CANCEL))
-        ,m_aPB_Help(this,       ModuleRes(PB_HELP))
-        ,m_aCondScroll( this,   ModuleRes( SB_ALL_CONDITIONS ) )
+        :ModalDialog( _pParent, "CondFormat", "modules/dbreport/ui/condformatdialog.ui" )
         ,m_rController( _rController )
         ,m_xFormatConditions( _rxFormatConditions )
         ,m_bDeletingCondition( false )
+        ,m_bConstructed( false )
     {
+        get(m_pConditionPlayground, "condPlaygroundDrawingarea");
+        get(m_pCondScroll, "condScrollbar");
+
         OSL_ENSURE( m_xFormatConditions.is(), "ConditionalFormattingDialog::ConditionalFormattingDialog: ReportControlModel is NULL -> Prepare for GPF!" );
 
         m_xCopy.set( m_xFormatConditions->createClone(), UNO_QUERY_THROW );
 
-        m_aCondScroll.SetScrollHdl( LINK( this, ConditionalFormattingDialog, OnScroll ) );
+        m_pCondScroll->SetScrollHdl( LINK( this, ConditionalFormattingDialog, OnScroll ) );
 
         impl_initializeConditions();
 
-        FreeResource();
-    }
+        impl_setPrefHeight(true);
 
+        m_bConstructed = true;
+    }
 
     ConditionalFormattingDialog::~ConditionalFormattingDialog()
     {
         m_aConditions.clear();
     }
 
-
     void ConditionalFormattingDialog::impl_updateConditionIndicies()
     {
         sal_Int32 nIndex = 0;
@@ -126,18 +143,18 @@ namespace rptui
         }
     }
 
-
     void ConditionalFormattingDialog::impl_conditionCountChanged()
     {
         if ( m_aConditions.empty() )
             impl_addCondition_nothrow( 0 );
 
+        impl_setPrefHeight(false);
+
         impl_updateScrollBarRange();
         impl_updateConditionIndicies();
         impl_layoutAll();
     }
 
-
     void ConditionalFormattingDialog::addCondition( size_t _nAddAfterIndex )
     {
         OSL_PRECOND( _nAddAfterIndex < impl_getConditionCount(), "ConditionalFormattingDialog::addCondition: illegal condition index!" );
@@ -164,11 +181,9 @@ namespace rptui
             ::comphelper::copyProperties(m_xCopy.get(),xCond.get());
             m_xCopy->insertByIndex( _nNewCondIndex, makeAny( xCond ) );
 
-            ConditionPtr pCon( new Condition( &m_aConditionPlayground, *this, m_rController ) );
+            ConditionPtr pCon( new Condition( m_pConditionPlayground, *this, m_rController ) );
             pCon->setCondition( xCond );
             m_aConditions.insert( m_aConditions.begin() + _nNewCondIndex, pCon );
-
-            pCon->setPosSizePixel( 0, 0, impl_getConditionWidth(), 0, WINDOW_POSSIZE_WIDTH );
         }
         catch( const Exception& )
         {
@@ -276,29 +291,18 @@ namespace rptui
         impl_updateConditionIndicies();
 
         // re-layout all conditions
-        Point aDummy;
-        impl_layoutConditions( aDummy );
+        impl_layoutConditions();
 
         // ensure the moved condition is visible
         impl_ensureConditionVisible( nNewConditionIndex );
     }
 
-
-    long ConditionalFormattingDialog::impl_getConditionWidth() const
-    {
-        const Size aDialogSize( GetOutputSizePixel() );
-        const Size aScrollBarWidth( LogicToPixel( Size( SCROLLBAR_WIDTH + UNRELATED_CONTROLS, 0 ), MAP_APPFONT ) );
-        return aDialogSize.Width() - aScrollBarWidth.Width();
-    }
-
-
     IMPL_LINK( ConditionalFormattingDialog, OnScroll, ScrollBar*, /*_pNotInterestedIn*/ )
     {
         size_t nFirstCondIndex( impl_getFirstVisibleConditionIndex() );
         size_t nFocusCondIndex = impl_getFocusedConditionIndex( nFirstCondIndex );
 
-        Point aDummy;
-        impl_layoutConditions( aDummy );
+        impl_layoutConditions();
 
         if ( nFocusCondIndex < nFirstCondIndex )
             impl_focusCondition( nFirstCondIndex );
@@ -308,15 +312,15 @@ namespace rptui
         return 0;
     }
 
-
-    void ConditionalFormattingDialog::impl_layoutConditions( Point& _out_rBelowLastVisible )
+    void ConditionalFormattingDialog::impl_layoutConditions()
     {
+#if 0
         // position the condition's playground
         long nConditionWidth = impl_getConditionWidth();
         long nConditionHeight = LogicToPixel( Size( 0, CONDITION_HEIGHT ), MAP_APPFONT ).Height();
         size_t nVisibleConditions = ::std::min( impl_getConditionCount(), MAX_CONDITIONS );
         Size aPlaygroundSize( nConditionWidth, nVisibleConditions * nConditionHeight );
-        m_aConditionPlayground.SetSizePixel( aPlaygroundSize );
+        m_pConditionPlayground->SetSizePixel( aPlaygroundSize );
         _out_rBelowLastVisible = Point( 0, aPlaygroundSize.Height() );
 
         // position the single conditions
@@ -329,34 +333,18 @@ namespace rptui
             (*cond)->setPosSizePixel( aConditionPos.X(), aConditionPos.Y(), nConditionWidth, nConditionHeight );
             aConditionPos.Move( 0, nConditionHeight );
         }
+#endif
     }
 
-
     void ConditionalFormattingDialog::impl_layoutAll()
     {
         // condition's positions
-        Point aPos;
-        impl_layoutConditions( aPos );
+        impl_layoutConditions();
 
-        // scrollbar size and visibility
-        m_aCondScroll.setPosSizePixel( 0, 0, 0, aPos.Y(), WINDOW_POSSIZE_HEIGHT );
+        // scrollbar visibility
         if ( !impl_needScrollBar() )
             // normalize the position, so it can, in all situations, be used as top index
-            m_aCondScroll.SetThumbPos( 0 );
-
-        // the separator and the buttons below it
-        aPos += LogicToPixel( Point( 0 , RELATED_CONTROLS ), MAP_APPFONT );
-        m_aSeparator.setPosSizePixel( 0, aPos.Y(), 0, 0, WINDOW_POSSIZE_Y );
-
-        aPos += LogicToPixel( Point( 0 , UNRELATED_CONTROLS ), MAP_APPFONT );
-        Window* pWindows[] = { &m_aPB_OK, &m_aPB_CANCEL, &m_aPB_Help };
-        for ( size_t i= 0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i )
-        {
-            pWindows[i]->setPosSizePixel( 0, aPos.Y(), 0, 0, WINDOW_POSSIZE_Y );
-        }
-
-        aPos += LogicToPixel( Point( 0, BUTTON_HEIGHT + RELATED_CONTROLS ), MAP_APPFONT );
-        setPosSizePixel( 0, 0, 0, aPos.Y(), WINDOW_POSSIZE_HEIGHT );
+            m_pCondScroll->SetThumbPos( 0 );
     }
 
     void ConditionalFormattingDialog::impl_initializeConditions()
@@ -366,7 +354,7 @@ namespace rptui
             sal_Int32 nCount = m_xCopy->getCount();
             for ( sal_Int32 i = 0; i < nCount ; ++i )
             {
-                ConditionPtr pCon( new Condition( &m_aConditionPlayground, *this, m_rController ) );
+                ConditionPtr pCon( new Condition( m_pConditionPlayground, *this, m_rController ) );
                 Reference< XFormatCondition > xCond( m_xCopy->getByIndex(i), UNO_QUERY );
                 pCon->setCondition( xCond );
                 pCon->updateToolbar( xCond.get() );
@@ -381,7 +369,6 @@ namespace rptui
         impl_conditionCountChanged();
     }
 
-
     void ConditionalFormattingDialog::applyCommand( size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color _aColor )
     {
         OSL_PRECOND( _nCommandId, "ConditionalFormattingDialog::applyCommand: illegal command id!" );
@@ -527,13 +514,13 @@ namespace rptui
             const Window* pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL;
             while   (   ( pPlaygroundCandidate )
                     &&  ( pPlaygroundCandidate != this )
-                    &&  ( pPlaygroundCandidate != &m_aConditionPlayground )
+                    &&  ( pPlaygroundCandidate != m_pConditionPlayground )
                     )
             {
                 pConditionCandidate = pConditionCandidate->GetParent();
                 pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL;
             }
-            if ( pPlaygroundCandidate == &m_aConditionPlayground )
+            if ( pPlaygroundCandidate == m_pConditionPlayground )
             {
                 impl_ensureConditionVisible( dynamic_cast< const Condition& >( *pConditionCandidate ).getConditionIndex() );
             }
@@ -547,7 +534,7 @@ namespace rptui
 
     size_t ConditionalFormattingDialog::impl_getFirstVisibleConditionIndex() const
     {
-        return (size_t)m_aCondScroll.GetThumbPos();
+        return (size_t)m_pCondScroll->GetThumbPos();
     }
 
 
@@ -576,9 +563,9 @@ namespace rptui
     {
         long nMax = ( impl_getConditionCount() > MAX_CONDITIONS ) ? impl_getConditionCount() - MAX_CONDITIONS + 1 : 0;
 
-        m_aCondScroll.SetRangeMin( 0 );
-        m_aCondScroll.SetRangeMax( nMax );
-        m_aCondScroll.SetVisibleSize( 1 );
+        m_pCondScroll->SetRangeMin( 0 );
+        m_pCondScroll->SetRangeMax( nMax );
+        m_pCondScroll->SetVisibleSize( 1 );
     }
 
 
@@ -586,8 +573,8 @@ namespace rptui
     {
         OSL_PRECOND( _nTopCondIndex + MAX_CONDITIONS <= impl_getConditionCount(),
             "ConditionalFormattingDialog::impl_scrollTo: illegal index!" );
-        m_aCondScroll.SetThumbPos( _nTopCondIndex );
-        OnScroll( &m_aCondScroll );
+        m_pCondScroll->SetThumbPos( _nTopCondIndex );
+        OnScroll( m_pCondScroll );
     }
 
 
diff --git a/reportdesign/source/ui/dlg/CondFormat.hrc b/reportdesign/source/ui/dlg/CondFormat.hrc
index 515c2d0..5d776ff 100644
--- a/reportdesign/source/ui/dlg/CondFormat.hrc
+++ b/reportdesign/source/ui/dlg/CondFormat.hrc
@@ -35,25 +35,6 @@
 #define IMAGE_BUTTON_WIDTH  12
 #define IMAGE_BUTTON_HEIGHT 14
 
-#define FL_CONDITION_HEADER         2
-#define CRTL_FORMAT_PREVIEW         3
-#define TB_FORMAT                   4
-#define LB_COND_TYPE                5
-#define LB_OP                       6
-#define ED_CONDITION_LHS            7
-#define FT_AND                      8
-#define PB_OK                       9
-#define PB_CANCEL                   10
-#define PB_HELP                     11
-#define FL_SEPARATOR1               12
-#define ED_CONDITION_RHS            13
-#define SB_ALL_CONDITIONS           18
-#define WND_COND_PLAYGROUND         19
-#define BTN_MOVE_UP                 20
-#define BTN_MOVE_DOWN               21
-#define BTN_ADD_CONDITION           22
-#define BTN_REMOVE_CONDITION        23
-
 #define ROW_0_POS       ( RELATED_CONTROLS )
 #define ROW_0_HEIGHT    ( FIXEDTEXT_HEIGHT )
 #define ROW_1_POS       ( ROW_0_POS + ROW_0_HEIGHT + UNRELATED_CONTROLS )
diff --git a/reportdesign/source/ui/dlg/CondFormat.src b/reportdesign/source/ui/dlg/CondFormat.src
index 688d279..5f933a8 100644
--- a/reportdesign/source/ui/dlg/CondFormat.src
+++ b/reportdesign/source/ui/dlg/CondFormat.src
@@ -21,220 +21,7 @@
 #include "helpids.hrc"
 #include <svx/globlmn.hrc>
 #include "rptui_slotid.hrc"
-
-Control WIN_CONDITION
-{
-    Size = MAP_APPFONT ( CONDITION_WIDTH , CONDITION_HEIGHT ) ;
-    HelpId = HID_RPT_COND_DLG;
-    DialogControl = TRUE;
-    Hide = TRUE;
-
-    FixedLine FL_CONDITION_HEADER
-    {
-        Pos = MAP_APPFONT ( RELATED_CONTROLS, ROW_0_POS ) ;
-        Size = MAP_APPFONT ( CONDITION_WIDTH - 2 * RELATED_CONTROLS, ROW_0_HEIGHT ) ;
-    };
-
-    ListBox LB_COND_TYPE
-    {
-        Pos = MAP_APPFONT ( UNRELATED_CONTROLS, ROW_1_POS ) ;
-        Size = MAP_APPFONT( COND_TYPE_WIDTH, 60 );
-        Border = TRUE;
-        DropDown = TRUE;
-        TabStop = TRUE;
-        Sort = FALSE;
-        StringList [ en-US ] =
-        {
-            < "Field Value Is" ; Default ; > ;
-            < "Expression Is" ; Default ; > ;
-        };
-    };
-
-    ListBox LB_OP
-    {
-        Pos = MAP_APPFONT ( UNRELATED_CONTROLS + COND_TYPE_WIDTH + UNRELATED_CONTROLS, ROW_1_POS ) ;
-        Size = MAP_APPFONT( COND_OP_WIDTH, 60 );
-        Border = TRUE;
-        DropDown = TRUE;
-        TabStop = TRUE;
-        Sort = FALSE;
-        StringList [ en-US ] =
-        {
-            < "between" ; 0; > ;
-            < "not between" ; 1; > ;
-            < "equal to" ; 2; > ;
-            < "not equal to" ; 3; > ;
-            < "greater than" ; 4; > ;
-            < "less than" ; 5; > ;
-            < "greater than or equal to" ; 6; > ;
-            < "less than or equal to" ; 7; > ;
-        };
-    };
-
-    Edit ED_CONDITION_LHS
-    {
-        Pos = MAP_APPFONT ( 3*UNRELATED_CONTROLS + COND_TYPE_WIDTH + COND_OP_WIDTH, ROW_1_POS ) ;
-        Size = MAP_APPFONT( EDIT_WIDTH, EDIT_HEIGHT );
-        Border = TRUE;
-        TabStop = TRUE;
-    };
-
-    FixedText FT_AND
-    {
-        Pos = MAP_APPFONT ( 4*UNRELATED_CONTROLS + COND_TYPE_WIDTH + COND_OP_WIDTH + EDIT_WIDTH,
-            ROW_1_POS + ( FIXEDTEXT_HEIGHT - EDIT_HEIGHT ) / 2 );
-        Size = MAP_APPFONT( OPERATOR_SEP_WIDTH , FIXEDTEXT_HEIGHT );
-        Text [ en-US ] = "and";
-    };
-
-    Edit ED_CONDITION_RHS
-    {
-        Pos = MAP_APPFONT ( 5*UNRELATED_CONTROLS + COND_TYPE_WIDTH + COND_OP_WIDTH + EDIT_WIDTH + OPERATOR_SEP_WIDTH,
-            ROW_1_POS );
-        Size = MAP_APPFONT( EDIT_WIDTH, EDIT_HEIGHT );
-        Border = TRUE;
-        TabStop = TRUE;
-    };
-
-    ImageButton BTN_MOVE_UP
-    {
-        Pos = MAP_APPFONT ( CONDITION_WIDTH - UNRELATED_CONTROLS - IMAGE_BUTTON_WIDTH, ROW_1_POS ) ;
-        Size = MAP_APPFONT ( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT ) ;
-        TabStop             = TRUE ;
-        Symbol = IMAGEBUTTON_ARROW_UP ;
-    };
-
-    ImageButton BTN_MOVE_DOWN
-    {
-        Pos = MAP_APPFONT ( CONDITION_WIDTH - UNRELATED_CONTROLS - IMAGE_BUTTON_WIDTH, ROW_1_POS + IMAGE_BUTTON_HEIGHT + RELATED_CONTROLS ) ;
-        Size = MAP_APPFONT ( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT ) ;
-        TabStop             = TRUE ;
-        Symbol = IMAGEBUTTON_ARROW_DOWN ;
-    };
-
-    ToolBox TB_FORMAT
-    {
-        Pos = MAP_APPFONT ( UNRELATED_CONTROLS + RELATED_CONTROLS, ROW_2_POS ) ;
-        ButtonType = BUTTON_SYMBOL;
-        Align = BOXALIGN_TOP;
-        HelpId = HID_RPT_CONDFORMAT_TB;
-        Customize = FALSE;
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                ITEM_FORMAT_ATTR_CHAR_WEIGHT
-                Checkable = TRUE;
-            };
-            ToolBoxItem
-            {
-                ITEM_FORMAT_ATTR_CHAR_POSTURE
-                Checkable = TRUE;
-            };
-            ToolBoxItem
-            {
-                ITEM_FORMAT_ATTR_CHAR_UNDERLINE
-                Checkable = TRUE;
-            };
-            ToolBoxItem
-            {
-                Type = TOOLBOXITEM_SEPARATOR;
-            };
-            ToolBoxItem
-            {
-                ITEM_TOOLBAR_BACKGROUND_COLOR
-                DropDown = TRUE;
-            };
-            ToolBoxItem
-            {
-                ITEM_TOOLBAR_ATTR_CHAR_COLOR
-                Identifier = SID_ATTR_CHAR_COLOR2;
-                Command = ".uno:FontColor";
-            };
-            ToolBoxItem
-            {
-                ITEM_FORMAT_CHAR_DLG
-            };
-        };
-    };
-
-    Window CRTL_FORMAT_PREVIEW
-    {
-        Pos = MAP_APPFONT ( 2*UNRELATED_CONTROLS, ROW_2_POS ) ;
-        Size = MAP_APPFONT ( CONDITION_WIDTH - UNRELATED_CONTROLS, ROW_2_HEIGHT ) ;
-        Border = TRUE ;
-        HelpId = HID_RPT_CRTL_FORMAT_PREVIEW;
-        Text [ en-US ] = "Example";
-    };
-
-    PushButton BTN_ADD_CONDITION
-    {
-        Pos = MAP_APPFONT( CONDITION_WIDTH - 2*UNRELATED_CONTROLS - 2*IMAGE_BUTTON_WIDTH - RELATED_CONTROLS, ROW_3_POS );
-        Size = MAP_APPFONT( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT );
-        Text = "+";
-    };
-
-    PushButton BTN_REMOVE_CONDITION
-    {
-        Pos = MAP_APPFONT( CONDITION_WIDTH - 2*UNRELATED_CONTROLS - 2*IMAGE_BUTTON_WIDTH - RELATED_CONTROLS, ROW_3_POS );
-        Size = MAP_APPFONT( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT );
-        Text = "-";
-    };
-};
-
-ModalDialog RID_CONDFORMAT
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( COND_DLG_WIDTH, COND_DLG_HEIGHT ) ;
-    Text [ en-US ] = "Conditional Formatting" ;
-    HelpId = HID_RPT_CONDFORMAT_DLG;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-
-    Window WND_COND_PLAYGROUND
-    {
-        Pos = MAP_APPFONT ( 0, 0 ) ;
-        Size = MAP_APPFONT ( CONDITION_WIDTH, CONDITION_HEIGHT ) ;
-        DialogControl = TRUE;
-        Hide = FALSE;
-    };
-
-    FixedLine FL_SEPARATOR1
-    {
-        Pos = MAP_APPFONT ( RELATED_CONTROLS, CONDITION_HEIGHT + RELATED_CONTROLS ) ;
-        Size = MAP_APPFONT ( CONDITION_WIDTH - 2*RELATED_CONTROLS , 1 ) ;
-    };
-
-    OKButton PB_OK
-    {
-        Pos = MAP_APPFONT ( CONDITION_WIDTH - 3*BUTTON_WIDTH - 2*UNRELATED_CONTROLS - RELATED_CONTROLS, CONDITION_HEIGHT + 2*RELATED_CONTROLS + 1) ;
-        Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-
-    CancelButton PB_CANCEL
-    {
-        Pos = MAP_APPFONT ( CONDITION_WIDTH - 2*BUTTON_WIDTH - 2*UNRELATED_CONTROLS , CONDITION_HEIGHT + 2*RELATED_CONTROLS + 1) ;
-        Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
-        TabStop = TRUE ;
-    };
-
-    HelpButton PB_HELP
-    {
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( CONDITION_WIDTH - BUTTON_WIDTH - UNRELATED_CONTROLS, CONDITION_HEIGHT + 2*RELATED_CONTROLS + 1) ;
-        Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
-        Text [ en-US ] = "~Help";
-    };
-
-    ScrollBar SB_ALL_CONDITIONS
-    {
-        Pos = MAP_APPFONT ( CONDITION_WIDTH, RELATED_CONTROLS ) ;
-        Size = MAP_APPFONT ( SCROLLBAR_WIDTH, CONDITION_HEIGHT + RELATED_CONTROLS ) ;
-    };
-};
+#include "rptui_slotid.hrc"
 
 String STR_NUMBERED_CONDITION
 {
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index d41009d..b14867a 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -56,39 +56,19 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 
-ConditionField::ConditionField( Condition* _pParent, const ResId& _rResId ) : Edit(_pParent,_rResId)
-,m_pParent(_pParent)
-,m_aFormula(this)
+ConditionField::ConditionField(Condition* pParent, Edit* pSubEdit, PushButton *pFormula)
+    : m_pParent(pParent)
+    , m_pSubEdit(pSubEdit)
+    , m_pFormula(pFormula)
 {
-    m_pSubEdit = new Edit(this,0);
-    SetSubEdit(m_pSubEdit);
     m_pSubEdit->EnableRTL( false );
     m_pSubEdit->SetPosPixel( Point() );
 
-    m_aFormula.SetText(OUString("..."));
-    m_aFormula.SetClickHdl( LINK( this, ConditionField, OnFormula ) );
-    m_aFormula.Show();
-    m_pSubEdit->Show();
-    Resize();
+    m_pFormula->SetText(OUString("..."));
+    m_pFormula->SetClickHdl( LINK( this, ConditionField, OnFormula ) );
 }
 
-ConditionField::~ConditionField()
-{
-    SetSubEdit(NULL);
-    delete m_pSubEdit;
-}
-
-void ConditionField::Resize()
-{
-    Edit::Resize();
-    const Size aSize = GetOutputSizePixel();
-    const Size aButtonSize( LogicToPixel( Size( 12, 0 ), MAP_APPFONT ).Width(),aSize.Height());
-    const Point aButtonPos(aSize.Width() - aButtonSize.Width(), 0);
-    m_aFormula.SetPosSizePixel(aButtonPos,aButtonSize);
-    m_pSubEdit->SetPosSizePixel(Point(0,0),Size(aButtonPos.X() ,aSize.Height()));
-}
-
-IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ )
+IMPL_LINK( ConditionField, OnFormula, Button*, _pClickedButton )
 {
     OUString sFormula(m_pSubEdit->GetText());
     const sal_Int32 nLen = sFormula.getLength();
@@ -97,7 +77,7 @@ IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ )
         ReportFormula aFormula( sFormula );
         sFormula = aFormula.getCompleteFormula();
     }
-    uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(this);
+    uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(_pClickedButton);
     uno::Reference< beans::XPropertySet> xProp(m_pParent->getController().getRowSet(),uno::UNO_QUERY);
     if ( rptui::openDialogFormula_nothrow( sFormula, m_pParent->getController().getContext(),xInspectorWindow,xProp ) )
     {
@@ -108,7 +88,6 @@ IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ )
 }
 
 // class SvxColorWindow_Impl --------------------------------------------------
-
 #ifndef WB_NO_DIRECTSELECT
 #define WB_NO_DIRECTSELECT      ((WinBits)0x04000000)
 #endif
@@ -227,21 +206,9 @@ IMPL_LINK_NOARG(OColorPopup, SelectHdl)
 
 
 Condition::Condition( Window* _pParent, IConditionalFormatAction& _rAction, ::rptui::OReportController& _rController )
-    :Control(_pParent, ModuleRes(WIN_CONDITION))
+    :VclHBox(_pParent)
     ,m_rController( _rController )
     ,m_rAction( _rAction )
-    ,m_aHeader(this,            ModuleRes(FL_CONDITION_HEADER))
-    ,m_aConditionType(this,       ModuleRes(LB_COND_TYPE))
-    ,m_aOperationList( this,    ModuleRes(LB_OP))
-    ,m_aCondLHS(this,           ModuleRes(ED_CONDITION_LHS))
-    ,m_aOperandGlue(this,            ModuleRes(FT_AND))
-    ,m_aCondRHS(this,           ModuleRes(ED_CONDITION_RHS))
-    ,m_aActions(this,           ModuleRes(TB_FORMAT))
-    ,m_aPreview(this,           ModuleRes(CRTL_FORMAT_PREVIEW))
-    ,m_aMoveUp( this,           ModuleRes( BTN_MOVE_UP ) )
-    ,m_aMoveDown( this,         ModuleRes( BTN_MOVE_DOWN ) )
-    ,m_aAddCondition( this,     ModuleRes( BTN_ADD_CONDITION ) )
-    ,m_aRemoveCondition( this,  ModuleRes( BTN_REMOVE_CONDITION ) )
     ,m_pColorFloat(NULL)
     ,m_pBtnUpdaterFontColor(NULL)
     ,m_pBtnUpdaterBackgroundColor(NULL)
@@ -249,63 +216,86 @@ Condition::Condition( Window* _pParent, IConditionalFormatAction& _rAction, ::rp
     ,m_nLastKnownWindowWidth( -1 )
     ,m_bInDestruction( false )
 {
-    FreeResource();
-    m_aActions.SetStyle(m_aActions.GetStyle()|WB_LINESPACING);
-    m_aCondLHS.GrabFocus();
+    m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "modules/dbreport/ui/conditionwin.ui");
 
-    m_aConditionType.SetSelectHdl( LINK( this, Condition, OnTypeSelected ) );
+    get(m_pHeader, "headerLabel");
+    get(m_pConditionType, "typeCombobox");
+    get(m_pOperationList, "opCombobox");
+    m_pCondLHS = new ConditionField(this, get<Edit>("lhsEntry"), get<PushButton>("lhsButton"));
+    get(m_pOperandGlue, "andLabel");
+    m_pCondRHS = new ConditionField(this, get<Edit>("rhsEntry"), get<PushButton>("rhsButton"));
+    get(m_pActions, "formatToolbox");
+    get(m_pPreview, "previewDrawingarea");
+    get(m_pMoveUp, "upButton");
+    get(m_pMoveDown, "downButton");
+    get(m_pAddCondition, "addButton");
+    get(m_pRemoveCondition, "removeButton");
 
-    m_aOperationList.SetDropDownLineCount( 10 );
-    m_aOperationList.SetSelectHdl( LINK( this, Condition, OnOperationSelected ) );
+    m_pActions->SetStyle(m_pActions->GetStyle()|WB_LINESPACING);
+    m_pCondLHS->GrabFocus();
 
-    m_aActions.SetSelectHdl(LINK(this, Condition, OnFormatAction));
-    m_aActions.SetDropdownClickHdl( LINK( this, Condition, DropdownClick ) );
-    setToolBox(&m_aActions);
+    m_pConditionType->SetSelectHdl( LINK( this, Condition, OnTypeSelected ) );
 
-    m_aMoveUp.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
-    m_aMoveDown.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
-    m_aAddCondition.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
-    m_aRemoveCondition.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
+    m_pOperationList->SetDropDownLineCount( 10 );
+    m_pOperationList->SetSelectHdl( LINK( this, Condition, OnOperationSelected ) );
 
-    m_aMoveUp.SetStyle( m_aMoveUp.GetStyle() | WB_NOPOINTERFOCUS );
-    m_aMoveDown.SetStyle( m_aMoveDown.GetStyle() | WB_NOPOINTERFOCUS );
-    m_aAddCondition.SetStyle( m_aMoveUp.GetStyle() | WB_NOPOINTERFOCUS | WB_CENTER | WB_VCENTER );
-    m_aRemoveCondition.SetStyle( m_aMoveDown.GetStyle() | WB_NOPOINTERFOCUS | WB_CENTER | WB_VCENTER );
+    m_pActions->SetSelectHdl(LINK(this, Condition, OnFormatAction));
+    m_pActions->SetDropdownClickHdl( LINK( this, Condition, DropdownClick ) );
+    setToolBox(m_pActions);
 
-    Font aFont( m_aAddCondition.GetFont() );
-    aFont.SetWeight( WEIGHT_BOLD );
-    m_aAddCondition.SetFont( aFont );
-    m_aRemoveCondition.SetFont( aFont );
+    m_pMoveUp->SetClickHdl( LINK( this, Condition, OnConditionAction ) );
+    m_pMoveDown->SetClickHdl( LINK( this, Condition, OnConditionAction ) );
+    m_pAddCondition->SetClickHdl( LINK( this, Condition, OnConditionAction ) );
+    m_pRemoveCondition->SetClickHdl( LINK( this, Condition, OnConditionAction ) );
 
-    m_aOperandGlue.SetStyle( m_aOperandGlue.GetStyle() | WB_VCENTER );
+    m_pMoveUp->SetStyle( m_pMoveUp->GetStyle() | WB_NOPOINTERFOCUS );
+    m_pMoveDown->SetStyle( m_pMoveDown->GetStyle() | WB_NOPOINTERFOCUS );
+    m_pAddCondition->SetStyle( m_pAddCondition->GetStyle() | WB_NOPOINTERFOCUS );
+    m_pRemoveCondition->SetStyle( m_pRemoveCondition->GetStyle() | WB_NOPOINTERFOCUS );
 
-    m_aConditionType.SelectEntryPos( 0 );
-    m_aOperationList.SelectEntryPos( 0 );
+    Font aFont( m_pAddCondition->GetFont() );
+    aFont.SetWeight( WEIGHT_BOLD );
+    m_pAddCondition->SetFont( aFont );
+    m_pRemoveCondition->SetFont( aFont );
 
-    // the toolbar got its site automatically, ensure that the preview is positioned
-    // right of it
-    Size aRelatedControls( LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ) );
-    Point aToolbarPos( m_aActions.GetPosPixel() );
-    Size aToolbarSize( m_aActions.GetSizePixel() );
-    m_aPreview.setPosSizePixel( aToolbarPos.X() + aToolbarSize.Width() + 2 * aRelatedControls.Width(),
-        0, 0, 0, WINDOW_POSSIZE_X );
+    m_pOperandGlue->SetStyle( m_pOperandGlue->GetStyle() | WB_VCENTER );
 
-    // ensure the toolbar is vertically centered, relative to the preview
-    Size aPreviewSize( m_aPreview.GetSizePixel() );
-    m_aActions.setPosSizePixel( 0, aToolbarPos.Y() + ( aPreviewSize.Height() - aToolbarSize.Height() ) / 2, 0, 0, WINDOW_POSSIZE_Y );
+    m_pConditionType->SelectEntryPos( 0 );
+    m_pOperationList->SelectEntryPos( 0 );
+
+    m_nBoldId = m_pActions->GetItemId(".uno:Bold");
+    m_nItalicId = m_pActions->GetItemId(".uno:Italic");
+    m_nUnderLineId = m_pActions->GetItemId(".uno:Underline");
+    m_nBackgroundColorId = m_pActions->GetItemId(".uno:BackgroundColor");
+    m_nFontColorId = m_pActions->GetItemId(".uno:FontColor");
+    m_nFontDialogId = m_pActions->GetItemId(".uno:FontDialog");
 
     m_pBtnUpdaterBackgroundColor = new ::svx::ToolboxButtonColorUpdater(
-                                            SID_BACKGROUND_COLOR, SID_BACKGROUND_COLOR, &m_aActions );
+                                            SID_BACKGROUND_COLOR, m_nBackgroundColorId, m_pActions );
     m_pBtnUpdaterFontColor = new ::svx::ToolboxButtonColorUpdater(
-                                            SID_ATTR_CHAR_COLOR2, SID_ATTR_CHAR_COLOR2, &m_aActions );
+                                            SID_ATTR_CHAR_COLOR2, m_nFontColorId, m_pActions );
 
     Show();
 
-    impl_layoutAll();
-
     ConditionalExpressionFactory::getKnownConditionalExpressions( m_aConditionalExpressions );
 }
 
+sal_uInt16 Condition::mapToolbarItemToSlotId(sal_uInt16 nItemId) const
+{
+    if (nItemId == m_nBoldId)
+        return SID_ATTR_CHAR_WEIGHT;
+    if (nItemId == m_nItalicId)
+        return SID_ATTR_CHAR_POSTURE;
+    if (nItemId == m_nUnderLineId)
+        return SID_ATTR_CHAR_UNDERLINE;
+    if (nItemId == m_nBackgroundColorId)
+        return SID_BACKGROUND_COLOR;
+    if (nItemId == m_nFontColorId)
+        return SID_ATTR_CHAR_COLOR2;
+    if (nItemId == m_nFontDialogId)
+        return SID_CHAR_DLG;
+    return 0;
+}
 
 Condition::~Condition()
 {
@@ -313,32 +303,31 @@ Condition::~Condition()
 
     delete m_pColorFloat;
     delete m_pBtnUpdaterFontColor;
+    delete m_pCondLHS;
+    delete m_pCondRHS;
     delete m_pBtnUpdaterBackgroundColor;
 }
 
 IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ )
 {
-    sal_uInt16 nId( m_aActions.GetCurItemId() );
+    sal_uInt16 nId( m_pActions->GetCurItemId() );
     if ( !m_pColorFloat )
-        m_pColorFloat = new OColorPopup(&m_aActions,this);
+        m_pColorFloat = new OColorPopup(m_pActions,this);
 
     sal_uInt16 nTextId = 0;
-    switch(nId)
+    if (nId == m_nFontColorId)
     {
-        case SID_ATTR_CHAR_COLOR2:
-            nTextId = STR_CHARCOLOR;
-            break;
-        case SID_BACKGROUND_COLOR:
-            nTextId = STR_CHARBACKGROUND;
-            break;
-        default:
-            break;
+        nTextId = STR_CHARCOLOR;
+    }
+    else if (nId == m_nBackgroundColorId)
+    {
+        nTextId = STR_CHARBACKGROUND;
     }
     if ( nTextId )
         m_pColorFloat->SetText(OUString(ModuleRes(nTextId)));
-    m_pColorFloat->SetSlotId(nId);
-    m_pColorFloat->SetPosPixel(m_aActions.GetItemPopupPosition(nId,m_pColorFloat->GetSizePixel()));
-    m_pColorFloat->StartPopupMode(&m_aActions);
+    m_pColorFloat->SetSlotId(mapToolbarItemToSlotId(nId));
+    m_pColorFloat->SetPosPixel(m_pActions->GetItemPopupPosition(nId,m_pColorFloat->GetSizePixel()));
+    m_pColorFloat->StartPopupMode(m_pActions);
     m_pColorFloat->StartSelection();
 
     return 1;
@@ -347,20 +336,19 @@ IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ )
 IMPL_LINK( Condition, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
 {
     Color aCol(COL_AUTO);
-    ApplyCommand(m_aActions.GetCurItemId(),aCol);
+    ApplyCommand(mapToolbarItemToSlotId(m_pActions->GetCurItemId()),aCol);
     return 0L;
 }
 
-
 IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton )
 {
-    if ( _pClickedButton == &m_aMoveUp )
+    if ( _pClickedButton == m_pMoveUp )
         m_rAction.moveConditionUp( getConditionIndex() );
-    else if ( _pClickedButton == &m_aMoveDown )
+    else if ( _pClickedButton == m_pMoveDown )
         m_rAction.moveConditionDown( getConditionIndex() );
-    else if ( _pClickedButton == &m_aAddCondition )
+    else if ( _pClickedButton == m_pAddCondition )
         m_rAction.addCondition( getConditionIndex() );
-    else if ( _pClickedButton == &m_aRemoveCondition )
+    else if ( _pClickedButton == m_pRemoveCondition )
         m_rAction.deleteCondition( getConditionIndex() );
     return 0L;
 }
@@ -375,137 +363,34 @@ void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor)
     m_rAction.applyCommand( m_nCondIndex, _nCommandId, _rColor );
 }
 
-void Condition::setImageList(sal_Int16 _eBitmapSet)
+void Condition::setImageList(sal_Int16 /*_eBitmapSet*/)
 {
+#if 0
     sal_Int16 nN = IMG_CONDFORMAT_DLG_SC;
     if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE )
         nN = IMG_CONDFORMAT_DLG_LC;
-    m_aActions.SetImageList(ImageList(ModuleRes(nN)));
+    m_pActions->SetImageList(ImageList(ModuleRes(nN)));
+#endif
 }
 
-void Condition::resizeControls(const Size& _rDiff)
+void Condition::resizeControls(const Size& /*_rDiff*/)
 {
+#if 0
     // we use large images so we must change them
     if ( _rDiff.Width() || _rDiff.Height() )
     {
         Invalidate();
     }
+#endif
 }
 
-void Condition::Paint( const Rectangle& rRect )
-{
-    Control::Paint(rRect);
-
-    // draw border
-    const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-    ColorChanger aColors( this, rStyleSettings.GetShadowColor(), rStyleSettings.GetDialogColor() );
-    DrawRect( impl_getToolBarBorderRect() );
-}
-
-void Condition::StateChanged( StateChangedType nType )
-{
-    Control::StateChanged( nType );
-
-    if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
-    {
-        // Check if we need to get new images for normal/high contrast mode
-        checkImageList();
-    }
-    else if ( nType == STATE_CHANGE_TEXT )
-    {
-        // The physical toolbar changed its outlook and shows another logical toolbar!
-        // We have to set the correct high contrast mode on the new tbx manager.
-        checkImageList();
-    }
-}
-
-void Condition::DataChanged( const DataChangedEvent& rDCEvt )
-{
-    Control::DataChanged( rDCEvt );
-
-    if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS )   ||
-        ( rDCEvt.GetType() == DATACHANGED_DISPLAY   ))  &&
-        ( rDCEvt.GetFlags() & SETTINGS_STYLE        ))
-    {
-        // Check if we need to get new images for normal/high contrast mode
-        checkImageList();
-    }
-}
-
-
 void Condition::GetFocus()
 {
-    Control::GetFocus();
+    VclHBox::GetFocus();
     if ( !m_bInDestruction )
-        m_aCondLHS.GrabFocus();
-}
-
-
-void Condition::Resize()
-{
-    Control::Resize();
-    impl_layoutAll();
-}
-
-
-Rectangle Condition::impl_getToolBarBorderRect() const
-{
-    const Point aToolbarPos( m_aActions.GetPosPixel() );
-    const Size aToolbarSize( m_aActions.GetSizePixel() );
-    const Size aRelatedControls = LogicToPixel( Size( RELATED_CONTROLS, RELATED_CONTROLS ), MAP_APPFONT );
-
-    Rectangle aBorderRect( aToolbarPos, aToolbarSize );
-    aBorderRect.Left() -= aRelatedControls.Width();
-    aBorderRect.Top() -= aRelatedControls.Height();
-    aBorderRect.Right() += aRelatedControls.Width();
-    aBorderRect.Bottom() += aRelatedControls.Height();
-
-    return aBorderRect;
-}
-
-
-void Condition::impl_layoutAll()
-{
-    // if our width changed, resize/-position some controls
-    const Size aSize( GetOutputSizePixel() );
-    if ( aSize.Width() == m_nLastKnownWindowWidth )
-        return;
-
-    m_nLastKnownWindowWidth = aSize.Width();
-
-    const Size aRelatedControls( LogicToPixel( Size( RELATED_CONTROLS, RELATED_CONTROLS ), MAP_APPFONT ) );
-    const Size aUnrelatedControls( LogicToPixel( Size( UNRELATED_CONTROLS, 0 ), MAP_APPFONT ) );
-    const Point aRow1( LogicToPixel( Point( 0, ROW_1_POS ), MAP_APPFONT ) );
-    const Point aRow3( LogicToPixel( Point( 0, ROW_3_POS ), MAP_APPFONT ) );
-
-    // resize the header line
-    m_aHeader.setPosSizePixel( 0, 0, aSize.Width() - 2 * aRelatedControls.Width(), 0, WINDOW_POSSIZE_WIDTH );
-
-    // position the up/down buttons
-    const Size aButtonSize( LogicToPixel( Size( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT ), MAP_APPFONT ) );
-    Point aButtonPos( aSize.Width() - aUnrelatedControls.Width() - aButtonSize.Width(), aRow1.Y() );
-    m_aMoveUp.setPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
-    aButtonPos.Move( 0, aButtonSize.Height() + aRelatedControls.Height() );
-    m_aMoveDown.setPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
-
-    // resize the preview
-    const long nNewPreviewRight = aButtonPos.X() - aRelatedControls.Width();
-
-    const Point aPreviewPos( m_aPreview.GetPosPixel() );
-    OSL_ENSURE( aPreviewPos.X() < nNewPreviewRight, "Condition::impl_layoutAll: being *that* small should not be allowed!" );
-    m_aPreview.setPosSizePixel( 0, 0, nNewPreviewRight - aPreviewPos.X(), 0, WINDOW_POSSIZE_WIDTH );
-
-    // position the add/remove buttons
-    aButtonPos = Point( nNewPreviewRight - aButtonSize.Width(), aRow3.Y() );
-    m_aRemoveCondition.setPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
-    aButtonPos.Move( -( aButtonSize.Width() + aRelatedControls.Width() ), 0 );
-    m_aAddCondition.setPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
-
-    // layout the operands input controls
-    impl_layoutOperands();
+        m_pCondLHS->GrabFocus();
 }
 
-
 IMPL_LINK( Condition, OnTypeSelected, ListBox*, /*_pNotInterestedIn*/ )
 {
     impl_layoutOperands();
@@ -519,7 +404,6 @@ IMPL_LINK( Condition, OnOperationSelected, ListBox*, /*_pNotInterestedIn*/ )
     return 0L;
 }
 
-
 void Condition::impl_layoutOperands()
 {
     const ConditionType eType( impl_getCurrentConditionType() );
@@ -533,43 +417,12 @@ void Condition::impl_layoutOperands()
                 )
             );
 
-    const Size aRelatedControls( LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ) );
-    const Rectangle aPreviewRect( m_aPreview.GetPosPixel(), m_aPreview.GetSizePixel() );
-
     // the "condition type" list box
-    const Rectangle aCondTypeRect( m_aConditionType.GetPosPixel(), m_aConditionType.GetSizePixel() );
-    const Point aOpListPos( aCondTypeRect.Right() + aRelatedControls.Width(), aCondTypeRect.Top() );
-    const Size aOpListSize( LogicToPixel( Size( COND_OP_WIDTH, 60 ), MAP_APPFONT ) );
-    m_aOperationList.setPosSizePixel( aOpListPos.X(), aOpListPos.Y(),aOpListSize.Width(), aOpListSize.Height() );
-    m_aOperationList.Show( !bIsExpression );
-
-    // the LHS input field
-    Point aLHSPos( aOpListPos.X() + aOpListSize.Width() + aRelatedControls.Width(), aOpListPos.Y() );
-    if ( bIsExpression )
-        aLHSPos.X() = aOpListPos.X();
-    Size aLHSSize( LogicToPixel( Size( EDIT_WIDTH, EDIT_HEIGHT ), MAP_APPFONT ) );
-    if ( !bHaveRHS )
-        aLHSSize.Width() = aPreviewRect.Right() - aLHSPos.X();
-    m_aCondLHS.setPosSizePixel( aLHSPos.X(), aLHSPos.Y(), aLHSSize.Width(), aLHSSize.Height() );
-
-    if ( bHaveRHS )
-    {
-        // the "and" text being the glue between LHS and RHS
-        const Point aOpGluePos( aLHSPos.X() + aLHSSize.Width() + aRelatedControls.Width(), aLHSPos.Y() );
-        const Size aOpGlueSize( m_aOperandGlue.GetTextWidth( m_aOperandGlue.GetText() ) + aRelatedControls.Width(), aLHSSize.Height() );
-        m_aOperandGlue.setPosSizePixel( aOpGluePos.X(), aOpGluePos.Y(), aOpGlueSize.Width(), aOpGlueSize.Height() );
-
-        // the RHS input field
-        const Point aRHSPos( aOpGluePos.X() + aOpGlueSize.Width() + aRelatedControls.Width(), aOpGluePos.Y() );
-        const Size aRHSSize( aPreviewRect.Right() - aRHSPos.X(), aLHSSize.Height() );
-        m_aCondRHS.setPosSizePixel( aRHSPos.X(), aRHSPos.Y(), aRHSSize.Width(), aRHSSize.Height() );
-    }
-
-    m_aOperandGlue.Show( bHaveRHS );
-    m_aCondRHS.Show( bHaveRHS );
+    m_pOperationList->Show( !bIsExpression );
+    m_pOperandGlue->Show( bHaveRHS );
+    m_pCondRHS->Show( bHaveRHS );
 }
 
-
 void Condition::impl_setCondition( const OUString& _rConditionFormula )
 {
     // determine the condition's type and comparison operation
@@ -612,10 +465,10 @@ void Condition::impl_setCondition( const OUString& _rConditionFormula )
     }
 
     // update UI
-    m_aConditionType.SelectEntryPos( (sal_uInt16)eType );
-    m_aOperationList.SelectEntryPos( (sal_uInt16)eOperation );
-    m_aCondLHS.SetText( sLHS );
-    m_aCondRHS.SetText( sRHS );
+    m_pConditionType->SelectEntryPos( (sal_uInt16)eType );
+    m_pOperationList->SelectEntryPos( (sal_uInt16)eOperation );
+    m_pCondLHS->SetText( sLHS );
+    m_pCondRHS->SetText( sRHS );
 
     // re-layout
     impl_layoutOperands();
@@ -648,11 +501,12 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat
     OSL_ENSURE(_xReportControlFormat.is(),"XReportControlFormat is NULL!");
     if ( _xReportControlFormat.is() )
     {
-        sal_uInt16 nItemCount = m_aActions.GetItemCount();
+        sal_uInt16 nItemCount = m_pActions->GetItemCount();
         for (sal_uInt16 j = 0; j< nItemCount; ++j)
         {
-            sal_uInt16 nItemId = m_aActions.GetItemId(j);
-            m_aActions.CheckItem( nItemId, m_rController.isFormatCommandEnabled( nItemId, _xReportControlFormat ) );
+            sal_uInt16 nItemId = m_pActions->GetItemId(j);
+            m_pActions->CheckItem( nItemId, m_rController.isFormatCommandEnabled(mapToolbarItemToSlotId(nItemId),
+                _xReportControlFormat ) );
         }
 
         try
@@ -663,9 +517,9 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat
             aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) );
             aFont.SetRelief( static_cast< FontRelief >( _xReportControlFormat->getCharRelief() ) );
             aFont.SetColor( _xReportControlFormat->getCharColor() );
-            m_aPreview.SetFont( aFont, aFont, aFont );
-            m_aPreview.SetBackColor( _xReportControlFormat->getControlBackground() );
-            m_aPreview.SetTextLineColor( Color( _xReportControlFormat->getCharUnderlineColor() ) );
+            m_pPreview->SetFont( aFont, aFont, aFont );
+            m_pPreview->SetBackColor( _xReportControlFormat->getControlBackground() );
+            m_pPreview->SetTextLineColor( Color( _xReportControlFormat->getCharUnderlineColor() ) );
         }
         catch( const Exception& )
         {
@@ -679,8 +533,8 @@ void Condition::fillFormatCondition(const uno::Reference< report::XFormatConditi
     const ConditionType eType( impl_getCurrentConditionType() );
     const ComparisonOperation eOperation( impl_getCurrentComparisonOperation() );
 
-    const OUString sLHS( m_aCondLHS.GetText() );
-    const OUString sRHS( m_aCondRHS.GetText() );
+    const OUString sLHS( m_pCondLHS->GetText() );
+    const OUString sRHS( m_pCondRHS->GetText() );
 
     OUString sUndecoratedFormula( sLHS );
 
@@ -702,17 +556,17 @@ void Condition::setConditionIndex( size_t _nCondIndex, size_t _nCondCount )
     m_nCondIndex = _nCondIndex;
     OUString sHeader( ModuleRes( STR_NUMBERED_CONDITION ) );
     sHeader = sHeader.replaceFirst( "$number$", OUString::number( _nCondIndex + 1) );
-    m_aHeader.SetText( sHeader );
+    m_pHeader->SetText( sHeader );
 
-    m_aMoveUp.Enable( _nCondIndex > 0 );
+    m_pMoveUp->Enable( _nCondIndex > 0 );
     OSL_PRECOND( _nCondCount > 0, "Condition::setConditionIndex: having no conditions at all is nonsense!" );
-    m_aMoveDown.Enable( _nCondIndex < _nCondCount - 1 );
+    m_pMoveDown->Enable( _nCondIndex < _nCondCount - 1 );
 }
 
 
 bool Condition::isEmpty() const
 {
-    return m_aCondLHS.GetText().isEmpty();
+    return m_pCondLHS->GetText().isEmpty();
 }
 
 
diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx
index b28b43a..7635082 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -33,6 +33,8 @@
 #include <vcl/field.hxx>
 #include <vcl/button.hxx>
 #include <vcl/toolbox.hxx>
+#include <vcl/builder.hxx>
+#include <vcl/layout.hxx>
 
 #include <memory>
 
@@ -45,39 +47,48 @@ namespace rptui
     class IConditionalFormatAction;
     class Condition;
 
-    class ConditionField : public Edit
+    class ConditionField
     {
         Condition*  m_pParent;
         Edit*       m_pSubEdit;
-        PushButton  m_aFormula;
+        PushButton* m_pFormula;
 
         DECL_LINK( OnFormula,   Button* );
     public:
-        ConditionField( Condition* pParent, const ResId& rResId );
-        virtual ~ConditionField();
-        virtual void Resize() SAL_OVERRIDE;
+        ConditionField(Condition* pParent, Edit* pSubEdit, PushButton *pFormula);
+        void GrabFocus() { m_pSubEdit->GrabFocus(); }
+        void Show(bool bShow) { m_pSubEdit->Show(bShow); m_pFormula->Show(bShow); }
+        void SetText(const OUString& rText) { m_pSubEdit->SetText(rText); }
+        OUString GetText() const { return m_pSubEdit->GetText(); }
     };
 
-
     //= Condition
 
-    class Condition :public Control
+    class Condition :public VclHBox
                     ,public dbaui::OToolBoxHelper
+                    ,public VclBuilderContainer
     {
+        sal_uInt16                  m_nBoldId;
+        sal_uInt16                  m_nItalicId;
+        sal_uInt16                  m_nUnderLineId;
+        sal_uInt16                  m_nBackgroundColorId;
+        sal_uInt16                  m_nFontColorId;
+        sal_uInt16                  m_nFontDialogId;
+
         ::rptui::OReportController& m_rController;
         IConditionalFormatAction&   m_rAction;
-        FixedLine                   m_aHeader;
-        ListBox                     m_aConditionType;
-        ListBox                     m_aOperationList;
-        ConditionField              m_aCondLHS;
-        FixedText                   m_aOperandGlue;
-        ConditionField              m_aCondRHS;
-        ToolBox                     m_aActions;
-        SvxFontPrevWindow           m_aPreview;
-        ImageButton                 m_aMoveUp;
-        ImageButton                 m_aMoveDown;
-        PushButton                  m_aAddCondition;
-        PushButton                  m_aRemoveCondition;
+        FixedText*                  m_pHeader;
+        ListBox*                    m_pConditionType;
+        ListBox*                    m_pOperationList;
+        ConditionField*             m_pCondLHS;
+        FixedText*                  m_pOperandGlue;
+        ConditionField*             m_pCondRHS;
+        ToolBox*                    m_pActions;
+        SvxFontPrevWindow*          m_pPreview;
+        PushButton*                 m_pMoveUp;
+        PushButton*                 m_pMoveDown;
+        PushButton*                 m_pAddCondition;
+        PushButton*                 m_pRemoveCondition;
         OColorPopup*                m_pColorFloat;
 
         ::svx::ToolboxButtonColorUpdater*   m_pBtnUpdaterFontColor; // updates the color below the toolbar icon
@@ -139,20 +150,14 @@ namespace rptui
 
         inline ::rptui::OReportController& getController() const { return m_rController; }
 
+        sal_uInt16 mapToolbarItemToSlotId(sal_uInt16 nItemId) const;
+
     protected:
-        virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
-        virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
-        virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
-        virtual void Resize() SAL_OVERRIDE;
         virtual void GetFocus() SAL_OVERRIDE;
 
     private:
-        void    impl_layoutAll();
         void    impl_layoutOperands();
 
-        /// determines the rectangle to be occupied by the toolbar, including the border drawn around it
-        Rectangle   impl_getToolBarBorderRect() const;
-
         inline  ConditionType
                     impl_getCurrentConditionType() const;
 
@@ -169,13 +174,13 @@ namespace rptui
 
     inline ConditionType Condition::impl_getCurrentConditionType() const
     {
-        return sal::static_int_cast< ConditionType >( m_aConditionType.GetSelectEntryPos() );
+        return sal::static_int_cast< ConditionType >( m_pConditionType->GetSelectEntryPos() );
     }
 
 
     inline ComparisonOperation Condition::impl_getCurrentComparisonOperation() const
     {
-        return sal::static_int_cast< ComparisonOperation >( m_aOperationList.GetSelectEntryPos() );
+        return sal::static_int_cast< ComparisonOperation >( m_pOperationList->GetSelectEntryPos() );
     }
 
 
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
index 86b3d3c..6edee15 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -73,13 +73,9 @@ namespace rptui
         typedef ::std::vector< ConditionPtr >       Conditions;
 
         OModuleClient   m_aModuleClient;
-        Window          m_aConditionPlayground;
+        Window*         m_pConditionPlayground;
         Conditions      m_aConditions;
-        FixedLine       m_aSeparator;
-        OKButton        m_aPB_OK;
-        CancelButton    m_aPB_CANCEL;
-        HelpButton      m_aPB_Help;
-        ScrollBar       m_aCondScroll;
+        ScrollBar*      m_pCondScroll;
 
         ::rptui::OReportController&                         m_rController;
         ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlModel >
@@ -88,6 +84,7 @@ namespace rptui
                                                             m_xCopy;
 
         bool    m_bDeletingCondition;
+        bool    m_bConstructed;
 
     public:
         ConditionalFormattingDialog(
@@ -134,7 +131,7 @@ namespace rptui
         void    impl_layoutAll();
 
         /// does the layout for the condition windows
-        void    impl_layoutConditions( Point& _out_rBelowLastVisible );
+        void    impl_layoutConditions();
 
         /// called when the number of conditions has changed in any way
         void    impl_conditionCountChanged();
@@ -154,9 +151,6 @@ namespace rptui
         /// returns the index of the last visible condition
         size_t  impl_getLastVisibleConditionIndex() const;
 
-        /// determines the width of a Condition
-        long    impl_getConditionWidth() const;
-
         /// focuses the condition with the given index, making it visible if necessary
         void    impl_focusCondition( size_t _nCondIndex );
 
@@ -171,6 +165,9 @@ namespace rptui
 
         /// ensures the condition with the given index is visible
         void    impl_ensureConditionVisible( size_t _nCondIndex );
+
+        /// set the preferred height of the action_area
+        void    impl_setPrefHeight(bool bFirst);
     };
 
 
diff --git a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
new file mode 100644
index 0000000..b6b57f4
--- /dev/null
+++ b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkDialog" id="CondFormat">
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Conditional Formatting</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <child>
+              <object class="GtkBox" id="condPlaygroundDrawingarea">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrollbar" id="condScrollbar">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="vexpand">True</property>
+                <property name="orientation">vertical</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/reportdesign/uiconfig/dbreport/ui/conditionwin.ui b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui
new file mode 100644
index 0000000..9c141ff
--- /dev/null
+++ b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui
@@ -0,0 +1,406 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkImage" id="image1">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-up</property>
+  </object>
+  <object class="GtkImage" id="image2">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-down</property>
+  </object>
+  <object class="GtkBox" id="ConditionWin">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="border_width">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkLabel" id="headerLabel">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="halign">start</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="row_spacing">6</property>
+        <property name="column_spacing">12</property>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkComboBoxText" id="typeCombobox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <items>
+                  <item translatable="yes">Field Value Is</item>
+                  <item translatable="yes">Expression Is</item>
+                </items>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBoxText" id="opCombobox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <items>
+                  <item translatable="yes">between</item>
+                  <item translatable="yes">not between</item>
+                  <item translatable="yes">equal to</item>
+                  <item translatable="yes">not equal to</item>
+                  <item translatable="yes">greater than</item>
+                  <item translatable="yes">less than</item>
+                  <item translatable="yes">greater than or equal to</item>
+                  <item translatable="yes">less than or equal to</item>
+                </items>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="grid4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="valign">center</property>
+                <property name="column_spacing">6</property>
+                <child>
+                  <object class="GtkEntry" id="lhsEntry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="lhsButton">
+                    <property name="label" translatable="yes">...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="andLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">and</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="grid5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="valign">center</property>
+                <property name="column_spacing">6</property>
+                <child>
+                  <object class="GtkEntry" id="rhsEntry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="rhsButton">
+                    <property name="label" translatable="yes">...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="upButton">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="image">image1</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkToolbar" id="formatToolbox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="toolbar_style">icons</property>
+                <property name="show_arrow">False</property>
+                <child>
+                  <object class="GtkToolButton" id="ToolBoxItem1">
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">.uno:Bold</property>
+                    <property name="label" translatable="yes">Bold</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_bold.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="ToolBoxItem2">
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">.uno:Italic</property>
+                    <property name="label" translatable="yes">Italic</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_italic.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="ToolBoxItem3">
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">.uno:Underline</property>
+                    <property name="label" translatable="yes">Underline</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_underline.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSeparatorToolItem" id="separatortoolitem1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkMenuToolButton" id="ToolBoxItem4">
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">.uno:BackgroundColor</property>
+                    <property name="label" translatable="yes">Background Color</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_backgroundcolor.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkMenuToolButton" id="ToolBoxItem5">
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">.uno:FontColor</property>
+                    <property name="label" translatable="yes">Font Color</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_fontcolor.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="ToolBoxItem6">
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">.uno:FontDialog</property>
+                    <property name="label" translatable="yes">Character Formatting</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_fontdialog.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="svxlo-SvxFontPrevWindow" id="previewDrawingarea">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="downButton">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="valign">start</property>
+            <property name="image">image2</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkGrid" id="grid2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="halign">end</property>
+        <property name="column_spacing">6</property>
+        <child>
+          <object class="GtkButton" id="removeButton">
+            <property name="label" translatable="yes">-</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="addButton">
+            <property name="label" translatable="yes">+</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="halign">end</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+</interface>
commit 2fa900c7c3eb52049f10df195eb58c07b17aa54f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 8 11:28:19 2014 +0100

    coverity#706531 Uncaught exception
    
    Change-Id: Ibcd5d2b4124ab441a90748588d063f394b1ef372

diff --git a/extensions/source/propctrlr/propeventtranslation.cxx b/extensions/source/propctrlr/propeventtranslation.cxx
index 28dba63..804e8c3 100644
--- a/extensions/source/propctrlr/propeventtranslation.cxx
+++ b/extensions/source/propctrlr/propeventtranslation.cxx
@@ -46,7 +46,7 @@ namespace pcr
         ,m_xTranslatedEventSource( _rxTranslatedEventSource )
     {
         if ( !m_xDelegator.is() )
-            throw NullPointerException();
+            throw RuntimeException();
     }
 
 
commit 81a8f537d64acf09b2165fdbba1f8bf50b5d9ae1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 8 13:57:55 2014 +0100

    Related: fdo#80633 dialog size cache has to be invalidated too
    
    otherwise the VclExpander will have no effect
    
    Change-Id: I039fa361d7088dfe4a6ff849623e34b27e2be26b

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 9cf4725..87d9d77 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1238,6 +1238,9 @@ void Dialog::queue_resize()
         return;
     if (!isLayoutEnabled())
         return;
+    WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
+    pWindowImpl->mnOptimalWidthCache = -1;
+    pWindowImpl->mnOptimalHeightCache = -1;
     maLayoutTimer.Start();
 }
 
commit 5cc4b1ddd64eea6458390c500fe0ad8f0f224843
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 7 16:02:43 2014 +0100

    catched->caught
    
    Change-Id: If655720c1d1d2e8685315261b4524b876adfc053

diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index ee158d5..fb597e3 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -210,7 +210,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
         {
 
 #if OSL_DEBUG_LEVEL > 0
-            OStringBuffer aError("SAX parse exception catched while importing:\n");
+            OStringBuffer aError("SAX parse exception caught while importing:\n");
             aError.append(OUStringToOString(r.Message, RTL_TEXTENCODING_ASCII_US));
             OSL_FAIL(aError.getStr());
 #endif
@@ -246,7 +246,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
         {
 
 #if OSL_DEBUG_LEVEL > 0
-            OStringBuffer aError("SAX exception catched while importing:\n");
+            OStringBuffer aError("SAX exception caught while importing:\n");
             aError.append(OUStringToOString(r.Message,
                 RTL_TEXTENCODING_ASCII_US));
             OSL_FAIL(aError.getStr());
@@ -259,7 +259,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
     catch( const packages::zip::ZipIOException& r )
     {
 #if OSL_DEBUG_LEVEL > 0
-        OStringBuffer aError("Zip exception catched while importing:\n");
+        OStringBuffer aError("Zip exception caught while importing:\n");
         aError.append(OUStringToOString(r.Message,
             RTL_TEXTENCODING_ASCII_US));
         OSL_FAIL( aError.getStr() );
@@ -271,7 +271,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
     catch( const io::IOException& r )
     {
 #if OSL_DEBUG_LEVEL > 0
-        OStringBuffer aError("IO exception catched while importing:\n");
+        OStringBuffer aError("IO exception caught while importing:\n");
         aError.append(OUStringToOString(r.Message,
             RTL_TEXTENCODING_ASCII_US));
         OSL_FAIL(aError.getStr());
@@ -283,7 +283,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo
     catch( const uno::Exception& r )
     {
 #if OSL_DEBUG_LEVEL > 0
-        OStringBuffer aError("uno exception catched while importing:\n");
+        OStringBuffer aError("uno exception caught while importing:\n");
         aError.append(OUStringToOString(r.Message,
             RTL_TEXTENCODING_ASCII_US));
         OSL_FAIL(aError.getStr());
commit 07d7a03b950fa20f4f0609d750292fb7f1ecfb3e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 7 16:01:39 2014 +0100

    don't terminate via unhandled exception on loading ooo89328-1.sxc
    
    Change-Id: If266fa0ebaf2c3c0cd54238879a858098066c03d

diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index dee010e..70e9a0c 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -20,6 +20,7 @@
 
 #include <stdio.h>
 #include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/embed/XTransactedObject.hpp>
 #include <com/sun/star/embed/XEmbedObjectCreator.hpp>
 #include <com/sun/star/embed/XEmbedObjectFactory.hpp>
@@ -29,7 +30,7 @@
 #include <com/sun/star/embed/EntryInitModes.hpp>
 #include <com/sun/star/embed/EmbedStates.hpp>
 #include <com/sun/star/embed/Aspects.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
 #include <tools/debug.hxx>
 #include <unotools/streamwrap.hxx>
 #include <unotools/tempfile.hxx>
@@ -605,12 +606,27 @@ void SvXMLEmbeddedObjectHelper::Flush()
 }
 
 // XGraphicObjectResolver: alien objects!
-OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL( const OUString& aURL )
+OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL(const OUString& rURL)
     throw(RuntimeException, std::exception)
 {
     MutexGuard          aGuard( maMutex );
 
-    return ImplInsertEmbeddedObjectURL( aURL );
+    OUString sRet;
+    try
+    {
+        sRet = ImplInsertEmbeddedObjectURL(rURL);
+    }
+    catch (const RuntimeException&)
+    {
+        throw;
+    }
+    catch (const Exception& e)
+    {
+        throw WrappedTargetRuntimeException(
+            "SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL non-RuntimeException",
+            static_cast<uno::XWeak*>(this), uno::makeAny(e));
+    }
+    return sRet;
 }
 
 // XNameAccess: alien objects!


More information about the Libreoffice-commits mailing list