Commits

Anonymous committed 3e0bcb5 Merge

container_controls: pull missing change from remote repo.. changeset 265177

Comments (0)

Files changed (2)

toolkit/inc/toolkit/controls/dialogcontrol.hxx

 class UnoDialogContainerControl : public UnoControlContainer, public UnoDialogContainerControl_IBase
 {
 protected:
+    bool                                                                        mbSizeModified;
+    bool                                                                        mbPosModified;
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController >	mxTabController;
     void		ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName );
     void		ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel );
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar >			mxMenuBar;
 	TopWindowListenerMultiplexer	                                            maTopWindowListeners;
     bool                                                                        mbWindowListener;
-    bool                                                                        mbSizeModified;
-    bool                                                                        mbPosModified;
     ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
     ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener;
  

toolkit/source/controls/dialogcontrol.cxx

 //	----------------------------------------------------
 //	class DialogContainerControl
 //	----------------------------------------------------
-UnoDialogContainerControl::UnoDialogContainerControl()
+UnoDialogContainerControl::UnoDialogContainerControl() :
+    mbSizeModified(false),
+    mbPosModified(false)
 {
 	maComponentInfos.nWidth = 280;
 	maComponentInfos.nHeight = 400;
     xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) ) ) >>= nY;
     xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ) >>= nWidth;
     xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) >>= nHeight;
-
 	MapMode aMode( MAP_APPFONT );
     OutputDevice*pOutDev = Application::GetDefaultDevice();
     if ( pOutDev )
             {
                 if ( bOwnModel )
                 {
+                    if ( !mbPosModified && !mbSizeModified )
+                    {
                         // Don't set new pos/size if we get new values from window listener
                         Reference< XControl > xThis( (XAggregation*)(::cppu::OWeakAggObject*)this, UNO_QUERY );
                         ImplSetPosSize( xThis );
+                    }
                 }
                 else
                 {
 
 UnoDialogControl::UnoDialogControl() :
     maTopWindowListeners( *this ),
-    mbWindowListener(false),
-    mbSizeModified(false),
-    mbPosModified(false)
+    mbWindowListener(false)
 {
 	maComponentInfos.nWidth = 300;
 	maComponentInfos.nHeight = 450;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.