Commits

Anonymous committed 4833c69

container_controls: code cleanup, adjustments with cws dr77

Comments (0)

Files changed (9)

oox/inc/oox/ole/axcontrol.hxx

                             const ::rtl::OUString& rCtrlSource,
                             const ::rtl::OUString& rRowSource,
                             sal_Int32 nRefSheet = 0 ) const;
-                            
+
     // ActiveX (Forms 2.0) specific conversion --------------------------------
 
     /** Converts the Forms 2.0 background formatting to UNO properties. */

oox/inc/oox/xls/drawingfragment.hxx

 
 #include <com/sun/star/awt/Rectangle.hpp>
 #include <com/sun/star/awt/Size.hpp>
+#include "oox/drawingml/shape.hxx"
 #include "oox/ole/axcontrol.hxx"
-#include "oox/drawingml/shape.hxx"
 #include "oox/vml/vmldrawing.hxx"
 #include "oox/vml/vmldrawingfragment.hxx"
 #include "oox/xls/excelhandlers.hxx"

oox/source/ole/axcontrol.cxx

  ************************************************************************/
 
 #include "oox/ole/axcontrol.hxx"
-#include <rtl/tencinfo.h>
+
 #include <com/sun/star/awt/FontSlant.hpp>
 #include <com/sun/star/awt/FontStrikeout.hpp>
 #include <com/sun/star/awt/FontUnderline.hpp>
 #include <com/sun/star/style/VerticalAlignment.hpp>
 #include <com/sun/star/table/CellAddress.hpp>
 #include <com/sun/star/table/CellRangeAddress.hpp>
-#include "properties.hxx"
-#include "tokens.hxx"
+#include <rtl/tencinfo.h>
 #include "oox/helper/attributelist.hxx"
 #include "oox/helper/binaryinputstream.hxx"
 #include "oox/helper/graphichelper.hxx"
 #include "oox/helper/propertymap.hxx"
