Kaydet (Commit) 2196955b authored tarafından Alexander Wilms's avatar Alexander Wilms Kaydeden (comit) Caolán McNamara

Remove visual noise from reportdesign

Change-Id: I2fea3ecefa24cfc0f3cc2a2f4de7c934eba5d6f7
Reviewed-on: https://gerrit.libreoffice.org/8295Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2efee3c6
......@@ -24,13 +24,13 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <tools/resmgr.hxx>
//.........................................................................
namespace rptui
{
//.........................................................................
//=========================================================================
//= OModule
//=========================================================================
class OModuleImpl;
class REPORTDESIGN_DLLPUBLIC OModule
{
......@@ -60,9 +60,9 @@ namespace rptui
static void ensureImpl();
};
//=========================================================================
//= OModuleClient
//=========================================================================
/** base class for objects which uses any global module-specific resources
*/
class REPORTDESIGN_DLLPUBLIC OModuleClient
......@@ -72,9 +72,9 @@ namespace rptui
inline ~OModuleClient() { OModule::revokeClient(); }
};
//=========================================================================
//= ModuleRes
//=========================================================================
/** specialized ResId, using the resource manager provided by the global module
*/
class REPORTDESIGN_DLLPUBLIC ModuleRes : public ::ResId
......@@ -82,9 +82,9 @@ namespace rptui
public:
inline ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { }
};
//.........................................................................
} // namespace rptui
//.........................................................................
#endif // _RPTUI_MODULE_HELPER_RPT_HXX_
......
......@@ -28,10 +28,10 @@
#include "RptDef.hxx"
//........................................................................
namespace rptui
{
//........................................................................
typedef ::cppu::WeakComponentImplHelper1< ::com::sun::star::beans::XPropertyChangeListener
> OPropertyForward_Base;
......@@ -77,9 +77,9 @@ namespace rptui
*/
void startListening();
};
//........................................................................
} // namespace rptui
//........................................................................
#endif // RPTUI_PROPERTYSETFORWARD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -399,9 +399,9 @@ namespace reportdesign
::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager2 > getUIConfigurationManager2( ) throw (::com::sun::star::uno::RuntimeException);
};
// =============================================================================
} // namespace reportdesign
// =============================================================================
#endif // REPORTDESIGN_API_REPORTDEFINITION_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -55,9 +55,9 @@ namespace reportdesign
void start(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReportDefinition);
void start(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup);
};
// =============================================================================
} // namespace reportdesign
// =============================================================================
#endif // INCLUDED_REPORT_VISTITOR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -102,7 +102,7 @@ typedef std::map<OUString, TPropertyConverter> TPropertyNamePair;
REPORTDESIGN_DLLPUBLIC const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId);
REPORTDESIGN_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle> getUsedStyle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport);
// -----------------------------------------------------------------------------
template < typename T> T getStyleProperty(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport,const OUString& _sPropertyName)
{
T nReturn = T();
......@@ -110,7 +110,7 @@ template < typename T> T getStyleProperty(const ::com::sun::star::uno::Reference
xProp->getPropertyValue(_sPropertyName) >>= nReturn;
return nReturn;
}
// -----------------------------------------------------------------------------
template<typename T> void setStyleProperty(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport,const OUString& _sPropertyName,const T& _aValue)
{
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xProp(getUsedStyle(_xReport),::com::sun::star::uno::UNO_QUERY);
......
......@@ -130,9 +130,9 @@ public:
static SdrObject* createObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent);
static sal_uInt16 getObjectType(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent);
};
//============================================================================
// OCustomShape
//============================================================================
class REPORTDESIGN_DLLPUBLIC OCustomShape: public SdrObjCustomShape , public OObjectBase
{
friend class OReportPage;
......@@ -173,9 +173,9 @@ private:
virtual void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxUnoShape );
};
//============================================================================
// OOle2Obj
//============================================================================
class REPORTDESIGN_DLLPUBLIC OOle2Obj: public SdrOle2Obj , public OObjectBase
{
friend class OReportPage;
......@@ -224,9 +224,9 @@ public:
void initializeChart( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& _xModel);
};
//============================================================================
// OUnoObject
//============================================================================
class REPORTDESIGN_DLLPUBLIC OUnoObject: public SdrUnoObj , public OObjectBase
{
friend class OReportPage;
......@@ -280,9 +280,9 @@ private:
void impl_initializeModel_nothrow();
};
//============================================================================
} // rptui
//============================================================================
#endif // _REPORT_RPTUIOBJ_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -26,9 +26,9 @@
namespace rptui
{
//============================================================================
// OReportPage
//============================================================================
class OReportModel;
......
......@@ -219,7 +219,7 @@
#define RID_STR_VERTICALALIGN (RID_STRING_START + 160)
#define RID_STR_PARAADJUST (RID_STRING_START + 161)
// -----------------------------------------------------------------------
#define RID_IMG_TREENODE_COLLAPSED ( RID_IMAGE_START + 1 )
#define RID_IMG_TREENODE_EXPANDED ( RID_IMAGE_START + 2 )
#define REPORT_TREE_ICON ( RID_IMAGE_START + 5 )
......
......@@ -105,9 +105,9 @@ namespace rptui
static ::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> getMemberFunction(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
};
//==================================================================================================================
//= UndoContext
//==================================================================================================================
class UndoContext
{
public:
......@@ -126,9 +126,9 @@ namespace rptui
SfxUndoManager& m_rUndoManager;
};
//==================================================================================================================
//= UndoSuppressor
//==================================================================================================================
class UndoSuppressor
{
public:
......@@ -147,9 +147,9 @@ namespace rptui
SfxUndoManager& m_rUndoManager;
};
//==================================================================================================================
//= OCommentUndoAction
//==================================================================================================================
class REPORTDESIGN_DLLPUBLIC OCommentUndoAction : public SdrUndoAction
{
protected:
......@@ -166,9 +166,9 @@ namespace rptui
virtual void Undo();
virtual void Redo();
};
//==================================================================
// OUndoContainerAction
//==================================================================
class REPORTDESIGN_DLLPUBLIC OUndoContainerAction: public OCommentUndoAction
{
OUndoContainerAction(OUndoContainerAction&);
......@@ -200,9 +200,9 @@ namespace rptui
virtual void implReRemove( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
};
//==================================================================
// OUndoReportSectionAction
//==================================================================
class REPORTDESIGN_DLLPUBLIC OUndoReportSectionAction : public OUndoContainerAction
{
OReportHelper m_aReportHelper;
......@@ -222,9 +222,8 @@ namespace rptui
virtual void implReRemove( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
};
//==================================================================
// OUndoGroupSectionAction
//==================================================================
class REPORTDESIGN_DLLPUBLIC OUndoGroupSectionAction : public OUndoContainerAction
{
OGroupHelper m_aGroupHelper;
......@@ -244,9 +243,7 @@ namespace rptui
virtual void implReRemove( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
};
///==================================================================
/// ORptUndoPropertyAction
///==================================================================
// ORptUndoPropertyAction
class REPORTDESIGN_DLLPUBLIC ORptUndoPropertyAction: public OCommentUndoAction
{
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xObj;
......@@ -271,9 +268,9 @@ namespace rptui
virtual OUString GetComment() const;
};
//==================================================================
// OUndoPropertyReportSectionAction
//==================================================================
class REPORTDESIGN_DLLPUBLIC OUndoPropertyReportSectionAction : public ORptUndoPropertyAction
{
OReportHelper m_aReportHelper;
......@@ -290,9 +287,9 @@ namespace rptui
);
};
//==================================================================
// OUndoPropertyGroupSectionAction
//==================================================================
class REPORTDESIGN_DLLPUBLIC OUndoPropertyGroupSectionAction : public ORptUndoPropertyAction
{
OGroupHelper m_aGroupHelper;
......
......@@ -32,7 +32,7 @@ namespace rptui
{
class OXUndoEnvironmentImpl;
//========================================================================
class REPORTDESIGN_DLLPUBLIC OXUndoEnvironment
: public ::cppu::WeakImplHelper3< ::com::sun::star::beans::XPropertyChangeListener
, ::com::sun::star::container::XContainerListener
......@@ -140,6 +140,6 @@ namespace rptui
};
}
#endif //
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -27,14 +27,14 @@
#include <map>
//........................................................................
namespace rptui
{
//........................................................................
// =============================================================================
// = ConditionalExpression
// =============================================================================
class REPORTDESIGN_DLLPUBLIC ConditionalExpression
{
private:
......@@ -63,18 +63,18 @@ namespace rptui
bool matchExpression( const OUString& _rExpression, const OUString& _rFieldDataSource, OUString& _out_rLHS, OUString& _out_rRHS ) const;
};
//========================================================================
//= ConditionType
//========================================================================
enum ConditionType
{
eFieldValueComparison = 0,
eExpression = 1
};
//========================================================================
//= ComparisonOperation
//========================================================================
enum ComparisonOperation
{
eBetween = 0,
......@@ -90,9 +90,9 @@ namespace rptui
typedef ::boost::shared_ptr< ConditionalExpression > PConditionalExpression;
typedef ::std::map< ComparisonOperation, PConditionalExpression > ConditionalExpressions;
// =============================================================================
// = ConditionalExpressionFactory
// =============================================================================
class REPORTDESIGN_DLLPUBLIC ConditionalExpressionFactory
{
public:
......@@ -104,9 +104,9 @@ namespace rptui
ConditionalExpressionFactory( const ConditionalExpressionFactory& ); // never implemented
ConditionalExpressionFactory& operator=( const ConditionalExpressionFactory& ); // never implemented
};
//........................................................................
} // namespace rptui
//........................................................................
#endif // CONDITIONALEXPRESSION_HXX
......
......@@ -26,14 +26,14 @@
#include <osl/diagnose.h>
//........................................................................
namespace rptui
{
//........................................................................
//====================================================================
//= ReportFormula
//====================================================================
class REPORTDESIGN_DLLPUBLIC ReportFormula
{
public:
......@@ -103,23 +103,23 @@ namespace rptui
void impl_construct( const OUString& _rFormula );
};
//--------------------------------------------------------------------
inline OUString ReportFormula::getFieldName() const
{
OSL_PRECOND( getType() == Field, "ReportFormula::getFieldName: not bound to a field!" );
return getUndecoratedContent();
}
//--------------------------------------------------------------------
inline OUString ReportFormula::getExpression() const
{
OSL_PRECOND( getType() == Expression, "ReportFormula::getExpression: not bound to an expression!" );
return getUndecoratedContent();
}
//........................................................................
} // namespace rptui
//........................................................................
#endif // REPORTFORMULA_HXX
......
......@@ -141,7 +141,7 @@ public class ReportDesignerTest
{
System.out.println("before");
// String tempdir = System.getProperty("java.io.tmpdir");
//
int dummy = 0;
// m_xXMultiServiceFactory = getMSF();
}
......@@ -167,7 +167,7 @@ public class ReportDesignerTest
// sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 7);
// }
// }
//
// System.out.println(sOfficePath);
// File sOffice = new File(sOfficePath);
// if (! sOffice.exists())
......@@ -223,13 +223,13 @@ public class ReportDesignerTest
// param.put("TimeOut", new Integer(300000));
// System.out.println("TimeOut: " + param.getInt("TimeOut"));
// System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut"));
//
// // OfficeProvider aProvider = null;
// m_aProvider = new OfficeProvider();
// m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param);
// param.put("ServiceFactory", m_xXMultiServiceFactory);
// }
//
// private void stopOffice()
// {
// if (m_aProvider != null)
......@@ -266,7 +266,7 @@ public class ReportDesignerTest
// sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser);
// System.out.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
//
// checkIfOfficeExists(sAppExecutionCommand);
// param.put("AppExecutionCommand", new String(sAppExecutionCommand));
......@@ -278,7 +278,7 @@ public class ReportDesignerTest
// String sCurrentDirectory = System.getProperty("user.dir");
// System.out.println("Current Dir: " + sCurrentDirectory);
//
String sWriterDocument = TestDocument.getUrl("RPTWriterTests.odb");
startTestForFile(sWriterDocument, WRITER);
......@@ -289,12 +289,12 @@ public class ReportDesignerTest
// stopOffice();
// throw new AssureException(e.getMessage());
// }
//
// ------------------------------ Office shutdown ------------------------------
// stopOffice();
}
// -----------------------------------------------------------------------------
private void startTestForFile(String _sDocument, int _nType)
{
FileURL aFileURL = new FileURL(_sDocument);
......@@ -364,7 +364,7 @@ public class ReportDesignerTest
return getFileFormat(_nType);
}
// -----------------------------------------------------------------------------
private void createDBEntry(int _nType)
{
// try to connect the database
......
......@@ -32,10 +32,10 @@
#define MIN_WIDTH 80
#define MIN_HEIGHT 20
// =============================================================================
namespace reportdesign
{
// =============================================================================
using namespace com::sun::star;
using namespace comphelper;
uno::Sequence< OUString > lcl_getLineOptionals()
......@@ -567,8 +567,8 @@ void SAL_CALL OFixedLine::setPrintRepeatedValues( ::sal_Bool /*_printrepeatedval
}
// =============================================================================
} // namespace reportdesign
// =============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -30,10 +30,10 @@
#include "FormatCondition.hxx"
#include <com/sun/star/text/ParagraphVertAlign.hpp>
#include "ReportHelperImpl.hxx"
// =============================================================================
namespace reportdesign
{
// =============================================================================
using namespace com::sun::star;
using namespace comphelper;
uno::Sequence< OUString > lcl_getFixedTextOptionals()
......@@ -324,8 +324,8 @@ OUString SAL_CALL OFixedText::getShapeType( ) throw (uno::RuntimeException)
}
// =============================================================================
} // namespace reportdesign
// =============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -27,10 +27,10 @@
#include "Tools.hxx"
#include <com/sun/star/text/ParagraphVertAlign.hpp>
#include "ReportHelperImpl.hxx"
// =============================================================================
namespace reportdesign
{
// =============================================================================
using namespace com::sun::star;
using namespace comphelper;
......@@ -148,8 +148,8 @@ void SAL_CALL OFormatCondition::setFormula( const OUString& _formula ) throw (un
// XReportControlFormat
REPORTCONTROLFORMAT_IMPL(OFormatCondition,m_aFormatProperties)
// =============================================================================
} // namespace reportdesign
// =============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -31,10 +31,10 @@
#include "FormatCondition.hxx"
#include <com/sun/star/text/ParagraphVertAlign.hpp>
#include "ReportHelperImpl.hxx"
// =============================================================================
namespace reportdesign
{
// =============================================================================
using namespace com::sun::star;
using namespace comphelper;
......@@ -366,8 +366,8 @@ OUString SAL_CALL OFormattedField::getShapeType( ) throw (uno::RuntimeException
return OUString("com.sun.star.drawing.ControlShape");
}
// =============================================================================
} // namespace reportdesign
// =============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -24,10 +24,10 @@
#include <comphelper/property.hxx>
#include <cppuhelper/supportsservice.hxx>
#include "Tools.hxx"
// =============================================================================
namespace reportdesign
{
// =============================================================================
using namespace com::sun::star;
using namespace comphelper;
......@@ -203,8 +203,8 @@ void SAL_CALL OFunction::setParent( const uno::Reference< uno::XInterface >& Par
}
// =============================================================================
} // namespace reportdesign
// =============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -24,10 +24,10 @@
#include <comphelper/property.hxx>
#include <boost/mem_fn.hpp>
#include <algorithm>
// =============================================================================
namespace reportdesign
{
// =============================================================================
using namespace com::sun::star;
OFunctions::OFunctions(const uno::Reference< report::XFunctionsSupplier >& _xParent,const uno::Reference< uno::XComponentContext >& context)
......@@ -39,7 +39,7 @@ OFunctions::OFunctions(const uno::Reference< report::XFunctionsSupplier >& _xPar
}
// TODO: VirtualFunctionFinder: This is virtual function!
//
OFunctions::~OFunctions()
{
}
......@@ -50,7 +50,7 @@ void SAL_CALL OFunctions::dispose() throw(uno::RuntimeException)
}
// TODO: VirtualFunctionFinder: This is virtual function!
//
void SAL_CALL OFunctions::disposing()
{
::std::for_each(m_aFunctions.begin(),m_aFunctions.end(),::boost::mem_fn(&com::sun::star::report::XFunction::dispose));
......@@ -186,8 +186,8 @@ void OFunctions::checkIndex(sal_Int32 _nIndex)
if ( _nIndex < 0 || static_cast<sal_Int32>(m_aFunctions.size()) <= _nIndex )
throw lang::IndexOutOfBoundsException();
}
// =============================================================================
}
// =============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -30,10 +30,10 @@
#include <cppuhelper/supportsservice.hxx>
#include "Functions.hxx"
// =============================================================================
namespace reportdesign
{
// =============================================================================