Kaydet (Commit) c16025ea authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: whitespace fixes in SdtHelper

Change-Id: Idcb74c5e911ec2337f1e8743dc4627464f1cfd27
üst 4144858f
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
#include <StyleSheetTable.hxx> #include <StyleSheetTable.hxx>
#include <SdtHelper.hxx> #include <SdtHelper.hxx>
namespace writerfilter { namespace writerfilter
namespace dmapper { {
namespace dmapper
{
using namespace ::com::sun::star; using namespace ::com::sun::star;
......
...@@ -17,54 +17,64 @@ ...@@ -17,54 +17,64 @@
#include <WriterFilterDllApi.hxx> #include <WriterFilterDllApi.hxx>
namespace com { namespace sun { namespace star { namespace com
namespace awt{ {
struct Size; namespace sun
class XControlModel; {
} namespace star
}}} {
namespace awt
{
struct Size;
class XControlModel;
}
}
}
}
namespace writerfilter { namespace writerfilter
namespace dmapper { {
namespace dmapper
{
/** /**
* Helper to create form controls from w:sdt tokens. * Helper to create form controls from w:sdt tokens.
* *
* w:sdt tokens can't be imported as form fields, as w:sdt supports * w:sdt tokens can't be imported as form fields, as w:sdt supports
* e.g. date picking as well. * e.g. date picking as well.
*/ */
class SdtHelper class SdtHelper
{ {
DomainMapper_Impl& m_rDM_Impl; DomainMapper_Impl& m_rDM_Impl;
/// Items of the drop-down control. /// Items of the drop-down control.
std::vector<OUString> m_aDropDownItems; std::vector<OUString> m_aDropDownItems;
/// Pieces of the default text -- currently used only by the dropdown control. /// Pieces of the default text -- currently used only by the dropdown control.
OUStringBuffer m_aSdtTexts; OUStringBuffer m_aSdtTexts;
/// Date format, see com/sun/star/awt/UnoControlDateFieldModel.idl /// Date format, see com/sun/star/awt/UnoControlDateFieldModel.idl
boost::optional<sal_Int16> m_oDateFormat; boost::optional<sal_Int16> m_oDateFormat;
bool m_bHasElements; bool m_bHasElements;
/// Create and append the drawing::XControlShape, containing the various models. /// Create and append the drawing::XControlShape, containing the various models.
void createControlShape(com::sun::star::awt::Size aSize, com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>); void createControlShape(com::sun::star::awt::Size aSize, com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>);
public: public:
SdtHelper(DomainMapper_Impl& rDM_Impl); SdtHelper(DomainMapper_Impl& rDM_Impl);
virtual ~SdtHelper(); virtual ~SdtHelper();
std::vector<OUString>& getDropDownItems(); std::vector<OUString>& getDropDownItems();
OUStringBuffer& getSdtTexts(); OUStringBuffer& getSdtTexts();
boost::optional<sal_Int16>& getDateFormat(); boost::optional<sal_Int16>& getDateFormat();
/// If createControlShape() was ever called. /// If createControlShape() was ever called.
bool hasElements(); bool hasElements();
/// Create drop-down control from w:sdt's w:dropDownList. /// Create drop-down control from w:sdt's w:dropDownList.
void createDropDownControl(); void createDropDownControl();
/// Create date control from w:sdt's w:date. /// Create date control from w:sdt's w:date.
void createDateControl(OUString& rDefaultText); void createDateControl(OUString& rDefaultText);
}; };
} // namespace dmapper } // namespace dmapper
} // namespace writerfilter } // namespace writerfilter
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment