[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - sal/inc sfx2/source vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 25 04:45:54 PDT 2012


 sal/inc/sal/log-areas.dox      |    1 +
 sfx2/source/appl/sfxhelp.cxx   |    8 --------
 vcl/source/control/spinfld.cxx |    3 ---
 vcl/source/window/builder.cxx  |    4 +++-
 vcl/source/window/dialog.cxx   |    6 ++----
 vcl/source/window/layout.cxx   |    6 ++++--
 vcl/source/window/printdlg.cxx |    5 -----
 vcl/source/window/tabpage.cxx  |    1 -
 vcl/source/window/window.cxx   |    2 +-
 9 files changed, 11 insertions(+), 25 deletions(-)

New commits:
commit ca9da750a0081486aace291117bdc0d10708a546
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 25 12:45:16 2012 +0100

    move layout diagnostics to vcl.layout channel
    
    Change-Id: Ib33d91ea56219036182d30fdd3dc2159ce32a48c

diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index c30bc0b..6896148 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -42,6 +42,7 @@ certain functionality.
 
 @li @c vcl.gdi - the GDI part of VCL, devices, bitmaps, etc.
 @li @c vcl.gtk - Gtk+ 2/3 plugin
+ at li @c vcl.layout - Widget layout
 
 
 @section Writer
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 137cbdf..7fcf303 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -612,7 +612,6 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
 {
     String sModuleName = GetHelpModuleName_Impl();
     String sHelpText = pImp->GetHelpText( aCommandURL, sModuleName );
-    fprintf(stderr, "A sHelpText %s for id %s\n", rtl::OUStringToOString(sHelpText, RTL_TEXTENCODING_UTF8).getStr(), rtl::OUStringToOString(aCommandURL, RTL_TEXTENCODING_UTF8).getStr());
 
     rtl::OString aNewHelpId;
 
@@ -624,7 +623,6 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
         {
             aNewHelpId = pParent->GetHelpId();
             sHelpText = pImp->GetHelpText( rtl::OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8), sModuleName );
-            fprintf(stderr, "B sHelpText %s for id %s\n", rtl::OUStringToOString(sHelpText, RTL_TEXTENCODING_UTF8).getStr(), aNewHelpId.getStr());
             if ( sHelpText.Len() > 0 )
                 pParent = NULL;
             else
@@ -740,8 +738,6 @@ sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const S
             if ( rURL.Search( sHelpIdScheme ) != 0 )
                 sKeyword = ::rtl::OUString( rURL );
 
-            fprintf(stderr, "C aHelpURL %s\n", rtl::OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8).getStr());
-
             if ( impl_hasHelpInstalled() && pWindow && SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
             {
                 // no help found -> try with parent help id.
@@ -749,12 +745,9 @@ sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const S
                 while ( pParent )
                 {
                     rtl::OString aHelpId = pParent->GetHelpId();
-                    fprintf(stderr, "D helpid %s for %p\n", aHelpId.getStr(), pParent);
                     aHelpURL = CreateHelpURL( rtl::OStringToOUString(aHelpId, RTL_TEXTENCODING_UTF8), aHelpModuleName );
-                    fprintf(stderr, "D aHelpURL %s\n", rtl::OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8).getStr());
                     if ( !SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
                     {
-                        fprintf(stderr, "found as %s\n", rtl::OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8).getStr());
                         break;
                     }
                     else
@@ -762,7 +755,6 @@ sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const S
                         pParent = pParent->GetParent();
                         if ( !pParent )
                         {
-                            fprintf(stderr, "no more parents\n");
                             // create help url of start page ( helpid == 0 -> start page)
                             aHelpURL = CreateHelpURL( String(), aHelpModuleName );
                         }
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index dcd5233..ecb0e51 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -367,7 +367,6 @@ SpinField::SpinField( Window* pParent, const ResId& rResId ) :
 
 void SpinField::take_properties(Window &rOther)
 {
-    fprintf(stderr, "SpinField::take_properties\n");
     if (!GetParent())
     {
         ImplInitSpinFieldData();
@@ -391,7 +390,6 @@ void SpinField::take_properties(Window &rOther)
     mbUpperIn = rOtherField.mbUpperIn;
     mbLowerIn = rOtherField.mbLowerIn;
     mbInDropDown = rOtherField.mbInDropDown;
-    fprintf(stderr, "SpinField::take_properties %p %d\n", this, IsVisible());
 }
 
 
@@ -1004,7 +1002,6 @@ Size SpinField::CalcMinimumSizeForText(const rtl::OUString &rString) const
 
 Size SpinField::CalcMinimumSize() const
 {
-    fprintf(stderr, "SpinField::CalcMinimumSize\n");
     return CalcMinimumSizeForText(GetText());
 }
 
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 9edf197..da2b87c 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -605,7 +605,9 @@ Window *VclBuilder::insertObject(Window *pParent, const rtl::OString &rClass, co
         if (pCurrentChild->GetHelpId().isEmpty())
         {
             pCurrentChild->SetHelpId(m_sHelpRoot + m_sID);
-            fprintf(stderr, "for toplevel dialog %p %s, set helpid %s\n", this, rID.getStr(), pCurrentChild->GetHelpId().getStr());
+            SAL_INFO("vcl.layout", "for toplevel dialog " << this << " " <<
+                rID.getStr() << ", set helpid " <<
+                pCurrentChild->GetHelpId().getStr());
         }
     }
     else
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 5d419a9..78a426d 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -552,8 +552,6 @@ VclBuilder* VclBuilderContainer::overrideResourceWithUIXML(Window *pWindow, cons
         appendAscii(".ui").
         makeStringAndClear();
 
-    fprintf(stderr, "path %s id %d\n", rtl::OUStringToOString(sRoot+sPath, RTL_TEXTENCODING_UTF8).getStr(), nUIid);
-
     osl::File aUIFile(sRoot + sPath);
     osl::File::RC error = aUIFile.open(osl_File_OpenFlag_Read);
     //good, use the preferred GtkBuilder xml
@@ -1223,7 +1221,7 @@ IMPL_LINK( Dialog, ImplHandleLayoutTimerHdl, void*, EMPTYARG )
 {
     if (!isLayoutEnabled())
     {
-        fprintf(stderr, "Dialog has become non-layout because extra children have been added directly to it!\n");
+        SAL_WARN("vcl.layout", "Dialog has become non-layout because extra children have been added directly to it.");
         return 0;
     }
 
@@ -1290,7 +1288,7 @@ bool VclBuilderContainer::replace_buildable(Window *pParent, const ResId& rResId
     }
     else
     {
-        fprintf(stderr, "%d %p not found, hiding\n", nID, &rReplacement);
+        SAL_WARN("vcl.layout", "widget " << nID << " " << &rReplacement << " not found, hiding");
         //move "missing" elements into the action area (just to have
         //a known container as an owner) and hide it
         Window* pArbitraryParent;
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 6e81616..9ab9579 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -322,7 +322,9 @@ bool VclButtonBox::set_property(const rtl::OString &rKey, const rtl::OString &rV
         else if (rValue.equalsL(RTL_CONSTASCII_STRINGPARAM("center")))
             eStyle = VCL_BUTTONBOX_CENTER;
         else
-            fprintf(stderr, "unknown layout style %s\n", rValue.getStr());
+        {
+            SAL_WARN("vcl.layout", "unknown layout style " << rValue.getStr());
+        }
         set_layout(eStyle);
     }
     else
@@ -359,7 +361,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
         case VCL_BUTTONBOX_START:
             break;
         default:
-            fprintf(stderr, "todo unimplemented layout style\n");
+            SAL_WARN("vcl.layout", "todo unimplemented layout style");
         case VCL_BUTTONBOX_DEFAULT_STYLE:
         case VCL_BUTTONBOX_END:
             setPrimaryCoordinate(aPos, nPrimaryCoordinate + nAllocPrimaryDimension
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index ad80b51..84bcb3f 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -808,8 +808,6 @@ void PrintDialog::setupOptionalUI()
     const Sequence< PropertyValue >& rOptions( maPController->getUIOptions() );
     for( int i = 0; i < rOptions.getLength(); i++ )
     {
-        fprintf(stderr, "property name is %s\n", rtl::OUStringToOString(rOptions[i].Name, RTL_TEXTENCODING_UTF8).getStr());
-
         if (rOptions[i].Name == "OptionsUIFile")
         {
             rtl::OUString sOptionsUIFile;
@@ -817,8 +815,6 @@ void PrintDialog::setupOptionalUI()
 
             Window *pCustom = get<Window>("customcontents");
 
-            fprintf(stderr, "pcustom is %p\n", pCustom);
-
             delete mpCustomOptionsUIBuilder;
             mpCustomOptionsUIBuilder = new VclBuilder(pCustom, getUIRootDir(), sOptionsUIFile);
             Window *pWindow = mpCustomOptionsUIBuilder->get_widget_root();
@@ -943,7 +939,6 @@ void PrintDialog::setupOptionalUI()
                 pPage = mpCustomOptionsUIBuilder->get<TabPage>(aID);
             sal_uInt16 nPageId = mpTabCtrl->GetPageId(*pPage);
 
-            fprintf(stderr, "pCustomPage %p for %s\n", pPage, rtl::OUStringToOString(aText, RTL_TEXTENCODING_UTF8).getStr());
             mpTabCtrl->SetPageText(nPageId, aText);
 
             // set help id
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 85ee67d..8bdd921 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -227,7 +227,6 @@ bool TabPage::isLayoutEnabled() const
 
 Size TabPage::GetOptimalSize(WindowSizeType eType) const
 {
-    fprintf(stderr, "asked for optimalsize of tabpage %p (%d) vis is %d\n", this, isLayoutEnabled(), IsVisible());
     if (eType == WINDOWSIZE_MAXIMUM)
         return Window::GetOptimalSize(eType);
     Size aSize;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 89470d3..66eeee5 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -6518,7 +6518,7 @@ Size Window::GetSizePixel() const
 {
     if (!mpWindowImpl)
     {
-        fprintf(stderr, "WTF\n");
+        SAL_WARN("vcl.layout", "WTF no windowimpl");
         return Size(0,0);
     }
 


More information about the Libreoffice-commits mailing list