+#include "properties.hxx"
+#include "tokens.hxx"
 
 namespace oox {
 namespace ole {
 
-using ::rtl::OUString;
+// ============================================================================
+
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::uno;
 
+using ::rtl::OUString;
+
 // ============================================================================
 
 namespace {
     catch( Exception& )
     {
     }
-    rConverter.setProperty( PROP_XL_A1_Representation, rAddressString );
+    rConverter.setProperty( PROP_XLA1Representation, rAddressString );
     rConverter.setProperty( PROP_ReferenceSheet, nRefSheet );
 }
 

oox/source/ole/vbacontrol.cxx

  ************************************************************************/
 
 #include "oox/ole/vbacontrol.hxx"
+
 #include <algorithm>
 #include <set>
-#include <rtl/ustrbuf.hxx>
 #include <com/sun/star/awt/XControlModel.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/io/XInputStreamProvider.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <rtl/ustrbuf.hxx>
 #include <xmlscript/xmldlg_imexp.hxx>
-#include "properties.hxx"
-#include "tokens.hxx"
 #include "oox/helper/attributelist.hxx"
 #include "oox/helper/binaryinputstream.hxx"
 #include "oox/helper/propertymap.hxx"
 #include "oox/helper/storagebase.hxx"
 #include "oox/helper/textinputstream.hxx"
 #include "oox/ole/vbahelper.hxx"
+#include "properties.hxx"
+#include "tokens.hxx"
+
+namespace oox {
+namespace ole {
+
+// ============================================================================
+
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
 
 using ::rtl::OUString;
 using ::rtl::OUStringBuffer;
-using ::com::sun::star::awt::XControlModel;
-using ::com::sun::star::container::XNameContainer;
-using ::com::sun::star::frame::XModel;
-using ::com::sun::star::io::XInputStreamProvider;
-using ::com::sun::star::lang::XMultiServiceFactory;
-using ::com::sun::star::uno::Any;
-using ::com::sun::star::uno::Exception;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::UNO_QUERY_THROW;
-using ::com::sun::star::uno::UNO_SET_THROW;
-using ::com::sun::star::uno::XComponentContext;
-
-namespace oox {
-namespace ole {
 
 // ============================================================================
 

oox/source/token/genproperties.pl

 {
     chomp( $_ );
     $_ =~ s/\s*//g;
-    $_ =~ /^[A-Z][a-zA-Z0-9_]*$/ or die "invalid character in property '$_'";
+    $_ =~ /^[A-Z][a-zA-Z0-9]*$/ or die "invalid character in property '$_'";
     $id = "PROP_$_";
     $props{$_} = $id;
 }

oox/source/token/properties.txt

 Width
 WriteProtectionPassword
 WritingMode
-XL_A1_Representation
+XLA1Representation
 ZoomType
 ZoomValue

oox/source/xls/drawingfragment.cxx

  ************************************************************************/
 
 #include "oox/xls/drawingfragment.hxx"
+
 #include <com/sun/star/awt/Point.hpp>
-#include "properties.hxx"
-#include "oox/helper/attributelist.hxx"
-#include "oox/helper/propertyset.hxx"
 #include "oox/drawingml/connectorshapecontext.hxx"
 #include "oox/drawingml/graphicshapecontext.hxx"
 #include "oox/drawingml/shapecontext.hxx"
 #include "oox/drawingml/shapegroupcontext.hxx"
+#include "oox/helper/attributelist.hxx"
+#include "oox/helper/propertyset.hxx"
 #include "oox/vml/vmlshape.hxx"
 #include "oox/vml/vmlshapecontainer.hxx"
 #include "oox/xls/formulaparser.hxx"
 #include "oox/xls/stylesbuffer.hxx"
 #include "oox/xls/themebuffer.hxx"
 #include "oox/xls/unitconverter.hxx"
+#include "properties.hxx"
 
-using ::rtl::OUString;
+namespace oox {
+namespace xls {
+
+// ============================================================================
+
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::uno;
+
 using ::oox::core::ContextHandlerRef;
 using ::oox::drawingml::ConnectorShapeContext;
 using ::oox::drawingml::GraphicalObjectFrameContext;
 using ::oox::drawingml::ShapePtr;
 using ::oox::drawingml::ShapeContext;
 using ::oox::drawingml::ShapeGroupContext;
+using ::rtl::OUString;
 // no using's for ::oox::vml, that may clash with ::oox::drawingml types
 
-namespace oox {
-namespace xls {
-
 // ============================================================================
 
 namespace {

sc/inc/unonames.hxx

 #define SC_UNONAME_ADDRESS          "Address"
 #define SC_UNONAME_UIREPR           "UserInterfaceRepresentation"
 #define SC_UNONAME_PERSREPR         "PersistentRepresentation"
-#define SC_UNONAME_XL_A1_REPR       "XL_A1_Representation"
+#define SC_UNONAME_XLA1REPR         "XLA1Representation"
 #define SC_UNONAME_REFSHEET         "ReferenceSheet"
 
 // --> PB 2004-08-23 #i33095# Security Options

sc/source/ui/unoobj/addruno.cxx

         {
             {MAP_CHAR_LEN(SC_UNONAME_ADDRESS),  0,  &getCppuType((table::CellRangeAddress*)0), 0, 0 },
             {MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
-            {MAP_CHAR_LEN(SC_UNONAME_XL_A1_REPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
             {MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0,  &getCppuType((sal_Int32*)0),        0, 0 },
             {MAP_CHAR_LEN(SC_UNONAME_UIREPR),   0,  &getCppuType((rtl::OUString*)0),    0, 0 },
+            {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
             {0,0,0,0,0,0}
         };
         static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
         {
             {MAP_CHAR_LEN(SC_UNONAME_ADDRESS),  0,  &getCppuType((table::CellAddress*)0), 0, 0 },
             {MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
-            {MAP_CHAR_LEN(SC_UNONAME_XL_A1_REPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
             {MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0,  &getCppuType((sal_Int32*)0),        0, 0 },
             {MAP_CHAR_LEN(SC_UNONAME_UIREPR),   0,  &getCppuType((rtl::OUString*)0),    0, 0 },
+            {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
             {0,0,0,0,0,0}
         };
         static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
             bSuccess = ParseUIString( aUIString );
         }
     }
-    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) )
     {
-        ::formula::FormulaGrammar::AddressConvention aConv = ::formula::FormulaGrammar::CONV_OOO; 
-        if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
-            aConv = ::formula::FormulaGrammar::CONV_XL_A1; 
+        ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ?
+            ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1;
+
         //  parse the file format string
         rtl::OUString sRepresentation;
         if (aValue >>= sRepresentation)
             }
 
             //  parse the rest like a UI string
-            bSuccess = ParseUIString( aUIString, aConv );
+            bSuccess = ParseUIString( aUIString, eConv );
         }
     }
     else
             aRange.aStart.Format( aFormatStr, nFlags, pDoc );
         aRet <<= rtl::OUString( aFormatStr );
     }
-    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) )
     {
-        ::formula::FormulaGrammar::AddressConvention aConv = ::formula::FormulaGrammar::CONV_OOO; 
-        if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
-            aConv = ::formula::FormulaGrammar::CONV_XL_A1; 
+        ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ?
+            ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1;
 
         //  generate file format string - always include sheet
         String aFormatStr;
-        aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
+        aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc, eConv );
         if ( bIsRange )
         {
             //  manually concatenate range so both parts always have the sheet name
             aFormatStr.Append( (sal_Unicode) ':' );
             String aSecond;
             USHORT nFlags = SCA_VALID;
-            if( aConv != ::formula::FormulaGrammar::CONV_XL_A1 )
-		nFlags |= SCA_TAB_3D;
-            aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
+            if( eConv != ::formula::FormulaGrammar::CONV_XL_A1 )
+                nFlags |= SCA_TAB_3D;
+            aRange.aEnd.Format( aSecond, nFlags, pDoc, eConv );
             aFormatStr.Append( aSecond );
         }
         aRet <<= rtl::OUString( aFormatStr );